/* Shared navigation and action hierarchy. Kept after the established page styles. */
.site-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; padding-top: 1.25rem; }
.header-session { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 1rem; min-width: 0; }
.header-session form { margin: 0; }
.active-profile { display: grid; grid-template-columns: auto auto; gap: .2rem .75rem; align-items: baseline; }
.profile-caption { grid-column: 1 / -1; color: #40566a; font-size: .75rem; }
.active-profile strong { font-size: .9rem; font-weight: 600; }
.active-profile a { font-size: .8rem; color: #235371; text-underline-offset: .2em; }
.header-navigation { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem; padding: .5rem 0; border-top: 1px solid #dfe6eb; border-bottom: 1px solid #dfe6eb; }
.header-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem .9rem; border-radius: 6px; font: inherit; font-size: .875rem; font-weight: 500; text-decoration: none; }
.header-link:hover { background: #edf2f5; }
.header-link[aria-current] { background: #e6eef4; color: #10283d; box-shadow: inset 0 -3px #235371; font-weight: 600; }
.primary-button, .secondary-button { align-items: center; border-radius: 6px; font-weight: 600; min-height: 44px; padding: .65rem 1rem; line-height: 1.4; text-align: center; gap: .4rem; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.primary-button:hover:not(:disabled) { background: #173a58; }
.secondary-button { border-color: #b9c8d2; }
.secondary-button:hover:not(:disabled) { background: #edf2f5; }
.primary-button:disabled, .secondary-button:disabled { opacity: .6; cursor: not-allowed; }
.button-row, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; min-width: 0; }
.button-row > *, .form-actions > * { max-width: 100%; }
.button-row .inline-button, .form-actions .primary-button { margin-top: 0; }
.page-heading-row > * { min-width: 0; }
.page-heading-row > .button-row { justify-content: flex-end; flex: 0 1 46%; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; font-size: .85rem; line-height: 1.5; margin: 0 0 1.25rem; color: #40566a; overflow-wrap: anywhere; }
.breadcrumbs a { text-underline-offset: .2em; }
.related-links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: center; }
.related-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; font-weight: 500; color: #235371; text-underline-offset: .2em; }
.page-heading-row:has(> .related-links) { display: block; }
.page-heading-row > .related-links { margin-top: .75rem; }
.table-actions a { font-weight: 600; }
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr; gap: .75rem; }
  .header-session { justify-content: flex-start; }
  .header-navigation { gap: .15rem; }
  .page-heading-row > .button-row { flex-basis: auto; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .header-session { gap: .5rem .75rem; }
  .header-session .environment-badge { display: none; }
  .header-session form { margin-left: auto; }
  .header-link { padding: .6rem .7rem; }
  .page-heading-row > .button-row { display: grid; grid-template-columns: 1fr; width: 100%; }
  .page-heading-row > .button-row > * { width: 100%; }
}
@media print { .site-header { display: none; } }

.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; min-width: 0; }
.heading-actions .inline-button { margin-top: 0; }
.admin-tabs, .profile-tabs { flex-wrap: wrap; gap: .25rem 1.25rem; }
.admin-tabs a, .profile-tabs a { font-weight: 600; }
.card-link { font-weight: 600; }
@media (max-width: 520px) { .heading-actions { align-items: stretch; width: 100%; } .heading-actions > :is(a, form) { flex: 1 1 auto; } }
