/* --- PROFESSIONAL RESPONSIVE TOPBAR --- */
.topbar-container {
  height: var(--topbar-height);
  margin: 12px 12px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
  border: 1px solid var(--card-border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  z-index: 900;
  border-radius: 10px;
  flex-shrink: 0;
  min-width: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-snappy);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.nav-btn.home {
  background: var(--accent-cyan-soft);
  border-color: transparent;
  color: var(--accent-cyan);
}

.nav-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text-primary);
}

.search-wrap {
  position: relative;
  flex-shrink: 1;
  width: clamp(160px, 20vw, 280px);
}

.search-wrap input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 7px 10px 7px 34px;
  color: var(--text-primary);
  font-size: 0.8rem;
  outline: none;
  transition: var(--transition-snappy);
}

.search-wrap input:focus {
  border-color: var(--accent-cyan);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-cyan-soft);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.clock-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.clock-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.notification-bell {
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
  padding: 4px;
}

.notification-bell:hover { color: var(--text-primary); }

.bell-badge {
  position: absolute;
  top: 0px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  background: var(--alert-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid #fff;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 10px;
  transition: var(--transition-snappy);
  border: 1px solid transparent;
}

.user-profile:hover {
  background: #f8fafc;
  border-color: var(--card-border);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-btn span { display: none; }
  .clock-wrap { display: none; }
  .search-wrap { width: 180px; }
}

@media (max-width: 768px) {
  .topbar-container { margin: 8px 8px 0; padding: 0 12px; }
  .search-wrap { display: none; }
  .user-info { display: none; }
  .nav-actions { gap: 4px; }
  .topbar-right { gap: 12px; }
}

@media (max-width: 480px) {
  .nav-actions { display: none; }
}
