.ah-header {
  --ah-bg: #0e0e0e;
  --ah-border: #222;
  --ah-text: #e8e8e8;
  --ah-muted: #777;
  --ah-hover: rgba(255,255,255,.06);
  height: 48px;
  background: var(--ah-bg);
  border-bottom: 1px solid var(--ah-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  position: relative;
  z-index: 50;
}
.ah-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.ah-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ah-logo {
  height: 24px;
  width: auto;
  display: block;
}
.ah-tagline {
  font-size: 11px;
  color: var(--ah-muted);
  white-space: nowrap;
  display: none;
}
@media (min-width: 640px) {
  .ah-tagline { display: block; }
}
.ah-switcher, .ah-user { position: relative; }
.ah-s-btn {
  width: 28px; height: 28px;
  border-radius: 7px;
  border: 1px solid var(--ah-border);
  background: transparent;
  color: var(--ah-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
}
.ah-s-btn:hover { background: var(--ah-hover); color: var(--ah-text); }
.ah-menu {
  position: absolute;
  top: calc(100% + 5px); left: 0;
  z-index: 200;
  min-width: 160px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  display: none;
}
.ah-menu-right { left: auto; right: 0; }
.ah-switcher.open .ah-menu, .ah-user.open .ah-menu { display: block; }
.ah-mi {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ah-text);
  text-decoration: none;
  font-size: 13px;
  transition: background .1s;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.ah-mi:hover { background: var(--ah-hover); }
.ah-mi.active { background: rgba(255,255,255,.08); }
.ah-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ah-divider {
  height: 1px;
  background: #2a2a2a;
  margin: 4px 0;
}
.ah-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ah-nav::-webkit-scrollbar { display: none; }
.ah-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ah-muted);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color .12s, border-color .12s, background .12s;
  flex-shrink: 0;
}
.ah-chip:hover {
  color: var(--ah-text);
  border-color: #333;
  background: var(--ah-hover);
}
.ah-chip.active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.ah-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ah-ws {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--ah-muted);
}
.ah-ws-name { color: var(--ah-text); font-weight: 600; font-size: 12px; }
.ah-ws-switch { text-decoration: underline; }
.ah-u-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px 3px 3px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ah-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  transition: background .12s;
}
.ah-u-btn:hover { background: var(--ah-hover); }
.ah-avatar {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ah-uname { display: none; }
@media (min-width: 480px) {
  .ah-uname { display: inline; }
}
.ah-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  transition: opacity .12s;
  border: 1px solid transparent;
}
.ah-btn:hover { opacity: .85; }
.ah-btn-outline {
  background: transparent !important;
  border-color: #333 !important;
  color: var(--ah-text) !important;
}
.ah-btn-outline:hover { border-color: var(--accent) !important; color: var(--accent) !important; opacity: 1 !important; }

/* App-switcher grid */
.ah-menu-apps { min-width: 200px; padding: 6px; }
.ah-menu-apps-grid { display: grid; gap: 3px; }
.ah-app-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ah-text); text-decoration: none;
  transition: background .1s;
}
.ah-app-item:hover { background: var(--ah-hover); }
.ah-app-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.ah-app-info { display: flex; flex-direction: column; gap: 1px; }
.ah-app-name { font-size: 13px; font-weight: 600; }
.ah-app-desc { font-size: 10px; color: var(--ah-muted); }
