/* v0.75.1 — persistent header, reliable search scrolling and richer reconciliation */
.main-panel > header {
  position: sticky;
  top: .5rem;
  z-index: 40;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 8px 18px rgba(16, 45, 39, .08);
}

.global-search-dialog {
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(780px, calc(100vw - 1.5rem));
  height: min(720px, calc(100dvh - 1.5rem));
  max-height: none;
  padding: 0;
  overflow: hidden;
}
.global-search-dialog[open] { display: grid; }
.global-search-slot {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}
.global-search-slot .global-search-results {
  min-height: 0;
  max-height: none;
  padding-bottom: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.reconciliation-detail-table { min-width: 1320px; }
.reconciliation-detail-table th { white-space: nowrap; }
.sage-issues-table { min-width: 1180px; }
.reconciliation-action { min-width: 150px; }
.reconciliation-action .record-secondary-actions { display: grid; gap: .35rem; }
.sage-sync-errors { margin-top: .45rem; padding: .55rem .65rem; border: 1px solid #d9a5a5; border-radius: 8px; background: #fff7f7; color: #712b2b; }
.sage-sync-errors summary { cursor: pointer; font-weight: 700; }
.sage-sync-errors ul { margin: .45rem 0 0; padding-left: 1.2rem; }

@media (max-width: 600px) {
  .main-panel > header { top: .25rem; }
  .global-search-dialog {
    width: calc(100vw - .5rem);
    height: calc(100dvh - .5rem);
  }
}
