/**
 * Shared header: logo (left) + optional actions + account dropdown (right).
 * Pages should define --panel / --shadow on :root when possible; fallbacks provided.
 */

.hero-main {
  width: 100%;
}

.portal-brand-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  width: 100%;
}

.hero-brand-logo {
  display: block;
  width: auto;
  max-width: min(380px, calc(100% - 12px));
  max-height: 52px;
  height: auto;
  margin: 0;
  object-fit: contain;
  flex-shrink: 1;
}

.portal-brand-bar-end {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.portal-brand-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-account-wrap {
  flex-shrink: 0;
}

.sync-form-inline {
  display: inline-flex;
  margin: 0;
}

/* Account dropdown */
.account-menu {
  position: relative;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-trigger {
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  font-weight: 700;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e2e8f0;
  color: #1e293b;
  transition: transform 0.15s ease;
}

.account-trigger:hover {
  transform: translateY(-1px);
}

.account-trigger-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.account-trigger-label {
  max-width: min(260px, 50vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.account-trigger-chevron {
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.account-menu[open] .account-trigger-chevron {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  padding: 12px;
  background: var(--panel, rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  box-shadow: var(--shadow, 0 18px 45px rgba(15, 23, 42, 0.08));
  z-index: 20;
}

.account-logout-btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  font-weight: 700;
  font: inherit;
  background: #b91c1c;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.account-logout-btn:hover {
  transform: translateY(-1px);
}
