/* ─── Top Navigation Bar ──────────────────────────────────────────────────── */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 24px;
  flex-shrink: 0;
}

/* ─── Brand / Logo ───────────────────────────────────────────────────────── */

.top-nav-left { flex-shrink: 0; }

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.top-nav-logo {
  height: 36px;
  width: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-brand-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-brand-badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(6,182,212,0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

.nav-brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Center Tab Links ───────────────────────────────────────────────────── */

.top-nav-center {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.top-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
  border: 1px solid transparent;
}

.top-nav-tab:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.top-nav-tab.active {
  color: var(--accent-cyan);
  background: rgba(6,182,212,0.12);
  border-color: rgba(6,182,212,0.25);
}

.nav-tab-icon {
  flex-shrink: 0;
}

.nav-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-cyan);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 9px;
}

.nav-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.nav-tab-dot.active {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16,185,129,0.6);
}

/* ─── Right Side ─────────────────────────────────────────────────────────── */

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-credits-label { color: var(--text-muted); }

.btn-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-sky));
  color: #000;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-btn);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-upgrade:hover {
  filter: brightness(1.1);
  box-shadow: var(--glow-cyan);
  color: #000;
}

.header-logout-form { display: inline; }

/* ─── Page Header (module title area) ───────────────────────────────────── */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header h1 { font-size: 1.5rem; }
.page-header p { color: var(--text-muted); font-size: 0.875rem; margin-top: 4px; }

/* ─── Hero Banner ────────────────────────────────────────────────────────── */

.hero-banner {
  background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(6,182,212,0.05) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 32px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-sky), transparent);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.hero-title .accent { color: var(--accent-cyan); }

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 16px;
    height: 56px;
  }
  .nav-brand-sub { display: none; }
  .top-nav-tab { padding: 6px 10px; font-size: 0.8rem; }
  .top-nav-tab span:not(.nav-tab-icon):not(.nav-tab-badge):not(.nav-tab-dot) { display: none; }
  .hero-title { font-size: 1.5rem; }
  .hero-banner { padding: 24px 20px; }
}
