/* ==========================================================================
   POCITS HEADER & DROPDOWN COMPONENTS
   Complete CSS Specification
   File: header-components.css
   Created: December 12, 2025
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300&display=swap');

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
  /* Colors - Light Mode */
  --header-bg: #0a0a1e;
  --header-border: #2d2d44;
  --dropdown-bg: #0a0a1e;
  --dropdown-border: rgba(255,255,255,0.12);
  --flyout-bg: #0a0a1e;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.65);
  
  --accent-primary: #4A90E2;
  --accent-success: #10B981;
  --accent-warning: #F59E0B;
  --accent-danger: #EF4444;
  
  --color-pocit: #4A90E2;
  --color-marc: #8B5CF6;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-dropdown: 0 10px 40px rgba(0, 0, 0, 0.3);
  
  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.3s ease;
  
  /* Z-index layers */
  --z-header: 100;
  --z-dropdown: 200;
  --z-flyout: 210;
  --z-modal: 300;
  --z-overlay: 250;
  
  /* Header dimensions */
  --header-height: 60px;
  --avatar-size: 36px;
  --dropdown-width: 300px;
  --flyout-width: 360px;
}

/* ==========================================================================
   HEADER
   Main header component - single source of truth
   ========================================================================== */

/* Offset body content for fixed header */
body {
  padding-top: var(--header-height, 60px);
}

.pocits-header {
  background-color: var(--header-bg, #0a0a1e);
  width: 100%;
  height: var(--header-height, 60px);
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  z-index: 9999 !important;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.pocits-header.scrolled {
  background-color: #0a0a1e;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* Walls pages — header stays solid (same as all other pages) */

/* Walls pages — translucent + blur dropdowns (place profiles only) */
body[data-walls] .pocket-dropdown,
body[data-walls] .user-dropdown,
body[data-walls] .wallet-flyout,
body[data-walls] .notification-flyout {
  background: rgba(10,10,30,0.82) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}

/* Inner container - constrained width
   SINGLE SOURCE OF TRUTH: All header max-width should be 1350px
   Do not override this in other CSS files */
.header-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: var(--space-sm) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Legacy alias for pages still using .header-container */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Header Left: Logo + Navigation */
.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.header-logo {
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 32px;
  width: auto;
}

/* ==========================================================================
   POCKET LOGO & DROPDOWN
   Navigation dropdown from logo click
   ========================================================================== */

.pocket-container {
  position: relative;
}

.pocket-logo {
  width: 40px;
  height: 46px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm, 4px);
  transition: transform 0.2s, filter 0.2s;
}

.pocket-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pocket-logo:hover {
  transform: scale(1.05);
  background: rgba(255,255,255,0.05);
}

/* Pocket Dropdown Panel */
.pocket-dropdown {
  position: fixed;
  top: var(--header-height);
  left: 65px;
  background: var(--dropdown-bg, var(--bg-dropdown, #0a0a1e));
  border: 1px solid var(--dropdown-border, var(--border-dark, rgba(255,255,255,0.12)));
  border-top: none;
  border-radius: 0;
  min-width: 300px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: var(--shadow-dropdown, 0 10px 40px rgba(0, 0, 0, 0.3));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: var(--z-dropdown, 200);
}

.pocket-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}


/* Pocket Hierarchy (Place ancestry) */
.pocket-hierarchy {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
}

.pocket-hierarchy-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  font-size: 13px;
}

.pocket-hierarchy-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pocket-hierarchy-item.current {
  color: var(--text-primary, #fff);
  font-weight: 500;
  background: rgba(255,255,255,0.08);
}

.pocket-hierarchy-item .chevron {
  margin-right: var(--space-sm);
  font-size: 10px;
  opacity: 0.5;
}

/* Pocket Children (places within current location) */
.pocket-children {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
  max-height: 200px;
  overflow-y: auto;
}

.pocket-children-header {
  display: flex;
  align-items: center;
  padding: var(--space-xs) var(--space-lg);
  margin-bottom: var(--space-xs);
}

.pocket-children-icon {
  color: #F59E0B;
  margin-right: var(--space-sm);
  font-size: 12px;
}

.pocket-children-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pocket-child-item {
  display: block;
  padding: var(--space-xs) var(--space-lg) var(--space-xs) 36px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
}

.pocket-child-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pocket-child-item.starred {
  color: #F59E0B;
}

/* Pocket Collapsible Sections */
.pocket-section {
  border-bottom: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
}

.pocket-section:last-child {
  border-bottom: none;
}

.pocket-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  cursor: pointer;
  transition: background 0.15s;
}

.pocket-section-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Context-header variant: section header doubles as identity anchor + toggle arrow */
.pocket-section-header.pocket-ctx-header {
  align-items: center;
  cursor: default;
  padding: 7px 12px 8px;
  gap: 6px;
}
.pocket-section-header.pocket-ctx-header:hover {
  background: none;
}
.pocket-ctx-content {
  flex: 1;
  min-width: 0;
}
.pocket-ctx-primary {
  display: block;
  font-family: 'Comfortaa', sans-serif;
  font-size: 16px;
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  text-decoration: none;
}
a.pocket-ctx-primary:hover { text-decoration: underline; }
/* Place portal/profile banner: inline layout, size override */
.pocket-ctx-primary--place,
.pocket-viewed-primary--place {
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline;
}
a.pocket-ctx-primary--place:hover,
a.pocket-viewed-primary--place:hover { text-decoration: underline; }
.pocket-place-banner-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  overflow: hidden;
}
.pocket-place-crumbs {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.pocket-place-crumb {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}
a.pocket-place-crumb:hover { color: rgba(255, 255, 255, 0.85); }
.pocket-place-crumb-sep {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}
.pocket-ctx-secondary {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 2px;
  min-width: 0;
}
.pocket-ctx-content--row,
.pocket-viewed-banner .pocket-ctx-content {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}
.pocket-ctx-content--row .pocket-ctx-secondary,
.pocket-viewed-banner .pocket-ctx-content .pocket-ctx-secondary { margin-top: 0; }
/* Arrow in context header: arrow-only is clickable, not the whole header */
.pocket-section-header.pocket-ctx-header .pocket-section-toggle {
  cursor: pointer;
  padding: 0 0 0 4px;
  flex-shrink: 0;
  line-height: 1;
}
.pocket-section-header.pocket-ctx-header .pocket-section-toggle:hover {
  color: #fff;
}

.pocket-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.15s;
}
a.pocket-section-title:hover { color: #60a5fa; }

.pocket-section-toggle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s;
}

.pocket-section.open .pocket-section-toggle {
  transform: rotate(180deg);
}

.pocket-section-content {
  display: none;
  padding-bottom: var(--space-sm);
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(255, 255, 255, 0.04);
}

.pocket-section.open > .pocket-section-content {
  display: block;
}

/* Flat content blocks (not inside a collapsible section) always visible */
.pocket-dropdown > .pocket-section-content {
  display: block;
}

.pocket-section-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
  cursor: pointer;
}

.pocket-section-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pocket-section-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hub-primary, #4A90E2);
}

