/* ============================================================
   Shared Circloud header — single source of truth across all projects.
   Mirrors circloud/gui-common/static/css/base.css header rules.
   Sync this file across projects to keep headers identical.
   ============================================================ */

:root {
  --app-header-height: 52px;
  --header-height: 52px;
}

/* Header container — works with both <header> and .app-header */
header,
.app-header {
  background: var(--header-bg, rgba(12, 15, 34, 0.86));
  color: var(--header-color, #ffffff);
  padding: 1px 10px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  box-shadow: var(--shadow, 0 4px 24px rgba(0, 0, 0, 0.4));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  height: var(--app-header-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
  box-sizing: border-box;
}

.header-content {
  max-width: none;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.header-meta {
  font-size: 0.72rem;
  color: var(--text-secondary, #a7b0d1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  white-space: nowrap;
}

/* Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  background: transparent;
  padding: 0;
  border: none;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }

.header-nav .nav-link,
.nav-link {
  color: var(--text-secondary, #a7b0d1);
  text-decoration: none;
  padding: 0.36rem 0.64rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  line-height: 1;
  min-height: 29px;
  cursor: pointer;
  font-family: inherit;
}

.header-nav .nav-link .nav-icon-svg,
.nav-link .nav-icon-svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex: 0 0 auto;
}

.header-nav .nav-link:hover,
.nav-link:hover {
  color: var(--text, #ffffff);
  background: rgba(255, 255, 255, 0.1);
}

.header-nav .nav-link.active,
.nav-link.active {
  color: var(--text, #ffffff);
  background: rgba(139, 156, 255, 0.2);
}

.nav-link[hidden] { display: none !important; }
