/*
  GH Bank NPL — theme matched to mockups "2a — Top nav layout" and
  "2b — General questions".

  The design language, in short:
    · warm cream gradient page, with the whole app inside one white rounded card
    · white top nav with a 4px orange rule above it; navigation as pills
    · #FF5100 orange is the single accent (active nav, primary buttons, links)
    · #2B303A charcoal for headings and the avatar
    · panels are 1px #F0E6DE borders at 14px radius — not drop shadows
    · controls, tags, pagination and buttons are all 999px pills
*/
:root {
  /* Accent */
  --gh-orange: #FF5100;
  --gh-orange-dark: #D94500;
  --gh-orange-tint: #FFDDD5;          /* nav pill, table head, highlight panel */
  --gh-orange-tint-border: #F7C9BC;
  --gh-orange-soft: rgba(255, 81, 0, .10);
  --gh-orange-border: rgba(255, 81, 0, .40);

  /* Status */
  --gh-green: #8DC63F;
  --gh-green-soft: rgba(141, 198, 63, .16);
  --gh-green-border: rgba(141, 198, 63, .45);
  --gh-green-ink: #4D7A19;

  --gh-yellow: #FFD400;
  --gh-yellow-soft: rgba(255, 212, 0, .20);
  --gh-yellow-border: rgba(255, 212, 0, .50);
  --gh-yellow-ink: #8A6100;

  /* Warm neutrals */
  --gh-page-from: #FDF6EF;
  --gh-page-mid:  #FBEDE3;
  --gh-page-to:   #F7E3D6;
  --gh-surface: #ffffff;
  --gh-border: #F0E6DE;               /* panel borders */
  --gh-border-soft: #F4EBE4;          /* table row rules */
  --gh-border-control: #EBE0D8;       /* inputs, pagination */
  --gh-divider: #F2E9E2;

  /* Ink */
  --gh-chrome: #2B303A;               /* headings, avatar, viewer bar */
  --gh-ink: #2B303A;
  --gh-ink-body: #4B515C;
  --gh-ink-muted: #6B6F78;
  --gh-ink-faint: #8A8F98;
  --gh-ink-warm: #A49B93;             /* reference numbers, em-dashes */

  --gh-radius: 14px;                  /* panels */
  --gh-radius-sm: 10px;
  --gh-pill: 999px;
  --gh-shadow-app: 0 18px 50px rgba(90, 45, 20, .13);

  --gh-font-body: Roboto, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Bootstrap overrides so stock components inherit the theme. */
  --bs-primary: var(--gh-orange);
  --bs-primary-rgb: 255, 81, 0;
  --bs-link-color: var(--gh-orange);
  --bs-link-color-rgb: 255, 81, 0;
  --bs-link-hover-color: var(--gh-orange-dark);
  --bs-body-color: var(--gh-ink-body);
  --bs-border-radius: var(--gh-radius-sm);
  --bs-font-sans-serif: var(--gh-font-body);
}

/* ---------- Shell ----------
   The mockup floats the entire application on a warm gradient as one white
   rounded card, rather than sitting flat on a grey page. */

.gh-body {
  min-height: 100vh;
  margin: 0;
  padding: 1.5rem;
  background: linear-gradient(165deg,
              var(--gh-page-from) 0%,
              var(--gh-page-mid) 45%,
              var(--gh-page-to) 100%);
  background-attachment: fixed;
  font-family: var(--gh-font-body);
  color: var(--gh-ink-body);
}
@media (max-width: 991.98px) { .gh-body { padding: .75rem; } }

.gh-app {
  background: var(--gh-surface);
  border-radius: 18px;
  box-shadow: var(--gh-shadow-app);
  overflow: hidden;
  min-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
}
@media (max-width: 991.98px) { .gh-app { min-height: calc(100vh - 1.5rem); border-radius: 14px; } }

.gh-main { min-width: 0; display: flex; flex-direction: column; flex: 1; }

.gh-content { padding: 2rem 2.5rem 2.5rem; flex: 1; }
@media (max-width: 991.98px) { .gh-content { padding: 1.25rem 1rem 2rem; } }

/* ---------- Top navigation ---------- */

.gh-topnav {
  background: var(--gh-surface);
  border-top: 4px solid var(--gh-orange);
  border-bottom: 1px solid var(--gh-divider);
  padding: 0;
}

