/* ─────────────────────────────────────────────────────────
   header.css — MEA Hub App Header
   ───────────────────────────────────────────────────────── */

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(11, 17, 30, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header-inner {
  height: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Logo ───────────────────────────────────────────────── */
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo-icon {
  display: block;
  border-radius: 6px;
  filter: drop-shadow(0 0 6px rgba(129, 212, 250, 0.4));
}

.header-logo-text {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--text);
  line-height: 1;
}

.header-logo-text span {
  color: var(--accent);
}

/* ── User Chip (right side) ─────────────────────────────── */
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.header-avatar,
.header-avatar-fallback {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.header-avatar-fallback {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}

.header-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.header-username {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
  line-height: 1.2;
}

/* Role badge inline in header */
.header-role-inline {
  font-size: 0.65rem;
  color: var(--text-3);
  line-height: 1;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 0 24px;
  }
  .header-username {
    max-width: 180px;
  }
}

/* ── Light theme overrides ────────────────────────────── */
[data-theme="light"] .header {
  background: rgba(235, 243, 249, 0.95);
  border-bottom-color: var(--border);
}
