/**
 * @fileoverview App Header & Tab Navigation (Modern Luxury)
 */

.app-header {
  background: var(--wine-900);
  border-bottom: 2px solid var(--gold-500);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Elegant Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.brand-icon-wrapper {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wine-900);
  box-shadow: 0 4px 12px rgba(201, 169, 110, 0.3);
}

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

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-400);
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-top: 2px;
}

/* Luxury Pill Navigation */
.tab-nav {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: var(--radius-full);
  gap: 4px;
  border: 1px solid rgba(201, 169, 110, 0.2);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.tab-btn.active {
  color: var(--wine-900);
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  box-shadow: 0 4px 12px rgba(201, 169, 110, 0.2);
}

.tab-btn i, .tab-btn svg {
  width: 16px;
  height: 16px;
}

/* Header User Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* User Menu Dropdown trigger */
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  color: var(--white);
  font-weight: 600;
  font-size: 0.85rem;
}
.user-menu-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold-400);
}
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gold-500);
  color: var(--wine-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(201,169,110,0.3);
  color: var(--gold-400);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Tab Content Transitions */
.tab-content {
  display: none;
  animation: tabFadeIn 0.4s var(--ease-spring);
}

.tab-content.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }

  .tab-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wine-900);
    border-bottom: 2px solid var(--gold-500);
    border-radius: 0;
    padding: var(--space-4);
    flex-direction: column;
    box-shadow: var(--shadow-lg);
  }

  .tab-nav.open {
    display: flex;
  }

  .tab-btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
  }
  
  .tab-btn.active {
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  }
}