.gh-topnav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1rem 1.75rem;
}
@media (max-width: 991.98px) { .gh-topnav-inner { padding: .75rem 1rem; } }

.gh-topnav-brand { display: flex; align-items: center; flex: none; text-decoration: none; }

/* Height-driven with width:auto so the lockup keeps its own aspect ratio
   (the artwork is ~2.02:1; constraining both axes squashed it). */
.gh-bank-logo { height: 72px; width: auto; max-width: 100%; display: block; }
@media (max-width: 575.98px) { .gh-bank-logo { height: 42px; } }

/* Placeholder while the real GH Bank lockup is dropped in — same 2.02:1 box. */
.gh-bank-logo-slot {
  display: flex; align-items: center; justify-content: center;
  width: 105px; height: 52px;
  border: 1px dashed var(--gh-border-control);
  border-radius: var(--gh-radius-sm);
  color: var(--gh-ink-warm);
  font-size: .6875rem;
  text-align: center;
  background: #fff;
}

/* Baker Tilly lockup beside "Managed by". Dark variant — the bar is white. */
.gh-topnav-bt-logo { height: 38px; width: auto; display: block; }

.gh-topnav-divider {
  width: 1px;
  height: 26px;
  background: #EFE5DD;
  flex: none;
}
@media (max-width: 991.98px) { .gh-topnav-divider { display: none; } }

.gh-topnav-toggler {
  border: 0;
  color: var(--gh-ink-body);
  padding: .375rem;
  margin-left: auto;
}
.gh-topnav-toggler:focus { box-shadow: 0 0 0 3px var(--gh-orange-soft); }

.gh-topnav-collapse { display: flex; align-items: center; gap: 1rem; flex: 1 1 auto; }

