#app-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.brand-home-link {
  color: inherit;
  text-decoration: none;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
}

.brand-home-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

.brand-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-color);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.user-greeting strong {
  color: var(--text-primary);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  font-weight: 500;
}

.btn-logout:hover {
  background-color: var(--border-color);
  color: var(--text-primary);
}

.btn-mobile-menu { display: none; }

@media (max-width: 760px) {
  #app-header {
    flex: 0 0 auto;
    padding: .45rem .75rem;
  }

  .header-container {
    flex-direction: row;
    align-items: center;
    gap: .6rem;
  }

  .brand { min-width: 0; gap: .55rem; }
  .brand-logo { height: 30px; }
  .brand-divider, .brand-subtitle { display: none; }
  .brand-title { font-size: .95rem; }
  .user-panel {
    min-width: 0;
    width: auto;
    margin-left: auto;
    border: 0;
    padding: 0;
    font-size: .78rem;
  }
  .user-prefix, .btn-logout { display: none; }
  .user-greeting { display: block; max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .btn-mobile-menu { display: inline-flex; flex: 0 0 42px; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: transparent; flex-direction: column; justify-content: center; gap: 4px; cursor: pointer; }
  .btn-mobile-menu span { display: block; width: 100%; height: 2px; border-radius: 2px; background: var(--text-primary); }
  .btn-mobile-menu[aria-expanded='true'] { background: var(--bg-input); border-color: var(--accent-primary); }
  .btn-mobile-menu:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
  .header-container > .btn-mobile-menu { margin-left: auto; }
  .user-panel + .btn-mobile-menu { margin-left: 0; }
}

@media (max-width: 390px) {
  .brand { gap: .6rem; }
  .brand-logo { height: 32px; }
  .brand-title { font-size: 1rem; }
  .user-panel { gap: .5rem; font-size: .78rem; }
}
