.app-header__primary,
.app-header__account,
.app-header__brand {
  display: flex;
  align-items: center;
}

.app-header__primary {
  gap: 22px;
  min-width: 0;
}

.app-header__brand {
  flex: none;
}

.app-header__account {
  gap: 10px;
  margin-left: auto;
  white-space: nowrap;
}

.app-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11.5px;
  font-weight: 600;
}

.app-header__name,
.app-header__logout {
  font-size: var(--fs-cell);
}

.app-header__name {
  color: var(--ink-2);
}

.app-header__logout {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--ink-4);
}

.app-nav__mobile-only {
  display: none !important;
}

/* --- Subnav de módulo (secciones internas de Refugio / Centros) ----------- */
.app-subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 42px;
  padding: 0 var(--sp-6);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.app-subnav__title {
  margin-right: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-4);
  white-space: nowrap;
}

.app-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: var(--fs-meta);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}

.app-subnav a:hover {
  background: var(--page);
  color: var(--ink);
  text-decoration: none;
}

.app-subnav a[aria-current="page"] {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.app-subnav a svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .65;
}

.app-subnav a[aria-current="page"] svg,
.app-subnav a:hover svg { opacity: 1; }

@media (max-width: 900px) {
  .app-header__name {
    display: none;
  }
}

@media (max-width: 780px) {
  .app-header__account {
    display: none;
  }

  .app-nav__mobile-only {
    display: flex !important;
  }

  .app-subnav { padding: 0 var(--sp-4); }
  .app-subnav__title { display: none; }
  .app-subnav a { min-height: 38px; }
}
