/* Shared header + auth-nav styles — loaded by app_header.php partial.
   Requires --clr-* variables to be defined by the page's own CSS. */

/* ── Header layout ───────────────────────────────────────────────── */
.app-header {
  height: 56px;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
}
.app-header--static { position: static; }
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo svg { display: block; }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-back {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--clr-muted);
  text-decoration: none; padding: 5px 10px;
  border-radius: 7px; border: 1px solid var(--clr-border);
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.header-back:hover { color: var(--clr-text); border-color: var(--clr-accent, #4f9dff); }

/* ── Auth nav ────────────────────────────────────────────────────── */
.auth-nav { display: flex; align-items: center; gap: 6px; }
.auth-nav-link {
  font-size: .78rem; font-weight: 600;
  color: var(--clr-muted); text-decoration: none;
  padding: 5px 12px; border-radius: 7px;
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.auth-nav-link:hover { color: var(--clr-text); background: var(--clr-surface2); }
.auth-nav-link.primary { border-color: #4aaca7; color: #4aaca7; }
.auth-nav-link.primary:hover { background: rgba(74,172,167,.12); }
.auth-nav-user { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--clr-muted); }
.auth-nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--clr-surface2); border: 1px solid var(--clr-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #4aaca7;
  flex-shrink: 0; overflow: hidden; cursor: pointer;
}
.auth-nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Avatar dropdown ─────────────────────────────────────────────── */
.auth-dropdown-trigger { background: none; border: none; cursor: pointer; padding: 0; }
.auth-dropdown {
  position: fixed; min-width: 200px;
  background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.45);
  z-index: 2000; overflow: hidden;
  animation: dropdown-in .13s ease;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-dropdown-header { padding: 12px 14px 10px; }
.auth-dropdown-name {
  font-size: .85rem; font-weight: 600; color: var(--clr-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.auth-dropdown-email {
  font-size: .75rem; color: var(--clr-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
.auth-dropdown-sep { height: 1px; background: var(--clr-border); margin: 2px 0; }
.auth-dropdown-item {
  display: block; width: 100%; padding: 9px 14px;
  font-size: .83rem; color: var(--clr-muted); text-decoration: none;
  background: none; border: none; text-align: left; cursor: pointer;
  font-family: inherit; transition: background .12s, color .12s;
}
.auth-dropdown-item:hover { background: var(--clr-surface2); color: var(--clr-text); }
.auth-dropdown-signout { color: #ef4444; }
.auth-dropdown-signout:hover { background: rgba(239,68,68,.08); color: #ef4444; }