.gh-topnav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Anchors and dropdown buttons share this so both sit on the same baseline. */
.gh-topnav-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .875rem;
  color: #5C6470;
  font-size: .875rem;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--gh-pill);
  white-space: nowrap;
  min-height: 44px;
}
.gh-topnav-link:hover,
.gh-topnav-link:focus-visible { background: #FBF4EF; color: var(--gh-ink); }

/* Active nav item: soft orange pill, per mockup 2a/2b. */
.gh-topnav-link.active { background: var(--gh-orange-tint); color: var(--gh-orange); font-weight: 600; }

.gh-nav-count {
  background: var(--gh-green);
  color: #22400C;
  font-size: .6875rem;
  font-weight: 700;
  border-radius: var(--gh-pill);
  padding: .0625rem .4375rem;
}

.gh-topnav-dropdown {
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  box-shadow: 0 12px 34px rgba(90, 45, 20, .14);
  padding: .375rem;
}
.gh-topnav-dropdown .dropdown-item {
  border-radius: var(--gh-radius-sm);
  padding: .5rem .75rem;
  font-size: .875rem;
  color: var(--gh-ink-body);
}
.gh-topnav-dropdown .dropdown-item:hover { background: #FBF4EF; }
.gh-topnav-dropdown .dropdown-item.active,
.gh-topnav-dropdown .dropdown-item:active { background: var(--gh-orange); color: #fff; }

/* Sign-out is a form button inside the menu; strip the default control styling. */
.gh-topnav-dropdown form { margin: 0; }
.gh-topnav-dropdown form .dropdown-item {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
}

.gh-topnav-account {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.gh-topnav-managed {
  font-size: .8125rem;
  color: var(--gh-ink-faint);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.gh-topnav-managed strong { color: var(--gh-chrome); font-weight: 600; }

/* Round avatar button that opens the account menu. */
.gh-avatar {
  width: 34px; height: 34px;
  border-radius: var(--gh-pill);
  background: var(--gh-chrome);
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  flex: none;
  text-transform: uppercase;
}
.gh-avatar:hover, .gh-avatar:focus-visible { background: #3A4150; color: #fff; }

/* Stacked menu below the lg breakpoint, where the bar collapses. */
@media (max-width: 991.98px) {
  .gh-topnav-collapse { align-items: stretch; flex-direction: column; gap: .25rem; padding: .5rem 0 .25rem; }
  .gh-topnav-links { flex-direction: column; align-items: stretch; width: 100%; }
  .gh-topnav-link { width: 100%; justify-content: flex-start; }
  .gh-topnav-link .gh-nav-count { margin-left: auto; }
  .gh-topnav-account { margin-left: 0; width: 100%; justify-content: space-between; padding-top: .5rem; }
  .gh-topnav-managed { order: 3; width: 100%; }
}

/* ---------- Buttons ---------- */

.btn { border-radius: var(--gh-pill); }

.btn-gh {
  background: var(--gh-orange);
  border: 1px solid var(--gh-orange);
  color: #fff;
  font-weight: 600;
  padding: .5rem 1.25rem;
}
.btn-gh:hover,
.btn-gh:focus { background: var(--gh-orange-dark); border-color: var(--gh-orange-dark); color: #fff; }

.btn-gh-outline {
  background: transparent;
  border: 1.5px solid var(--gh-orange);
  color: var(--gh-orange);
  font-weight: 600;
  padding: .5rem 1.125rem;
}
.btn-gh-outline:hover { background: var(--gh-orange-tint); color: var(--gh-orange-dark); }

/* .btn-gh/.btn-gh-outline set their own padding, which would otherwise beat
   .btn-sm and make in-table buttons wrap onto two lines. */
.btn-sm.btn-gh, .btn-sm.btn-gh-outline { padding: .3rem .75rem; font-size: .8125rem; }

/* The nav CTA standing in for a nav pill: ringed when it is the current page. */
.btn-gh.is-current {
  background: var(--gh-orange-dark);
  border-color: var(--gh-orange-dark);
  box-shadow: 0 0 0 3px var(--gh-orange-tint);
}

/* Neutral secondary, matched to the mockup's outlined pills. */
.btn-outline-secondary {
  border-color: var(--gh-border-control);
  color: #5C6470;
}
.btn-outline-secondary:hover { background: #FBF4EF; border-color: var(--gh-border-control); color: var(--gh-ink); }

/* Every interactive control clears the 44px touch target on small screens. */
@media (max-width: 991.98px) {
  .btn, .form-control, .form-select { min-height: 44px; }
}

/* ---------- Status pills ---------- */

.gh-tag {
  display: inline-flex;
  align-items: center;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .7rem;
  border-radius: var(--gh-pill);
  white-space: nowrap;
}
.gh-tag-open     { background: var(--gh-green-soft);  color: var(--gh-green-ink);  border: 1px solid var(--gh-green-border); }
.gh-tag-approved { background: var(--gh-green-soft);  color: var(--gh-green-ink);  border: 1px solid var(--gh-green-border); }
.gh-tag-pending  { background: var(--gh-yellow-soft); color: var(--gh-yellow-ink); border: 1px solid var(--gh-yellow-border); }
.gh-tag-closed   { background: #F6F1EC;               color: var(--gh-ink-faint);  border: 1px solid var(--gh-border-control); }
.gh-tag-category { background: #F6F1EC;               color: #7A6A60;              border: 1px solid var(--gh-border); }
.gh-tag-account  { background: var(--gh-orange-tint); color: var(--gh-orange-dark);
                   border: 1px solid var(--gh-orange-tint-border);
                   font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Page heading ---------- */

/* The mockup has no eyebrow line and no yellow rule — breadcrumb straight into
   the page title — so _PageHeading renders the breadcrumb only. */
.gh-breadcrumb { font-size: .8125rem; color: var(--gh-ink-muted); margin-bottom: 1.25rem; }
.gh-breadcrumb a { color: var(--gh-ink-muted); text-decoration: none; }
.gh-breadcrumb a:hover { color: var(--gh-orange); }
.gh-breadcrumb .active { color: var(--gh-chrome); font-weight: 500; }
.gh-breadcrumb .gh-crumb-sep { margin: 0 .45rem; color: var(--gh-ink-warm); }

/* ---------- Page title (mockup 2a/2b) ---------- */

.gh-page-title {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex-wrap: wrap;
  margin-bottom: 1.625rem;
}
.gh-page-title-bar { width: 5px; height: 34px; background: var(--gh-orange); border-radius: 3px; flex: none; }
.gh-page-title-text {
  font-size: 2.125rem;
  font-weight: 700;
  color: var(--gh-chrome);
  letter-spacing: -.01em;
  margin: 0;
}
.gh-page-title-ref { color: var(--gh-orange); }
@media (max-width: 767.98px) {
  .gh-page-title-text { font-size: 1.5rem; }
  .gh-page-title-bar { height: 26px; }
}

/* ---------- Stat strip ---------- */

/* One bordered row split into equal cells; the last is the filled accent. */
.gh-stats {
  display: flex;
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
}
.gh-stat {
  flex: 1 1 0;
  min-width: 0;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--gh-border);
}
.gh-stat:last-child { border-right: 0; }
.gh-stat-label { font-size: .8125rem; color: var(--gh-ink-faint); margin-bottom: .5rem; }
.gh-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--gh-chrome); line-height: 1.2; }

.gh-stat-accent { background: var(--gh-orange); border-right: 0; }
.gh-stat-accent .gh-stat-label { color: rgba(255, 255, 255, .82); }
.gh-stat-accent .gh-stat-value { color: #fff; }

/* Two-up below md, stacked under 480px — four cells side by side stop being
   readable well before the table breakpoint. */
@media (max-width: 991.98px) {
  .gh-stats { flex-wrap: wrap; }
  .gh-stat { flex: 1 1 50%; border-bottom: 1px solid var(--gh-border); }
  .gh-stat:nth-child(2n) { border-right: 0; }
  .gh-stat:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 479.98px) {
  .gh-stat { flex: 1 1 100%; border-right: 0; }
  .gh-stat:last-child { border-bottom: 0; }
}

/* ---------- Home split ---------- */

.gh-home-split { display: flex; gap: 1.625rem; align-items: flex-start; }
.gh-home-intro { flex: 1.6 1 0; min-width: 0; }
.gh-home-aside { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
@media (max-width: 991.98px) {
  .gh-home-split { flex-direction: column; }
  .gh-home-intro, .gh-home-aside { width: 100%; flex: 1 1 auto; }
}

/* Standalone bordered panel — the same shape as .gh-card without the header. */
.gh-panel {
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  padding: 1.5rem 1.75rem;
  background: var(--gh-surface);
}
.gh-panel-tint { background: var(--gh-orange-tint); border-color: var(--gh-orange-tint-border); }
.gh-panel-title { font-size: .9375rem; font-weight: 700; color: var(--gh-chrome); margin: 0 0 .875rem; }
.gh-panel-body { font-size: .875rem; line-height: 1.7; color: var(--gh-ink-body); margin: 0 0 1rem; }

.gh-jumplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .125rem; }
.gh-jumplist a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .5rem 0;
  font-size: .875rem;
  color: var(--gh-ink-body);
  text-decoration: none;
  min-height: 44px;
}
.gh-jumplist a:hover { color: var(--gh-orange); }
/* First entry is the emphasised one in the mockup. */
.gh-jumplist li:first-child a { color: var(--gh-orange); font-weight: 600; }
.gh-jumplist-chevron { color: var(--gh-ink-warm); }

/* ---------- Panels (cards) ---------- */

.gh-card {
  background: var(--gh-surface);
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  box-shadow: none;
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.gh-card-header {
  display: flex;
  align-items: center;
  gap: .875rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--gh-border);
}
@media (max-width: 575.98px) { .gh-card-header { padding: 1rem; } }

/* Filled header. Reuses the same warm tint as table heads and the nav pill so
   the form's panels read as one family rather than a new colour. Opt-in per
   card — list pages keep the plain white header. */
.gh-card-header-tint {
  background: var(--gh-orange-tint);
  border-bottom-color: var(--gh-orange-tint-border);
}
.gh-card-header-tint .gh-card-title { /*color: var(--gh-orange-dark); */}

.gh-card-accent { width: 5px; height: 30px; background: var(--gh-orange); border-radius: 3px; flex: none; }
.gh-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gh-chrome);
  letter-spacing: -.01em;
  margin: 0;
}
@media (max-width: 575.98px) { .gh-card-title { font-size: 1.25rem; } }

.gh-card-body { padding: 1.75rem; }
@media (max-width: 575.98px) { .gh-card-body { padding: 1rem; } }

.gh-prose { font-size: .9375rem; line-height: 1.75; color: var(--gh-ink-body); }
.gh-prose h5 { font-size: 1.0625rem; font-weight: 700; color: var(--gh-orange); margin-bottom: .875rem; }
.gh-prose p:last-child { margin-bottom: 0; }

/* ---------- Filter bar ---------- */

.gh-filters { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; align-items: center; }
.gh-filters .gh-filter-search { flex: 1 1 260px; min-width: 0; max-width: 380px; }
.gh-filters .gh-filter-select { flex: 0 1 220px; min-width: 0; }
@media (max-width: 767.98px) {
  .gh-filters { gap: .625rem; }
  .gh-filters > * { flex: 1 1 100% !important; max-width: none; }
}

.form-control, .form-select {
  border-radius: var(--gh-pill);
  border-color: var(--gh-border-control);
  padding: .55rem 1.125rem;
  color: var(--gh-ink-body);
}
.form-control::placeholder { color: var(--gh-ink-warm); }
.form-control:focus, .form-select:focus {
  border-color: var(--gh-orange);
  box-shadow: 0 0 0 3px var(--gh-orange-soft);
}

/* Multi-line inputs keep square-ish corners — a pill textarea reads oddly. */
textarea.form-control { border-radius: var(--gh-radius); }

/* ---------- Account picker ----------
   A pill border around a tall scrolling listbox reads badly: the curve cuts
   across the first and last rows and the scrollbar sits outside the arc. The
   search box and the list are drawn as one square-cornered group instead. */

.gh-account-picker {
  border: 1px solid var(--gh-border-control);
  border-radius: var(--gh-radius-sm);
  overflow: hidden;
  background: var(--gh-surface);
}
.gh-account-picker:focus-within {
  border-color: var(--gh-orange);
  box-shadow: 0 0 0 3px var(--gh-orange-soft);
}

/* Both children give up their own border and radius to the group above. */
.gh-account-picker .gh-account-search,
.gh-account-picker .gh-account-select {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.gh-account-picker .gh-account-search {
  border-bottom: 1px solid var(--gh-border-soft);
  padding: .5rem .875rem;
}
.gh-account-picker .gh-account-select {
  padding: .25rem;
  background-image: none;   /* no dropdown caret on a listbox */
}
.gh-account-select option {
  padding: .375rem .625rem;
  border-radius: 6px;
}
.gh-account-select option:checked {
  background: var(--gh-orange-tint);
  color: var(--gh-orange-dark);
  font-weight: 600;
}

.input-group > .form-control:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* ---------- Q&A table ---------- */

/* Rounded, bordered container around the table, as in 2b. */
.table-responsive-md:has(.gh-table),
.gh-table-wrap {
  border: 1px solid var(--gh-border);
  border-radius: var(--gh-radius);
  overflow: hidden;
}

.gh-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: 0; }

.gh-table thead tr { background: var(--gh-orange-tint); }
.gh-table th {
  padding: .875rem 1.125rem;
  color: #7A5C52;
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border: 0;
}

.gh-table td {
  padding: 1.125rem;
  vertical-align: top;
  color: var(--gh-ink-body);
  line-height: 1.6;
}
.gh-table tbody tr { border-top: 1px solid var(--gh-border-soft); }
.gh-table tbody tr:hover { background: #FDF9F6; }

.gh-table .gh-col-ref { width: 72px; }
.gh-table .gh-col-date { width: 120px; white-space: nowrap; color: var(--gh-ink-faint); }
.gh-table .gh-col-docs { width: 160px; }
.gh-table td[data-label="Date Posted"], .gh-table td[data-label="Date Answered"] { color: var(--gh-ink-faint); }

.gh-ref-link { color: var(--gh-orange); font-weight: 600; text-decoration: none; }
.gh-ref-link:hover { text-decoration: underline; }

/* Reference rendered as a button, where a plain link was not obviously the way
   to open a question. */
.gh-table .gh-col-ref-button { width: 108px; }

.gh-ref-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.gh-ref-button-icon { opacity: .7; flex: none; }

.gh-doc-line { display: block; color: var(--gh-orange); text-decoration: none; font-size: .8125rem;
               font-weight: 600; padding: .125rem 0; }
.gh-doc-line:hover { text-decoration: underline; }

/*
  Below md the six-column table of Thai prose is unreadable, so each row
  collapses into a stacked card labelled from data-label attributes.
*/
@media (max-width: 767.98px) {
  .table-responsive-md:has(.gh-table), .gh-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .gh-table thead { display: none; }
  .gh-table, .gh-table tbody, .gh-table tr, .gh-table td { display: block; width: 100%; }
  .gh-table tbody tr {
    background: var(--gh-surface);
    border: 1px solid var(--gh-border);
    border-radius: var(--gh-radius);
    margin-bottom: .875rem;
    padding: .5rem .25rem;
  }
  .gh-table td { padding: .5rem .75rem; }
  .gh-table td::before {
    content: attr(data-label);
    display: block;
    font-size: .6875rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gh-ink-warm);
    font-weight: 600;
    margin-bottom: .1875rem;
  }
  .gh-table td:empty { display: none; }
}

/* ---------- Pagination ---------- */

.gh-pager { display: flex; gap: .375rem; flex-wrap: wrap; align-items: center; }
.gh-pager .page-link {
  color: #5C6470;
  border: 1px solid var(--gh-border-control);
  background: transparent;
  padding: .4rem 1rem;
  border-radius: var(--gh-pill);
  font-size: .8125rem;
}
.gh-pager .page-link:hover { background: #FBF4EF; color: var(--gh-ink); }
.gh-pager .page-item.active .page-link {
  background: var(--gh-orange);
  border-color: var(--gh-orange);
  color: #fff;
  font-weight: 600;
}
.gh-pager .page-item.disabled .page-link { color: var(--gh-ink-warm); background: transparent; }

.gh-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  font-size: .8125rem;
  color: var(--gh-ink-muted);
}

/* ---------- Login ---------- */

.gh-login { min-height: 100vh; display: flex; background: var(--gh-chrome); }
.gh-login-visual { width: 56%; position: relative; display: none; }
@media (min-width: 992px) { .gh-login-visual { display: block; } }

.gh-login-visual-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gh-login-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(200deg, rgba(43,48,58,.15) 0%, rgba(43,48,58,.75) 55%, var(--gh-chrome) 100%);
}
.gh-login-copy { position: absolute; left: 3.5rem; right: 3.5rem; bottom: 4.375rem; color: #fff; }
.gh-login-rule { width: 60px; height: 4px; background: var(--gh-orange); border-radius: 2px; margin-bottom: 1.125rem; }
.gh-login-title { font-size: 2.125rem; font-weight: 700; margin-bottom: .875rem; letter-spacing: -.01em; }
.gh-login-lede { font-size: .9375rem; line-height: 1.6; color: #D9D3CD; max-width: 520px; }

.gh-login-panel {
  flex: 1;
  background: linear-gradient(165deg, var(--gh-page-from) 0%, var(--gh-page-mid) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.gh-login-form { width: 100%; max-width: 340px; }
.gh-login-badge {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--gh-orange-tint);
  color: var(--gh-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.375rem;
  margin-bottom: 1rem;
}

/* ---------- PDF viewer ---------- */

.gh-viewer { background: #2B2B2B; min-height: 100vh; display: flex; flex-direction: column; }
.gh-viewer-bar {
  background: var(--gh-chrome);
  color: #fff;
  padding: .625rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.gh-viewer-title { font-size: .875rem; font-weight: 600; margin-right: auto; min-width: 0;
                   overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh-viewer-pages { flex: 1; overflow: auto; padding: 1rem; text-align: center; }
.gh-viewer-pages canvas {
  max-width: 100%;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .4);
  /* Deterrence only — see the security note in STACK-AND-GUIDE.md §8. */
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Nothing from the viewer should reach a printer. */
@media print {
  .gh-viewer, .gh-viewer-pages { display: none !important; }
  body::after {
    content: "Printing is disabled for this document.";
    display: block; padding: 2rem; font-size: 1rem;
  }
}

/* ---------- Utility ---------- */

.gh-empty { padding: 3rem 1rem; text-align: center; color: var(--gh-ink-warm); }
.gh-thai { word-break: break-word; }
.gh-onetime-password {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  background: var(--gh-orange-tint);
  border: 1px solid var(--gh-orange-tint-border);
  padding: .25rem .625rem;
  border-radius: var(--gh-radius-sm);
  user-select: all;
}

.alert { border-radius: var(--gh-radius); }

.htmx-request .gh-busy { opacity: .5; transition: opacity .15s ease; }

/* ---------- Busy / progress ---------- */

/* Not [disabled]: disabling a submit button before the browser serialises the
   form drops its name/value and formaction from the post. */
.btn.is-busy {
  pointer-events: none;
  opacity: .75;
}

.gh-spinner {
  display: inline-block;
  width: .85em;
  height: .85em;
  margin-right: .5em;
  vertical-align: -.1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: gh-spin .7s linear infinite;
}

@keyframes gh-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .gh-spinner { animation-duration: 2s; }
}

.gh-upload-progress .progress {
  height: .6rem;
  background: var(--gh-border-soft);
  border-radius: var(--gh-pill);
}

.gh-upload-progress .progress-bar {
  background: var(--gh-orange);
  transition: width .2s ease;
}
