/*
  Shared page-header + in-page tab navigation — the one source of truth.

  Extracted verbatim from household.html (the reference the app is standardising on)
  into the .app-page-* / .app-tab-* namespace. Every advisor page imports this so the
  header and tab strip cannot drift apart. See docs/architecture/page-header-spec.md.

  Values are copied from household's own rules; hardcoded lights are mapped to theme
  variables so this tracks the dark shell (and any future brand change) automatically.
*/

/* ── page header ─────────────────────────────────────────────────────────── */
.app-page-header {
  /* Some pages carry a legacy global `header { background: var(--navy) }` rule, and
     --navy remaps to a LIGHT colour on the dark theme — which turned the white title
     invisible. A class selector beats the bare element rule, so state the surface
     explicitly here and every page (and any future one) is immune. */
  background: transparent;
  text-align: left;
  padding: 0;
  margin-bottom: 14px;
}
.app-page-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.app-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.app-breadcrumb-back {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: .82rem;
  font-weight: 700;
  gap: 6px;
  text-decoration: none;
}
.app-breadcrumb-back:hover { color: var(--text); }
.app-page-title {
  color: #fff;
  font-size: 1.85rem;
  line-height: 1.1;
  font-weight: 800;
  margin: 0;
  overflow-wrap: anywhere;
}
.app-page-subtitle {
  color: rgba(255, 255, 255, .62);
  font-size: .82rem;
  margin: 6px 0 0;
  max-width: 760px;
  line-height: 1.5;
}
.app-page-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.app-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ── tab strip (the one in-page navigation control) ──────────────────────── */
.app-tab-card {
  padding: 0;
  overflow: hidden;
}
.app-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--cc-inset, var(--card));
}
.app-tab-group {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}
.app-tab-group + .app-tab-group {
  border-left: 1px solid var(--border);
  padding-left: 12px;
}
.app-tab-group-label {
  color: var(--muted);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.app-tab {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  padding: 7px 10px;
}
.app-tab:hover { color: var(--text); }
.app-tab[aria-selected="true"] {
  background: var(--cc-blue, var(--blue));
  border-color: var(--cc-blue, var(--blue));
  color: #fff;
}
.app-tab-description {
  background: var(--cc-inset, var(--card));
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
  padding: 10px 14px;
}
.app-tab-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.app-tab-panel[hidden] { display: none; }

@media (max-width: 760px) {
  .app-page-title { font-size: 1.45rem; }
  .app-tab-panel { padding: 12px; }
}