.pocket-portal-desc {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.04em;
}

.pocket-hero-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.15s, background 0.15s;
}
.pocket-hero-entry:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}
.pocket-hero-entry-icon {
  display: flex;
  align-items: center;
  opacity: 0.7;
  flex-shrink: 0;
}

.pocket-section-item-icon {
  width: 20px;
  margin-right: var(--space-sm);
  text-align: center;
  font-size: 14px;
}

/* Hub colors in pocket dropdown */
.pocket-section-item[data-hub="BOOK"] .pocket-section-item-icon { color: #F59E0B; }
.pocket-section-item[data-hub="MALL"] .pocket-section-item-icon { color: #10B981; }
.pocket-section-item[data-hub="CMTY"] .pocket-section-item-icon { color: #EC4899; }
.pocket-section-item[data-hub="TOPX"] .pocket-section-item-icon { color: #3B82F6; }
.pocket-section-item[data-hub="CHAT"] .pocket-section-item-icon { color: #8B5CF6; }
.pocket-section-item[data-hub="DYK"] .pocket-section-item-icon { color: #06B6D4; }
.pocket-section-item[data-hub="STRM"] .pocket-section-item-icon { color: #EF4444; }
.pocket-section-item[data-hub="MEDI"] .pocket-section-item-icon { color: #14B8A6; }
.pocket-section-item[data-hub="TRUST"] .pocket-section-item-icon { color: #6366F1; }
.pocket-section-item[data-hub="XCHG"] .pocket-section-item-icon { color: #22C55E; }
.pocket-section-item[data-hub="INDEX"] .pocket-section-item-icon { color: #EAB308; }
.pocket-section-item[data-hub="RSRV"] .pocket-section-item-icon { color: #0EA5E9; }

/* Pocket stub items — placeholder / coming soon */
.pocket-stub {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

/* Stubs with tooltip — show native title on hover via pointer-events re-enable */
.pocket-soon {
  pointer-events: auto;
  cursor: not-allowed;
  position: relative;
}
.pocket-soon::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: var(--space-lg);
  transform: none;
  margin-bottom: 4px;
  background: rgba(0,0,0,0.82);
  color: rgba(255,255,255,0.75);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 200;
}
.pocket-soon:hover::after {
  opacity: 1;
}

/* Place hierarchy navigation */
.pocket-place-current {
  color: rgba(255, 255, 255, 0.85) !important;
  cursor: default;
  pointer-events: none;
  font-weight: 600;
}
.pocket-place-dot {
  font-size: 7px;
  vertical-align: middle;
  margin-right: 5px;
  color: rgba(255, 255, 255, 0.50);
}
/* Row layout: name left, BETA badge right */
.pocket-place-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.pocket-place-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pocket-place-beta {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 8px;
  flex-shrink: 0;
}
.pocket-place-level {
  opacity: 0.55;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.7);
}
/* Active continent header — green left-border ties to BETA badge color */
.pocket-place-level--continent {
  opacity: 1;
  color: rgba(255, 255, 255, 0.88);
  border-left: 2px solid #4ade80;
  padding-left: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.pocket-place-coming {
  opacity: 0.55;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 2px solid #f87171;
  padding-left: 7px;
  color: rgba(255, 255, 255, 0.6);
}

/* Pocket CTA item — delegate / join action */
.pocket-cta-item {
  color: rgba(255, 255, 255, 0.55) !important;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 2px;
}
.pocket-cta-item:hover {
  color: #ffffff !important;
  font-style: normal;
}

/* Foundation geo-chain levels */
.pocket-foundation-level {
  padding-left: calc(var(--space-lg) + 10px);
  font-size: 12px;
}
.pocket-foundation-level--international {
  font-size: 13px;
  padding-left: var(--space-lg);
}

/* Pocket subsections (nested accordion) */
.pocket-subsection-header {
  position: relative;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border-left: 2px solid rgba(255,255,255,0.15);
  margin: 2px 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.pocket-subsection-toggle {
  margin-left: auto;
  font-size: 8px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s;
}

.pocket-subsection-header.expanded .pocket-subsection-toggle {
  transform: rotate(180deg);
}

.pocket-subsection-content {
  display: none;
  padding-left: var(--space-md);
}

.pocket-subsection-header.expanded + .pocket-subsection-content {
  display: block;
}

.pocket-subitem {
  padding-left: var(--space-lg);
  font-size: 12px;
}

/* Associate avatars in pocket menu */
.pocket-associate-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 6px;
}

.pocket-associate-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  font-size: 10px;
  font-weight: 600;
}

/* Dept badge in subsection header */
.pocket-dept-badge {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pocket-add-item {
  color: rgba(255, 255, 255, 0.7);
}

.pocket-add-item:hover {
  color: var(--accent-primary, #4A90E2);
  background: rgba(255, 255, 255, 0.08);
}

.pocket-item-desc {
  margin-left: 0.6em;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.pocket-empty-state {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  font-size: 12px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-left: var(--space-md);
  padding-left: var(--space-md);
  border-left: 1px solid var(--header-border);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

a.breadcrumb-item:hover {
  color: var(--text-primary);
}

.breadcrumb-item.active,
.breadcrumb-item.current {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumb-icon {
  font-size: 0.875rem;
  line-height: 1;
}

.breadcrumb-name {
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
}

.breadcrumb-separator {
  color: var(--text-muted);
  margin: 0 2px;
  font-size: 0.75rem;
}

/* Header Center: Hub Selector */
.header-center {
  flex-shrink: 0;
}

/* Header Right: Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Header Buttons (Search, Wallet, Notifications) */
.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.header-btn:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* ==========================================================================
   WALLET BUTTON (Header)
   ========================================================================== */

.header-wallet {
  position: relative;
}

.wallet-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.wallet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.wallet-icon img,
.wallet-icon svg {
  width: 20px;
  height: 20px;
}

.wallet-balance {
  font-family: 'POCITSMath', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.wallet-balance.masked {
  letter-spacing: 0.05em;
}

/* ==========================================================================
   NOTIFICATION BUTTON (Header)
   ========================================================================== */

.header-notifications {
  position: relative;
}

.notification-btn {
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-danger);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   AVATAR BUTTON (Header)
   ========================================================================== */

.header-avatar {
  position: relative;
}

.avatar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.avatar-btn:hover {
  border-color: var(--accent-primary);
}

.avatar-btn:focus-visible {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
}

.avatar-image {
  width: var(--avatar-size);
  height: var(--avatar-size);
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* ==========================================================================
   AVATAR DROPDOWN
   ========================================================================== */

.avatar-dropdown {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: var(--dropdown-width);
  max-height: calc(100vh - var(--header-height) - 40px);
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  overflow-y: auto;
  z-index: var(--z-dropdown);
  
  /* Animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
}

.avatar-dropdown:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown Header (User Identity) */
.dropdown-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--dropdown-border);
}

.dropdown-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.dropdown-user-info {
  flex: 1;
  min-width: 0;
}

.dropdown-user-name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-handle {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-switch-btn {
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.profile-switch-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* Dropdown Sections */
.dropdown-section {
  border-bottom: 1px solid var(--dropdown-border);
}

.dropdown-section:last-of-type {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.section-header:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.section-chevron {
  transition: transform var(--transition-fast);
}

.section-header[aria-expanded="true"] .section-chevron {
  transform: rotate(180deg);
}

.section-content {
  padding-bottom: var(--space-sm);
}

.section-content[hidden] {
  display: none;
}

/* Dropdown Items */
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.dropdown-item.active {
  background: rgba(74, 144, 226, 0.1);
  color: var(--accent-primary);
}

/* Active profile with rectangular ring highlight */
.dropdown-item.profile-item.active {
  background: rgba(74, 144, 226, 0.12);
  border: 2px solid var(--accent-primary, #4A90E2);
  border-radius: var(--radius-sm, 4px);
  margin: 2px var(--space-sm);
  padding: calc(var(--space-md) - 2px) calc(var(--space-lg) - 2px);
}

.dropdown-item:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

/* Profile Items */
.profile-item {
  padding: var(--space-md) var(--space-lg);
}

.profile-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.profile-type {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.active-indicator {
  color: var(--accent-success);
  flex-shrink: 0;
}

/* Hub Items */
.hub-item {
  padding: var(--space-sm) var(--space-lg);
}

.hub-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 1rem;
  flex-shrink: 0;
}

.hub-info {
  flex: 1;
  min-width: 0;
}

.hub-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.hub-description {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-left: var(--space-sm);
}

/* Item Badges/Values */
.item-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--accent-danger);
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-value {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'POCITSMath', system-ui, sans-serif;
}

/* Add Item */
.add-item {
  color: var(--accent-primary);
}

.add-item:hover {
  color: var(--accent-primary);
  background: rgba(74, 144, 226, 0.1);
}

/* Places Section */
.places-current {
  padding: var(--space-sm) var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.places-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.places-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.places-hierarchy {
  padding: var(--space-xs) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hierarchy-breadcrumb {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hierarchy-expand {
  font-size: 0.6875rem;
  color: var(--accent-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.hierarchy-expand:hover {
  text-decoration: underline;
}

.places-hierarchy-full {
  padding: var(--space-xs) 0;
}

.hierarchy-item {
  display: block;
  padding: var(--space-xs) var(--space-lg);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.hierarchy-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.places-divider {
  height: 1px;
  background: var(--dropdown-border);
  margin: var(--space-sm) var(--space-lg);
}

.places-favorites,
.places-recent {
  padding: var(--space-xs) 0;
}

.places-favorites .places-label,
.places-recent .places-label {
  display: block;
  padding: var(--space-xs) var(--space-lg);
}

.favorite-star {
  color: var(--accent-warning);
}

.empty-state {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Dropdown Divider */
.dropdown-divider {
  height: 1px;
  background: var(--dropdown-border);
  margin: var(--space-xs) 0;
}

/* Home Link */
.home-link {
  font-weight: 500;
}

/* Dropdown Footer */
.dropdown-footer {
  padding: var(--space-xs) 0;
}

.logout-item {
  color: var(--accent-danger);
}

.logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
}

/* ==========================================================================
   WALLET FLYOUT
   ========================================================================== */

.wallet-flyout {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: var(--flyout-width);
  background: var(--flyout-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  z-index: var(--z-flyout);
  
  /* Animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
}

.wallet-flyout:not([hidden]) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Flyout Header */
.flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--dropdown-border);
}

.flyout-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.privacy-toggle {
  padding: var(--space-xs);
  background: transparent;
  border: none;
  font-size: 1.125rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.privacy-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Balance Display */
.wallet-balance-display {
  padding: var(--space-xl);
  text-align: center;
}

.balance-primary {
  margin-bottom: var(--space-sm);
}

.balance-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.balance-amount.pocit-currency {
  font-family: 'POCITSMath', system-ui, sans-serif;
  color: var(--color-pocit);
}

.peek-btn {
  display: inline-block;
  margin-left: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.peek-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.balance-secondary {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Wallet Actions */
.wallet-actions {
  display: flex;
  gap: var(--space-md);
  padding: 0 var(--space-lg) var(--space-lg);
}

.wallet-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wallet-action-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-primary);
}

.wallet-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wallet-action-btn span {
  font-size: 0.75rem;
}

/* Recent Transactions */
.wallet-recent {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--dropdown-border);
}

.recent-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 var(--space-md);
}

.recent-masked {
  padding: var(--space-lg);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.tx-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.tx-details {
  flex: 1;
  min-width: 0;
}

.tx-amount {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}

.tx-amount.incoming {
  color: var(--accent-success);
}

.tx-amount.outgoing {
  color: var(--accent-danger);
}

.tx-party {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-time {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

/* Flyout Footer */
.flyout-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--dropdown-border);
  text-align: center;
}

.view-all-link {
  font-size: 0.875rem;
  color: var(--accent-primary);
  text-decoration: none;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   NOTIFICATION FLYOUT
   ========================================================================== */

.notification-flyout {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  width: var(--flyout-width);
  max-height: 480px;
  background: var(--flyout-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
  overflow: hidden;
  z-index: var(--z-flyout);
  
  /* Animation */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-normal);
}

.notification-flyout.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mark-all-read {
  padding: var(--space-xs) var(--space-sm);
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--accent-primary);
  cursor: pointer;
}

.mark-all-read:hover {
  text-decoration: underline;
}

/* Notification List */
.notification-list {
  max-height: 380px;
  overflow-y: auto;
}

.notification-group {
  padding: var(--space-xs) 0;
}

.group-date {
  display: block;
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
  background: rgba(74, 144, 226, 0.08);
}

.notification-item.unread:hover {
  background: rgba(74, 144, 226, 0.12);
}

.notification-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.notification-icon.transaction {
  background: rgba(16, 185, 129, 0.2);
}

.notification-icon.message {
  background: rgba(74, 144, 226, 0.2);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.notification-time {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PIN MODAL
   ========================================================================== */

.pin-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-modal);
  
  /* Animation */
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.pin-modal:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.pin-modal-content {
  width: 320px;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  
  /* Animation */
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.pin-modal:not([hidden]) .pin-modal-content {
  transform: scale(1);
}

.pin-modal h3 {
  margin: 0 0 var(--space-lg);
  font-size: 1.125rem;
  color: var(--text-primary);
}

.pin-input-group {
  margin-bottom: var(--space-lg);
}

.pin-input {
  width: 100%;
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.5em;
  color: var(--text-primary);
}

.pin-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.pin-actions {
  display: flex;
  gap: var(--space-md);
}

.pin-cancel,
.pin-submit {
  flex: 1;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pin-cancel {
  background: transparent;
  border: 1px solid var(--dropdown-border);
  color: var(--text-secondary);
}

.pin-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.pin-submit {
  background: var(--accent-primary);
  border: none;
  color: white;
}

.pin-submit:hover {
  opacity: 0.9;
}

.pin-biometric {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--dropdown-border);
}

.pin-biometric button {
  background: transparent;
  border: none;
  color: var(--accent-primary);
  font-size: 0.875rem;
  cursor: pointer;
}

.pin-biometric button:hover {
  text-decoration: underline;
}

/* ==========================================================================
   MOBILE DRAWER
   ========================================================================== */

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  
  /* Animation */
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.mobile-drawer:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 360px;
  background: var(--dropdown-bg);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  overflow-y: auto;
}

.mobile-drawer:not([hidden]) .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--dropdown-border);
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.drawer-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.drawer-close:hover {
  color: var(--text-primary);
}

.drawer-body {
  padding: var(--space-md) 0;
}

/* ==========================================================================
   AUTH BUTTONS (for unauthenticated users)
   ========================================================================== */

.auth-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.auth-buttons.hidden {
  display: none;
}

.btn-signup {
  background: var(--hub-gradient, linear-gradient(135deg, #3B82F6, #2563EB));
  color: white;
  border: none;
  padding: var(--space-sm) 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px var(--hub-glow, rgba(59, 130, 246, 0.3));
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}

.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--hub-glow, rgba(59, 130, 246, 0.3));
}

.btn-login {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: var(--space-sm) 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.btn-login:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   NAVIGATION CONTAINER
   ========================================================================== */

.nav-container {
  display: flex;
  align-items: flex-end;
  gap: var(--space-xs);
}

/* Profile Nav (for profile pages) */
.profile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.profile-name-header {
  color: #ffffff;
  font-family: 'Comfortaa', sans-serif;
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  line-height: 1;
  text-decoration: none;
}

.profile-title-header {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.profile-name-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.profile-breadcrumb-chain {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.profile-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
}

/* Portal secondary — matches hub-scope-name for division/portal breadcrumbs */
.portal-scope-name {
  font-family: 'Comfortaa', sans-serif;
  font-size: 18px;
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.portal-scope-name:hover {
  color: rgba(255, 255, 255, 0.9);
}

.profile-nav-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.profile-nav-title--inline {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.profile-nav-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.profile-nav-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
}

.profile-hub-inline {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.profile-company-header {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}

.profile-nav-dept {
  font-size: 11px;
}

.pocket-sort-toggle {
  display: flex;
  align-items: center;
  padding: 4px 12px 6px;
  gap: 4px;
}

.pocket-sort-option {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pocket-sort-option.active {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.pocket-sort-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

/* Place Nav (for hub/place pages) */
.place-nav {
  display: flex;
  align-items: flex-end;
  position: relative;
}

.place-name {
  color: var(--text-primary, #fff);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: default;
  line-height: 1;
}

/* Hub name promoted to primary header position — Comfortaa, matches profile-name-header scale */
/* Higher specificity (.hub-nav parent) ensures lowercase wins over .hub-name uppercase */
.hub-nav .hub-name--primary {
  font-family: 'Comfortaa', sans-serif;
  font-size: 24px;
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: #ffffff;
  line-height: 1;
  padding: 0;
  background: none;
  text-decoration: none;
}

.hub-nav .hub-name--primary:hover {
  color: rgba(255, 255, 255, 0.8);
  background: none;
  text-decoration: none;
}

/* Entity name in secondary position (place name or profile display name) */
.hub-scope-name {
  font-family: 'Comfortaa', sans-serif;
  font-size: 18px;
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 10px;
}

.hub-scope-name:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* Profile title / descriptor in tertiary position (personal/corporate hubs) */
.hub-scope-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
}

/* Hub Nav */
.hub-nav {
  display: flex;
  align-items: flex-end;
  position: relative;
}

.hub-name {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-sm);
  line-height: 1;
}

.hub-name:hover {
  color: var(--hub-primary, var(--accent-primary));
  background: rgba(255, 255, 255, 0.05);
}

.hub-dropdown-arrow {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: var(--space-xs);
  transition: transform 0.2s;
  align-self: center;
}

.hub-nav:hover .hub-dropdown-arrow {
  color: var(--hub-primary, var(--accent-primary));
}

.hub-nav.expanded .hub-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--hub-primary, var(--accent-primary));
}

/* Geo Chain Breadcrumb Dropdown */
.geo-chain-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.geo-chain-trigger {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: var(--text-muted, #808090);
  font-family: 'Comfortaa', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 4px;
  border-radius: var(--radius-sm, 4px);
  transition: color 0.15s;
  user-select: none;
}

.geo-chain-trigger:hover {
  color: var(--text-primary, #fff);
}

.geo-chain-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
}

.geo-chain-wrap.expanded .geo-chain-arrow {
  transform: rotate(180deg);
}

.geo-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--dropdown-bg, var(--bg-dropdown, #252538));
  border: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
  border-radius: var(--radius-md, 8px);
  min-width: 150px;
  box-shadow: var(--shadow-dropdown, 0 10px 40px rgba(0,0,0,0.3));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.15s ease;
  z-index: var(--z-dropdown, 200);
  padding: var(--space-xs) 0;
}

.geo-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.geo-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px var(--space-lg, 16px);
  color: var(--text-secondary, #d0d0d0);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.1s;
}

a.geo-dropdown-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary, #fff);
}

.geo-dropdown-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted, #808090);
  min-width: 1.8em;
  text-transform: uppercase;
}

.geo-dropdown-name {
  color: inherit;
}

/* Hub Dropdown Panel */
.hub-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: var(--dropdown-bg, var(--bg-dropdown, #252538));
  border: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
  border-radius: var(--radius-md, 8px);
  min-width: 200px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: var(--shadow-dropdown, 0 10px 40px rgba(0, 0, 0, 0.3));
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: var(--z-dropdown, 200);
  padding: var(--space-sm) 0;
}

.hub-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hub-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: var(--dropdown-bg, var(--bg-dropdown, #252538));
  border-left: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
  border-top: 1px solid var(--dropdown-border, var(--border-dark, #3d3d5c));
  transform: rotate(45deg);
}

.hub-dropdown-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted, #808090);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-sm) var(--space-lg) var(--space-xs);
  margin-top: var(--space-xs);
}

.hub-dropdown-section-label:first-child {
  margin-top: 0;
}

.hub-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  color: var(--text-secondary, #d0d0d0);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.15s;
  cursor: pointer;
}

.hub-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary, #fff);
}

.hub-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--hub-primary, var(--accent-primary));
}

.hub-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

.hub-item.active .hub-item-dot {
  opacity: 1;
  background: var(--hub-primary, var(--accent-primary));
}

.hub-item-name {
  font-weight: 500;
  flex-shrink: 0;
}

.hub-item-desc {
  font-size: 11px;
  color: var(--text-muted, #808090);
  margin-left: auto;
}

/* ==========================================================================
   USER CONTEXT (logged in state)
   ========================================================================== */

.user-context {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
  position: relative;
}

/* Vertical separator between utility icons and UMA identity cluster */
.user-context::before {
  content: '';
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
  margin-right: 2px;
}

.user-context:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-mini-pocket {
  width: 24px;
  height: 28px;
  opacity: 0.8;
  transition: opacity 0.2s;
  transform: translateY(-2px);
}

.user-context:hover .user-mini-pocket {
  opacity: 1;
}

.user-persona-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.user-persona-name {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 500;
}

.user-persona-handle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 400;
}

/* ==========================================================================
   USER DROPDOWN
   ========================================================================== */

.user-dropdown-ctx {
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--border-color);
}

.user-dropdown-ctx-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.user-dropdown-ctx-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: #ffffff;
}

.user-dropdown-ctx-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-dropdown-ctx-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-dropdown-ctx-all .user-dropdown-ctx-name {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.user-dropdown-identity-list {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

/* pocket-viewed-banner inside user dropdown */
.user-dropdown .pocket-viewed-banner {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 0;
}

.user-dropdown {
  position: fixed;
  top: var(--header-height);
  left: auto;
  right: 65px;
  background: var(--dropdown-bg);
  border: 1px solid var(--dropdown-border);
  border-top: none;
  border-radius: 0;
  min-width: 300px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: var(--shadow-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: var(--z-dropdown);
}

.user-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Current Profile Display at top of dropdown */
.user-dropdown-current-profile {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--dropdown-border);
  background: rgba(74, 144, 226, 0.08);
}

.user-dropdown-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 4px;
}

.user-dropdown-current-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-dropdown-current-name {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.user-dropdown-current-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.user-dropdown-section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.user-dropdown-section:last-child {
  border-bottom: none;
}

.user-dropdown-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-lg);
  cursor: pointer;
}

.user-dropdown-nav-ctx {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-dropdown-nav-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.user-dropdown-nav-title {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-dropdown-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.user-dropdown-add-link {
  font-size: 11px;
  color: var(--accent-primary);
  text-decoration: none;
}

.user-dropdown-add-link:hover {
  text-decoration: underline;
}

.user-dropdown-section-toggle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s;
}

.user-dropdown-section.open .user-dropdown-section-toggle {
  transform: rotate(180deg);
}

.user-dropdown-section-content {
  display: none;
  padding-bottom: var(--space-sm);
  background: rgba(255, 255, 255, 0.04);
}

.user-dropdown-section.open > .user-dropdown-section-content {
  display: block;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-lg);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  font-size: 13px;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.user-dropdown-item.active {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown-item-icon {
  width: 20px;
  margin-right: var(--space-sm);
  font-size: 14px;
  text-align: center;
}

.user-dropdown-item-desc {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.user-dropdown-add-item {
  color: rgba(255, 255, 255, 0.7);
  opacity: 0.8;
}

.user-dropdown-add-item:hover {
  opacity: 1;
  color: var(--accent-primary);
}

/* Profile row with edit icon */
.user-dropdown-item-row {
  display: flex;
  align-items: center;
  position: relative;
}

.user-dropdown-item-row.active {
  background: rgba(74, 144, 226, 0.12);
  border: 2px solid var(--accent-primary, #4A90E2);
  border-radius: var(--radius-sm, 4px);
  margin: 2px var(--space-sm);
}

.user-dropdown-item-row .user-dropdown-item-main {
  flex: 1;
  min-width: 0;
}

.user-dropdown-edit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: var(--space-sm);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.15s;
}

.user-dropdown-item-row:hover .user-dropdown-edit-icon {
  opacity: 0.7;
}

.user-dropdown-edit-icon:hover {
  opacity: 1 !important;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-primary);
}

/* User dropdown subsections (nested accordion) */
.user-dropdown-subsection-header {
  position: relative;
  cursor: pointer;
}

.user-dropdown-subsection-toggle {
  margin-left: auto;
  font-size: 8px;
  transition: transform 0.2s;
}

.user-dropdown-subsection-header.expanded .user-dropdown-subsection-toggle {
  transform: rotate(180deg);
}

.user-dropdown-subsection-content {
  display: none;
  padding-left: var(--space-md);
}

.user-dropdown-subsection-header.expanded + .user-dropdown-subsection-content {
  display: block;
}

.user-dropdown-subitem {
  padding-left: var(--space-lg);
  font-size: 12px;
}

.user-dropdown-footer {
  padding-top: var(--space-xs);
}

.user-dropdown-logout {
  color: var(--accent-danger) !important;
}

/* ==========================================================================
   PERSONA DROPDOWN (identity/profile switcher - triggered by name click)
   ========================================================================== */

#personaDropdown {
  position: fixed;
  top: var(--header-height);
  right: 65px;
  width: 260px;
  max-height: calc(100vh - var(--header-height) - 40px);
  overflow-y: auto;
  background: var(--dropdown-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--dropdown-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

#personaDropdown.visible {
  opacity: 1;
  pointer-events: auto;
}

.user-persona-info {
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  padding: 2px 4px;
  transition: background 0.15s;
}

.user-persona-info:hover {
  background: rgba(255, 255, 255, 0.12);
}

.user-mini-pocket {
  cursor: pointer;
  border-radius: 4px;
  padding: 2px;
  transition: background 0.15s;
}

.user-mini-pocket:hover {
  background: rgba(255, 255, 255, 0.15);
}

.persona-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--dropdown-bg, #1a1a2e);
  border: 1px solid var(--dropdown-border, rgba(255,255,255,0.12));
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: var(--z-dropdown, 1100);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  overflow: hidden;
}

.persona-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.persona-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  width: 10px;
  height: 10px;
  background: var(--dropdown-bg, #1a1a2e);
  border-left: 1px solid var(--dropdown-border, rgba(255,255,255,0.12));
  border-top: 1px solid var(--dropdown-border, rgba(255,255,255,0.12));
  transform: rotate(45deg);
}

.persona-dropdown-header {
  padding: 8px 14px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}

.persona-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.12s;
}

.persona-dropdown-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}

.persona-dropdown-item.active {
  background: rgba(255,255,255,0.06);
  color: white;
}

.persona-dropdown-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.persona-dropdown-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(200, 205, 215, 0.4);
  flex-shrink: 0;
}

.persona-dropdown-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.persona-dropdown-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
  text-align: right;
  flex-shrink: 0;
}

.persona-dropdown-check {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  flex-shrink: 0;
}

/* ALL personas row — always at top of persona dropdown */
.persona-dropdown-all-row {
}

.persona-dropdown-all-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-right: 6px;
}

.persona-dropdown-all-row.active .persona-dropdown-all-label {
  color: rgba(255,255,255,0.85);
}

/* User initials avatar circle — shown in header (ALL mode) and persona dropdown */
.user-initials-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #2a2d36;
  border: 1px solid rgba(200, 205, 215, 0.6);
  color: #d4d8dc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  user-select: none;
}

/* Avatar button — far-right anchor in UMA block */
.user-avatar-btn {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 4px;
}
.user-avatar-btn .user-initials-avatar {
  width: 26px;
  height: 26px;
  font-size: 11px;
}
.user-avatar-btn img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.user-avatar-btn:hover .user-initials-avatar {
  border-color: rgba(200, 205, 215, 0.9);
}
.user-avatar-btn:hover img {
  opacity: 0.85;
}

/* Smaller variant for inside the dropdown */
.user-initials-avatar--sm {
  width: 22px;
  height: 22px;
  font-size: 10px;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   NOTIFICATION BELL
   ========================================================================== */

.notification-bell {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.notification-bell:hover {
  background: rgba(255, 255, 255, 0.1);
}

.bell-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #9CA3AF);
}

/* Bell icon SVG states */
.bell-icon .bell-outline {
  display: block;
}

.bell-icon .bell-filled {
  display: none;
}

/* When notifications are pending - show filled, colored bell */
.notification-bell.has-notifications .bell-icon {
  color: var(--hub-primary, #F59E0B);
}

.notification-bell.has-notifications .bell-icon .bell-outline {
  display: none;
}

.notification-bell.has-notifications .bell-icon .bell-filled {
  display: block;
}

.notification-flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--dropdown-border);
}

.notification-flyout-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mark-all-read-btn {
  padding: var(--space-xs) var(--space-sm);
  background: transparent;
  border: none;
  font-size: 0.75rem;
  color: var(--accent-primary);
  cursor: pointer;
}

.mark-all-read-btn:hover {
  text-decoration: underline;
}

.notification-flyout-list {
  max-height: 380px;
  overflow-y: auto;
}

.notification-flyout-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  transition: background 0.15s;
  cursor: pointer;
}

.notification-flyout-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notification-flyout-item.unread {
  background: rgba(74, 144, 226, 0.08);
}

.notification-flyout-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.notification-flyout-content {
  flex: 1;
  min-width: 0;
}

.notification-flyout-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.notification-flyout-time {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
}

.notification-flyout-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.notification-accept-btn,
.notification-reject-btn {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.notification-accept-btn {
  background: var(--accent-success);
  color: white;
}

.notification-reject-btn {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.notification-flyout-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-2xl);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.notification-flyout-empty-icon {
  font-size: 2rem;
  opacity: 0.5;
}

.notification-flyout-footer {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--dropdown-border);
  text-align: center;
}

.notification-flyout-footer a {
  font-size: 0.875rem;
  color: var(--accent-primary);
  text-decoration: none;
}

.notification-flyout-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   HEADER ICON BUTTONS
   ========================================================================== */

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  /* button reset */
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.header-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.header-nav-icon {
  color: rgba(255,255,255,0.55);
}

.header-nav-icon:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.10);
}

.zipper-toggle img {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.zipper-toggle:hover img {
  opacity: 1;
}

/* Hamburger menu (mobile) */
.hamburger-menu {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.hamburger-menu:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hamburger-menu svg {
  width: 20px;
  height: 20px;
  color: var(--text-primary);
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* Tablet */
@media (max-width: 1199px) {
  .breadcrumb-nav {
    max-width: 220px;
  }
  
  .hub-description {
    display: none;
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --header-height: 56px;
    --avatar-size: 32px;
  }

  .header-left .breadcrumb-nav {
    display: none;
  }

  .header-center {
    display: none;
  }

  .wallet-balance {
    display: none;
  }

  /* User context has priority visibility on mobile */
  .header-right {
    gap: var(--space-sm);
  }

  .user-context {
    order: -1;  /* Move to front */
    flex-shrink: 0;
  }

  .user-persona-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-persona-handle {
    display: none;
  }

  /* Hide non-essential header buttons on small mobile */
  .header-btn:not(.notification-btn):not(.wallet-btn) {
    display: none;
  }

  .avatar-dropdown,
  .wallet-flyout,
  .notification-flyout {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--dropdown-border);
  }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .avatar-dropdown,
  .wallet-flyout,
  .notification-flyout,
  .pin-modal-content {
    border-width: 2px;
  }
  
  .dropdown-item:focus-visible {
    outline-width: 3px;
  }
}

/* Print styles */
/* ADMINISTRATOR: separator in PROFILES section */
.user-dropdown-admin-header {
  display: none;
  padding: 8px 16px 2px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
}

/* Only show the label when at least one corporate row follows it */
.user-dropdown-admin-header:has(~ .user-dropdown-corporate-row) {
  display: block;
}

.persona-dropdown-heading {
  display: block;
  padding: 10px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pocket-section-label {
  display: block;
  padding: 8px 16px 2px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.50);
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ==========================================================================
   POCKET NAVIGATING AS SECTION — identity/persona switcher
   ========================================================================== */

.pocket-identity-item {
  gap: 8px;
}

/* Department row: main link fills available space, edit icon sits on right */
.pocket-identity-row {
  display: flex;
  align-items: center;
  padding: 0;
}

.pocket-identity-row .pocket-identity-main-link {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
}

.pocket-identity-row .pocket-identity-main-link:hover {
  background: rgba(255,255,255,0.07);
}

.pocket-dept-edit-btn {
  flex-shrink: 0;
  padding: 6px 7px;
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
  line-height: 1;
}

.pocket-dept-edit-btn:hover {
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.08);
}

.pocket-dept-group-label {
  padding: 8px 12px 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.pocket-dept-code {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.28);
  padding: 2px 5px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  margin-right: 2px;
  align-self: center;
}

/* × remove-from-list button — semantic partner to pencil edit btn.
   Rule: pencil = edit content, × = remove item from a list. */
.pocket-remove-btn {
  flex-shrink: 0;
  padding: 4px 7px;
  color: rgba(255,255,255,0.3);
  background: none;
  border: none;
  font-size: 14px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
}

.pocket-remove-btn:hover {
  color: #f87171;
  background: rgba(248,113,113,0.12);
}

.pocket-create-item {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
}

.pocket-create-item:hover {
  color: rgba(255,255,255,0.85);
}

.pocket-identity-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(200, 205, 215, 0.4);
  object-fit: cover;
  flex-shrink: 0;
}

.pocket-identity-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.75);
  font-size: 10px;
  font-weight: 600;
}

.pocket-identity-avatar--square {
  border-radius: 4px;
}

.pocket-identity-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.pocket-identity-info {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.pocket-identity-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.pocket-identity-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  flex-shrink: 0;
}

.pocket-identity-check {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  flex-shrink: 0;
}

.pocket-identity-all-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  margin-right: 6px;
}

.pocket-identity-item.active .pocket-identity-all-label {
  color: rgba(255, 255, 255, 0.85);
}

/* Pocket context banner — leaf-first hierarchy (most specific → parent context) */
.pocket-viewed-banner {
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pocket-viewed-content {
  flex: 1;
  min-width: 0;
}

.pocket-gso-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.28);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.pocket-gso-icon:hover {
  color: rgba(255,255,255,0.80);
  background: rgba(255,255,255,0.08);
}
.gso-info-i {
  color: rgba(255,255,255,0.72);
  transition: color 0.15s;
}
.pocket-gso-icon:hover .gso-info-i {
  color: rgba(255,255,255,1.0);
}

.pocket-gso-icon--active {
  color: rgba(255,255,255,0.88);
  background: rgba(255,255,255,0.09);
}

/* UMA toggle pair: profile icon + spyglass icon side by side in banner */
.uma-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Primary row: the profile being viewed — large, white */
.pocket-viewed-primary {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
  text-decoration: none;
}
a.pocket-viewed-primary:hover { text-decoration: underline; }
/* Secondary row: parent context(s) — small, muted, inline */
.pocket-viewed-secondary {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 1px;
  min-width: 0;
  flex-wrap: nowrap;
}
/* Company / org name in secondary row */
.pocket-viewed-parent {
  font-family: 'Comfortaa', sans-serif;
  font-size: 12px;
  font-weight: 300;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}
.pocket-viewed-parent:hover { color: #4A90E2; text-decoration: underline; }
/* Dept name in secondary row: ALL-CAPS, sized to x-height of company lowercase */
.pocket-viewed-dept {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.pocket-viewed-dept:hover { color: #4A90E2; text-decoration: underline; }

@media print {
  .pocits-header,
  .avatar-dropdown,
  .wallet-flyout,
  .notification-flyout,
  .pin-modal,
  .mobile-drawer {
    display: none !important;
  }
}

/* ==========================================================================
   COMPASS + SEARCH DROPDOWNS
   ========================================================================== */

/* ── Shared base for both dropdowns ── */
.compass-dropdown,
.search-dropdown {
  position: fixed;
  top: var(--header-height);   /* overridden by syncDropdownTops() */
  right: 0;
  width: 320px;
  background: var(--dropdown-bg, #252538);
  border: 1px solid var(--dropdown-border, #3d3d5c);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-dropdown, 0 10px 40px rgba(0,0,0,0.3));
  z-index: var(--z-dropdown, 200);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  overflow-y: auto;
  max-height: calc(100vh - var(--header-height));
}

.compass-dropdown.visible,
.search-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Compass dropdown internals ── */
.compass-dropdown-header {
  padding: 10px 16px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.compass-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: rgba(255,255,255,0.80);
  font-size: 13px;
  transition: background 0.12s, color 0.12s;
}

.compass-nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.compass-nav-back {
  color: rgba(255,255,255,0.45);
  font-size: 13px;
  /* button reset */
  background: transparent;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.compass-nav-back:hover {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.80);
}

.compass-nav-back-text {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}

.compass-nav-back-sub {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.28);
}

.compass-nav-home {
  color: rgba(255,255,255,0.60);
  font-size: 12px;
}

.compass-nav-svg {
  flex-shrink: 0;
  opacity: 0.50;
}

.compass-nav-home:hover .compass-nav-svg {
  opacity: 0.80;
}

.compass-nav-arrow {
  font-size: 12px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.35);
}

.compass-nav-current .compass-nav-arrow {
  color: rgba(255,255,255,0.75);
}

.compass-nav-current {
  color: #fff;
  font-weight: 600;
}

.compass-nav-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compass-nav-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.28);
  flex-shrink: 0;
}

.compass-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.compass-nav-placeholder {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
}

.compass-nav-placeholder-name {
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}

.compass-nav-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.28);
}

.compass-nav-pete {
  cursor: pointer;
}
.compass-pete-icon {
  font-size: 13px;
  flex-shrink: 0;
}
.compass-nav-pete-label {
  font-size: 11px !important;
  color: rgba(255,255,255,0.35) !important;
  font-weight: 400 !important;
}
.compass-nav-pete:hover .compass-nav-pete-label {
  color: rgba(255,255,255,0.65) !important;
}

/* ── Search dropdown internals ── */
.search-dropdown-form {
  padding: 12px 14px 10px;
}

.search-dropdown-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: border-color 0.18s;
}

.search-dropdown-input-wrap:focus-within {
  border-color: rgba(255,255,255,0.25);
}

.search-dropdown-icon {
  flex-shrink: 0;
  color: rgba(255,255,255,0.35);
}

.search-dropdown-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  min-width: 0;
}

.search-dropdown-input::placeholder {
  color: rgba(255,255,255,0.28);
}

.search-dropdown-hint {
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  text-align: center;
}

/* ── Mobile fullscreen for all panel dropdowns ── */
@media (max-width: 768px) {
  .compass-dropdown,
  .search-dropdown,
  .user-dropdown,
  .persona-dropdown {
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100vh - var(--header-height)) !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    transform: translateY(-8px);
  }

  .compass-dropdown.visible,
  .search-dropdown.visible,
  .user-dropdown.visible,
  .persona-dropdown.visible {
    transform: translateY(0) !important;
  }
}

/* ── Scroll anchor offset — accounts for fixed header + accent bar ───────────
   Any element used as a scroll-to target on portal/hub pages gets this offset
   so it isn't hidden under the chrome when scrollIntoView() or #anchor is used.
   New portals inherit this automatically — no per-page fix needed.          */
.portal-about-zone,
[id="aboutZone"] {
  scroll-margin-top: var(--chrome-height, 88px);
}

/* ── Places pocket menu ──────────────────────────────────────────────────── */

/* Inline search field */
.pocket-place-search {
  padding: 4px 8px 6px;
}
.pocket-place-search-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
}
.pocket-place-search-input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}
.pocket-place-search-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

/* County anchor link — primary navigable place in Your Area */
.pocket-place-county-link {
  font-weight: 600;
  color: var(--accent-primary, #4A90E2);
}

/* Greyed place items that are still interactive (Pete tip trigger) */
.pocket-place-pending {
  pointer-events: auto !important;
  cursor: pointer;
  opacity: 0.48;
}
.pocket-place-pending:hover {
  opacity: 0.72;
  background: rgba(255, 255, 255, 0.04);
}

/* Pete bot badge — small indicator that a tip is available */
.pocket-pete-badge {
  margin-left: auto;
  font-size: 11px;
  flex-shrink: 0;
}

/* Pete tip block — appears inline below the greyed item on click */
.pocket-pete-tip {
  display: none;
  margin: 2px 8px 6px 8px;
  padding: 8px 10px;
  background: rgba(99, 102, 241, 0.08);
  border-left: 2px solid rgba(99, 102, 241, 0.4);
  border-radius: 0 var(--radius-sm, 4px) var(--radius-sm, 4px) 0;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}
.pocket-pete-tip.visible {
  display: block;
}
.pocket-pete-tip p {
  margin: 0 0 5px;
}
.pocket-pete-tip--sub {
  margin-left: 28px;
}
.pocket-pete-cta {
  display: inline-block;
  color: var(--accent-primary, #4A90E2);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.pocket-pete-cta:hover {
  text-decoration: underline;
}

/* Active county leaf in Browse hierarchy — green tint, checkmark row */
.pocket-place-active-leaf {
  color: rgba(74, 222, 128, 0.85);
  font-size: 11px;
}

/* ── Shared portal/place scroll cue ─────────────────────────────────────── */
.portal-scroll-cue {
  position: absolute;
  bottom: 60px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  cursor: pointer; transition: opacity 0.3s;
  z-index: 10;
}
.portal-scroll-cue:hover { opacity: 0.7; }
.portal-scroll-cue .scroll-cue-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.50);
}
.portal-scroll-cue .scroll-cue-arrow {
  width: 26px; height: 26px;
  border: 1.5px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: portalScrollBounce 2s ease-in-out infinite;
}
@keyframes portalScrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

/* ── Shared portal search bar ────────────────────────────────────────────── */
/* Usage: <div class="pp-search-bar" style="--pp-accent-rgb: R,G,B; --pp-btn-bg: #hex;">  */
.pp-search-bar {
  width: 100%; max-width: 600px; margin: 0 auto 2rem;
  background: rgba(0,0,0,0.38); padding: 16px 18px;
  border-radius: 12px; border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.pp-search-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pp-search-tab {
  padding: 7px 16px; background: rgba(0,0,0,0.30) !important;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 999px;
  color: rgba(255,255,255,0.60); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.18s;
}
.pp-search-tab.active, .pp-search-tab:hover {
  background: rgba(var(--pp-accent-rgb, 180,180,180), 0.15) !important;
  border-color: rgba(var(--pp-accent-rgb, 180,180,180), 0.55); color: #fff;
}
.pp-search-input-row { display: flex; gap: 8px; }
.pp-search-input {
  flex: 1; padding: 14px 20px;
  background: rgba(0,0,0,0.42) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  border-radius: 8px; color: #fff; font-size: 15px;
  outline: none; transition: border-color 0.2s;
}
.pp-search-input::placeholder { color: rgba(255,255,255,0.30); }
.pp-search-input:focus { border-color: rgba(var(--pp-accent-rgb, 180,180,180), 0.55) !important; }
.pp-search-btn {
  padding: 14px 26px; background: var(--pp-btn-bg, #94a3b8);
  color: #080c10; font-weight: 700; font-size: 14px;
  border: none; border-radius: 8px; cursor: pointer;
  white-space: nowrap; transition: opacity 0.2s;
}
.pp-search-btn:hover { opacity: 0.85; }

/* ==========================================================================
   SHARED PORTAL FOOTER
   Used by place_landing.html and any portal without portal-specific footer CSS
   ========================================================================== */
.portal-footer {
  background: #080c10;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 24px 24px;
  position: relative; z-index: 10;
}
.portal-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px 48px; align-items: start;
}
.portal-footer-brand {
  font-family: 'Comfortaa', sans-serif;
  font-size: 1.3rem; font-weight: 300; color: #fff; margin-bottom: 6px;
}
.portal-footer-brand em { font-style: normal; color: rgba(184,200,212,0.65); }
.portal-footer-tagline {
  font-size: 0.82rem; color: rgba(255,255,255,0.35); line-height: 1.6;
}
.portal-footer-nav {
  display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center;
}
.portal-footer-nav a {
  font-size: 0.78rem; color: rgba(255,255,255,0.40);
  text-decoration: none; transition: color 0.2s; white-space: nowrap;
}
.portal-footer-nav a:hover { color: rgba(255,255,255,0.80); }
.portal-footer-nav .pf-nav-div {
  width: 100%; height: 1px;
  background: rgba(255,255,255,0.06); margin: 6px 0;
}
.portal-footer-bottom {
  max-width: 1100px; margin: 28px auto 0;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px;
}
.portal-footer-copy { font-size: 0.74rem; color: rgba(122,138,150,0.45); }
@media (max-width: 600px) {
  .portal-footer-inner { grid-template-columns: 1fr; }
  .portal-footer-bottom { flex-direction: column; }
}

/* ── UMA Chat Panel ──────────────────────────────────────────────────── */
.uma-chat-btn { position: relative; }
.uma-chat-btn.uma-chat-open { color: #5b9fc4; }

.uma-chat-panel {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  max-height: 520px;
  background: #1a2535;
  border: 1px solid rgba(91,159,196,0.25);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9999;
  flex-direction: column;
  overflow: hidden;
}
.uma-chat-panel.uma-open { display: flex; }

.uma-chat-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 12px;
  background: #15202e;
  border-bottom: 1px solid rgba(91,159,196,0.15);
  flex-shrink: 0;
}
.uma-chat-title {
  font-size: 14px;
  font-weight: 600;
  color: #c8dce8;
  letter-spacing: 0.08em;
}
.uma-chat-tag {
  font-size: 11px;
  color: rgba(91,159,196,0.65);
  flex: 1;
}
.uma-chat-close {
  background: none;
  border: none;
  color: rgba(200,220,232,0.4);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.15s;
}
.uma-chat-close:hover { color: #c8dce8; }

.uma-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.uma-chat-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #c8dce8;
}
.uma-chat-message--system p { color: rgba(200,220,232,0.55); font-style: italic; }
.uma-chat-message--user {
  align-self: flex-end;
  background: rgba(91,159,196,0.18);
  border-radius: 8px 8px 2px 8px;
  padding: 8px 12px;
  max-width: 85%;
}
.uma-chat-message--user p { color: #ddeaf3; }
.uma-chat-message--uma {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  border-radius: 2px 8px 8px 8px;
  padding: 8px 12px;
  max-width: 85%;
}

.uma-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(91,159,196,0.12);
  background: #15202e;
  flex-shrink: 0;
}
.uma-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(91,159,196,0.2);
  border-radius: 6px;
  color: #c8dce8;
  font-size: 13px;
  padding: 8px 10px;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
}
.uma-chat-input::placeholder { color: rgba(200,220,232,0.3); }
.uma-chat-input:focus { outline: none; border-color: rgba(91,159,196,0.5); }
.uma-chat-send {
  background: #2d6a8f;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-end;
  height: 34px;
}
.uma-chat-send:hover { background: #3a7fa8; }

@media (max-width: 480px) {
  .uma-chat-panel { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}

/* ── Portal nav strip (shared partial) ── */
.pns-wrap { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); overflow-x: auto; margin-bottom: 2rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pns-wrap::-webkit-scrollbar { display: none; }
.pns-strip { display: flex; gap: 10px; padding: 4px 24px; width: max-content; margin: 0 auto; }
.pns-card { flex: 0 0 auto; width: 130px; background: rgba(6,8,18,0.82); border: 1px solid rgba(255,255,255,0.14); border-top: 2px solid var(--pns-accent, rgba(255,255,255,0.4)); border-radius: 8px; padding: 14px 12px 12px; text-decoration: none; display: flex; flex-direction: column; gap: 5px; transition: background 0.2s, transform 0.15s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pns-card:hover { background: rgba(6,8,18,0.92); transform: translateY(-2px); }
.pns-card--active { background: rgba(6,8,18,0.92); border-top-width: 3px; box-shadow: 0 0 0 1px var(--pns-accent, rgba(255,255,255,0.3)); }
.pns-name { font-family: 'Comfortaa', sans-serif; font-size: 0.78rem; font-weight: 300; color: rgba(255,255,255,0.88); white-space: nowrap; }
.pns-tag { font-size: 10px; line-height: 1.5; color: rgba(255,255,255,0.38); }
.pns-status { font-size: 8px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; align-self: flex-start; padding: 2px 5px; border-radius: 3px; }
.pns-status--live { background: rgba(16,185,129,0.12); color: rgba(52,211,153,0.75); border: 1px solid rgba(16,185,129,0.20); }
.pns-status--soon { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.25); border: 1px solid rgba(255,255,255,0.09); }

/* ── Hide portal search bars (no content yet) ── */
.pp-search-bar,
.pp-search-input-row,
.sm-search-input-row { display: none; }
