/* ===================================================================
   TRENDS FOR SALE (TFS) - GLOBAL NAVBAR & HEADER STYLES
   =================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.header-container {
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Branding */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-cyan-glow);
  position: relative;
  overflow: hidden;
}

.brand-logo-wrap svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.site-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Desktop Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-item {
  position: relative;
  padding-bottom: 8px;
  margin-bottom: -8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.nav-link.active {
  color: var(--accent-cyan);
}

.nav-link svg.chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
  stroke: currentColor;
}

.nav-item:hover .nav-link svg.chevron {
  transform: rotate(180deg);
}

/* Mega-dropdown Menu - Restricted strictly to Tools option */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  transform: translateY(6px);
  width: 330px;
  max-width: 90vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.4);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Invisible hover bridge restricted strictly to the Tools button width (not spanning navbar) */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -16px;
  right: 0;
  left: auto;
  width: 95px;
  height: 16px;
  background: transparent;
  pointer-events: none;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-item.has-dropdown:hover .dropdown-menu::before,
.nav-item:hover .dropdown-menu::before {
  pointer-events: auto;
}

.dropdown-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 4px 8px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border-subtle);
}

.dropdown-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.dropdown-card:hover {
  background: var(--border-subtle);
  transform: translateX(3px);
}

.dropdown-card-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-card-icon svg {
  width: 16px;
  height: 16px;
}

.dropdown-card-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-card-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* PWA Network Status Pill */
.network-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  user-select: none;
}

.network-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.network-pill.online .network-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.network-pill.offline {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.network-pill.offline .network-dot {
  background: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber);
}

/* Native PWA Install Button */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid rgba(0, 229, 255, 0.35);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pwa-install-btn:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(168, 85, 247, 0.25));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

.pwa-install-btn svg {
  width: 14px;
  height: 14px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.user-avatar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  transform: rotate(15deg);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hamburger for Mobile */
.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}

.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  right: -100%;
  width: 100%;
  max-width: 340px;
  height: calc(100vh - var(--header-height));
  background: var(--bg-surface);
  border-left: 1px solid var(--border-card);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: right var(--transition-normal);
  z-index: 999;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.brand-abbr {
  display: none;
}

@media (max-width: 992px) {
  .main-navigation .nav-links {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
}

/* Small Screens & Mobile: Tidy TFS Title */
@media (max-width: 640px) {
  .brand-full {
    display: none;
  }
  .brand-abbr {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }
  .site-tagline {
    display: none;
  }
  .header-container {
    padding: 0 14px;
    gap: 10px;
  }
  .header-actions {
    gap: 8px;
  }
  .network-pill .network-label {
    display: none;
  }
  .network-pill {
    padding: 6px;
  }
  .pwa-install-btn span {
    display: none;
  }
  .pwa-install-btn {
    padding: 6px 8px;
  }
  .btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

/* ===================================================================
   TFS USER PROFILE TRIGGER & SLIDE-OUT DRAWER ("SLIDER")
   =================================================================== */

.navbar-profile-slot {
  display: flex;
  align-items: center;
  position: relative;
}

.profile-trigger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-card);
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.profile-trigger-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  transform: translateY(-1px);
}

.profile-avatar-thumb {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 255, 0.08);
}

.profile-avatar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-thumb svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.profile-avatar-initial-sm {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  background: var(--gradient-brand);
}

.profile-status-indicator {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  background: var(--accent-emerald);
  box-shadow: 0 0 5px var(--accent-emerald);
  transition: background var(--transition-fast);
}

.profile-status-indicator.guest {
  background: #94a3b8;
  box-shadow: none;
}

/* Slide-out Drawer Backdrop */
.profile-slider-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1098;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.profile-slider-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Profile Slide-Out Drawer ("Slider") */
.profile-slider-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-card);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.55);
  z-index: 1099;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.profile-slider-drawer.open {
  right: 0;
}

/* Header within Drawer */
.profile-slider-header {
  padding: 20px 20px 18px;
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.08), transparent);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.profile-slider-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.slider-title-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.profile-slider-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.profile-slider-close:hover {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

.profile-slider-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.slider-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.slider-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  box-shadow: 0 0 16px var(--accent-cyan-glow);
}

.slider-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-avatar-large svg {
  width: 32px;
  height: 32px;
  color: var(--accent-cyan);
}

.slider-avatar-initial-lg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.6rem;
  color: #ffffff;
  background: var(--gradient-brand);
}

.slider-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--bg-surface);
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.slider-online-dot.guest {
  background: #94a3b8;
  box-shadow: none;
}

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

.slider-display-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slider-email-tag {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 7px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slider-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.slider-role-badge.guest {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.25);
}

/* Body / Navigation within Drawer */
.profile-slider-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-group-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 2px;
  padding-left: 4px;
}

.profile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.profile-nav-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-cyan);
  transform: translateX(3px);
}

.profile-nav-item.highlight {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(168, 85, 247, 0.08));
  border-color: rgba(0, 229, 255, 0.35);
}

.profile-nav-item.highlight:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(168, 85, 247, 0.16));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
}

.profile-nav-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.profile-nav-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

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

.profile-nav-title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.profile-nav-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-nav-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.profile-nav-item:hover .profile-nav-arrow {
  transform: translateX(3px);
  color: var(--accent-cyan);
}

/* Guest UI within Drawer */
.profile-guest-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-guest-notice {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.slider-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 14px var(--accent-cyan-glow);
  transition: all var(--transition-fast);
}

.slider-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px var(--accent-cyan-glow);
}

.slider-btn-primary svg {
  width: 16px;
  height: 16px;
}

.slider-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-btn-secondary:hover {
  background: rgba(0, 229, 255, 0.1);
  transform: translateY(-1px);
}

.slider-btn-secondary svg {
  width: 16px;
  height: 16px;
}

.slider-link-subtle {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.slider-link-subtle:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* Footer within Drawer */
.profile-slider-footer {
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.slider-logout-btn svg {
  width: 16px;
  height: 16px;
}

.slider-system-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.02em;
}


