/* ─── Gambhira Header ─────────────────────────────────────────── */
:root {
  --gh-header-h: 56px;
  --gh-nav-h: 42px;
  --gh-bg: #1a1b26;
  --gh-bg2: #24253a;
  --gh-bg3: #2d2e44;
  --gh-fg: #c9d1d9;
  --gh-fg2: #8b949e;
  --gh-accent: #7aa2f7;
  --gh-accent2: #bb9af7;
  --gh-border: #363b54;
  --gh-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Header Bar ──────────────────────────────────────────────── */
#gh-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--gh-header-h);
  background: var(--gh-bg2);
  border-bottom: 1px solid var(--gh-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 300;
}

.gh-header-left { display: flex; align-items: center; }
.gh-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gh-accent2);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.gh-logo i { font-size: 22px; }

.gh-header-center { flex: 1; display: flex; justify-content: center; }
.gh-search-box {
  position: relative;
  width: 100%;
  max-width: 420px;
}
.gh-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gh-fg2);
  font-size: 14px;
}
.gh-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background: var(--gh-bg3);
  border: 1px solid var(--gh-border);
  color: var(--gh-fg);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: 0.15s;
}
.gh-search-input:focus {
  border-color: var(--gh-accent);
}
.gh-search-input::placeholder {
  color: var(--gh-fg2);
  opacity: 0.6;
}

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

.gh-icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid transparent;
  color: var(--gh-fg2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: 0.15s;
}
.gh-icon-btn:hover {
  background: var(--gh-bg3);
  color: var(--gh-fg);
  border-color: var(--gh-border);
}

.gh-btn-login, .gh-btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--gh-accent);
  color: var(--gh-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: 0.15s;
}
.gh-btn-login:hover { background: #8ab4f8; }
.gh-btn-logout {
  background: var(--gh-bg3);
  color: var(--gh-fg2);
  border: 1px solid var(--gh-border);
}
.gh-btn-logout:hover { background: var(--gh-bg3); color: var(--gh-fg); }

/* ── Pages Navigation ────────────────────────────────────────── */
#gh-pages-nav {
  position: fixed;
  top: var(--gh-header-h);
  left: 0; right: 0;
  height: var(--gh-nav-h);
  background: var(--gh-bg);
  border-bottom: 1px solid var(--gh-border);
  display: flex;
  align-items: center;
  z-index: 299;
  overflow-x: auto;
}
.gh-pages-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 16px;
  height: 100%;
}
.gh-page-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  color: var(--gh-fg2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  transition: 0.15s;
  white-space: nowrap;
}
.gh-page-link:hover {
  color: var(--gh-fg);
  background: var(--gh-bg3);
}
.gh-page-link.active {
  color: var(--gh-accent);
  background: var(--gh-bg3);
}
.gh-page-link i { font-size: 14px; }

/* ── Adjust existing layout ──────────────────────────────────── */
body.has-gh-header #topbar {
  top: calc(var(--gh-header-h) + var(--gh-nav-h));
}
body.has-gh-header #app {
  height: calc(100vh - var(--gh-header-h) - var(--gh-nav-h) - var(--topbar-h));
  margin-top: calc(var(--gh-header-h) + var(--gh-nav-h) + var(--topbar-h));
}
body.has-gh-header #nav-menu {
  display: none !important;
}
