/* ============================================================
   Greenwich Invest — Custom Component & Layout Styles
   Complements the Greenwich Portal Toolkit (greenwich.css).
   All spacing/layout that would otherwise be inline style.
   ============================================================ */

/* ── Stacking order ───────────────────────────────────────
   greenwich.css defines a base scale (--z-sticky/--z-dropdown/--z-toast/--z-drawer/
   --z-modal/--z-critical), but .grw-overlay in THIS file has always rendered modals
   at a hardcoded 900 rather than the --z-modal token (800) — several pieces of UI
   that must stay visible/usable while a modal is open (toasts, the session-timeout
   prompt, the full-page loader, a phone-country dropdown opened from inside a modal
   form) were still keyed to the old, lower --z-* tokens or arbitrary small numbers,
   so they silently rendered BEHIND an open modal instead of above it. These tokens
   are relative to what .grw-overlay actually uses today, not the unused 800. */
:root {
  --ibp-z-modal:       900;
  --ibp-z-above-modal: 950; /* content that must float above an open modal's own body */
  --ibp-z-loader:      970; /* full-page loader — must cover an open modal during submit */
  --ibp-z-toast:       990; /* toasts/prompts — must always be visible, even over the loader */
}

/* Quiet semantic surfaces keep the workspace focused on financial data. */
.grw-main {
  background-color: var(--color-bg);
  background-image: none;
}

[data-theme="dark"] .grw-main {
  background-image: none;
}

/* ── Layout: two-column pages ────────────────────────────── */
.ibp-layout-2col        { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.ibp-layout-2col--wide  { grid-template-columns: 1.5fr 1fr; }
.ibp-layout-2col--equal { grid-template-columns: 1fr 1fr; }

/* ── Layout: stats row ───────────────────────────────────── */
.ibp-stats-row      { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ibp-stats-row > *  { flex: 1; min-width: 180px; }

/* KPI extensions for dashboard */
.grw-kpi--attention { border-color: var(--color-warning); }

/* ── Investor dashboard ─────────────────────────────────── */
.ibp-dashboard-header {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.ibp-dashboard-header .grw-page-header__subtitle {
  max-width: 680px;
  line-height: 1.55;
}

/* ── KPI grid ────────────────────────────────────────────── */
.ibp-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 32px;
}

/* Let greenwich .grw-kpi handle base styles — only extend here */
.ibp-dashboard-kpi { min-width: 0; }

.ibp-dashboard-kpi .grw-kpi__label {
  font-size: 11px;      /* keep greenwich uppercase defaults */
}

.ibp-dashboard-kpi .grw-kpi__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-top: 4px;
  word-break: break-word;
}

/* Wide centre KPI (total invested value) */
.ibp-dashboard-kpi--wide .grw-kpi__value {
  font-size: 22px;
}

.ibp-kpi-icon--currency {
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: normal;
}

.ibp-dashboard-panel .grw-card__header {
  flex-wrap: wrap;
}

.ibp-dashboard-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ibp-dashboard-section-header {
  align-items: flex-end;
  gap: 14px;
}

.ibp-section-subtitle {
  margin: 4px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Section heading (toolkit pattern) ──────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
}
.section-heading__line {
  flex: 1;
  height: 1px;
  background: var(--color-border-subtle);
}
.section-heading__link {
  font-size: 13px;
  color: var(--grw-deep-green);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}
.section-heading__link:hover {
  text-decoration: underline;
}

/* ── Offer card (toolkit pattern — no inline styles) ──────── */
.offer-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.offer-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.offer-card__bar           { height: 5px; flex-shrink: 0; }
.offer-card__bar--active   { background: linear-gradient(90deg, var(--grw-deep-green), var(--grw-light-green)); }
.offer-card__bar--upcoming { background: var(--color-info); }
.offer-card__bar--closed   { background: var(--color-border); }

.offer-card__body { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; gap: 0; }

.offer-card__type-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.offer-card__type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.offer-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 4px;
}

.offer-card__code {
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.offer-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
  /* Reserves space for a full 2-row grid so cards with fewer metrics (e.g. an offer missing
     yield/tenor data) don't leave a taller, inconsistent gap above the meta block than cards
     with a complete set of metrics in the same grid row. */
  min-height: 80px;
}

.offer-card__meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.offer-card__meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.offer-card__footer {
  padding: 12px 24px;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.offer-card__footer .grw-btn { margin-left: auto; }

.offer-card__deadline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.offer-card__deadline-warn { color: var(--color-warning); font-weight: 700; }

/* ── Offer card logo & issuer ─────────────────────────────── */
.offer-card__type-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.offer-card__logo-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
}
.offer-card__logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.offer-card__logo-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  user-select: none;
}
.offer-card__logo-fallback--cp     { background: #dcfce7; color: #166534; }
.offer-card__logo-fallback--bond   { background: #fef3c7; color: #92400e; }
.offer-card__logo-fallback--public { background: #dbeafe; color: #1e40af; }
.offer-card__logo-fallback--rights { background: #f3e8ff; color: #6b21a8; }
.offer-card__logo-fallback--default { background: var(--color-surface-alt); color: var(--color-text-muted); }
.offer-card__issuer {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.offer-card__programme {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.offer-card__meta-value--rate { color: var(--grw-deep-green, #006527); }
.offer-card__payment-methods { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.offer-card__payment-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.6;
}
.offer-card__payment-badge--online { background: #dbeafe; color: #1d4ed8; }
.offer-card__payment-badge--bank   { background: #f3f4f6; color: #374151; }
.offer-card__ngx-logo { height: 20px; width: auto; display: block; object-fit: contain; }
.offer-card__days-left { font-size: 10px; font-weight: 600; margin-top: 2px; color: var(--grw-deep-green, #006527); }
.offer-card__days-left--warn { color: #b45309; }

/* ── Offer card grid ──────────────────────────────────────── */
.ibp-offer-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

/* ── Offers search bar ────────────────────────────────────── */
.ibp-offers-search {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.ibp-offers-search__input { flex: 1; min-width: 200px; }

.ibp-offers-search__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ibp-dashboard-offers .grw-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ibp-dashboard-offers .grw-card__body {
  flex: 1;
}

.ibp-dashboard-offers .grw-card__title {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ibp-icon-inline    { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.ibp-icon--warning  { color: var(--color-warning); }

.ibp-table-footer   { padding: 12px 0 0; text-align: center; }
.ibp-stat-body      { display: flex; align-items: center; gap: 16px; }
.ibp-stat-icon      { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ibp-stat-icon--green   { background: rgba(0,101,39,0.1);   color: var(--grw-deep-green); }
.ibp-stat-icon--warning { background: rgba(183,121,31,0.1); color: var(--color-warning); }
.ibp-stat-icon--info    { background: rgba(23,92,211,0.1);  color: var(--color-info); }
.ibp-stat-icon--pending { background: rgba(122,90,248,0.1); color: var(--color-pending); }
.ibp-stat-value     { font-size: 28px; font-weight: 800; color: var(--color-text); line-height: 1; }
.ibp-stat-label     { font-size: 13px; color: var(--color-text-muted); margin-top: 4px; }

/* ── Layout: filter bar ───────────────────────────────────── */
.ibp-filter-bar          { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 20px; }
.ibp-filter-bar .grw-form-group { margin: 0; flex: 1; min-width: 160px; }
.ibp-filter-bar__actions { display: flex; gap: 8px; align-items: center; }

/* ── Layout: action row ───────────────────────────────────── */
.ibp-action-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Layout: inline export form (report variant + submit) ─── */
.ibp-export-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Layout: page actions (right side of page header) ───── */
.ibp-page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Layout: quick links row ─────────────────────────────── */
.ibp-quick-links { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

/* ── Layout: form row (2 fields side by side) ────────────── */
.ibp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Layout: section spacing ──────────────────────────────── */
.ibp-section { margin-bottom: 32px; }
.ibp-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ibp-section-title  { font-size: 16px; font-weight: 700; color: var(--color-text); }

/* ── Offers grid ──────────────────────────────────────────── */
.ibp-offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ── Profile definition list ──────────────────────────────── */
.ibp-dl    { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; }
.ibp-dl dt { font-size: 12px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.ibp-dl dd { font-size: 14px; color: var(--color-text); margin: 0; }

/* ── Read-only field display ──────────────────────────────── */
.ibp-readonly-field {
  padding: 10px 14px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ── Password strength meter ──────────────────────────────── */
.ibp-pwd-strength { display: flex; gap: 4px; margin-top: 8px; }
.ibp-pwd-bar      { flex: 1; height: 4px; border-radius: 2px; background: var(--n3); transition: background var(--transition-base); }
.ibp-pwd-bar--weak   { background: var(--color-error); }
.ibp-pwd-bar--medium { background: var(--color-warning); }
.ibp-pwd-bar--strong { background: var(--color-success); }

/* ── OTP single input (legacy) ────────────────────────────── */
.ibp-otp__input {
  text-align: center;
  letter-spacing: 0.35em;
  font-size: 1.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ── OTP digit-box group ──────────────────────────────────── */
.ibp-otp-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.ibp-otp-digit {
  width: 52px;
  height: 60px;
  padding: 0;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  outline: none;
  caret-color: transparent;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  -moz-appearance: textfield;
}
.ibp-otp-digit::-webkit-inner-spin-button,
.ibp-otp-digit::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.ibp-otp-digit:hover:not(:focus) { border-color: var(--color-text-muted); }
.ibp-otp-digit:focus {
  border-color: var(--grw-deep-green);
  box-shadow: 0 0 0 3px rgba(0, 101, 39, 0.12);
  z-index: 1;
}
.ibp-otp-digit.has-value { border-color: var(--color-text-secondary); }

.ibp-otp-sep {
  font-size: 18px;
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
  margin: 0 2px;
}

/* Error state */
.grw-form-group:has(.field-validation-error) .ibp-otp-digit {
  border-color: var(--color-error, #ef4444) !important;
  background: color-mix(in srgb, var(--color-error) 7%, var(--color-surface)) !important;
}

/* OTP expiry note */
.ibp-otp-note {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Email callout on 2FA page */
.ibp-otp-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md);
  padding: 16px;
  margin-bottom: 24px;
}
.ibp-otp-callout__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 101, 39, 0.08);
  border-radius: var(--r-sm);
  color: var(--grw-deep-green);
}
.ibp-otp-callout__text { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; }
.ibp-otp-callout__email { font-weight: 600; color: var(--color-text); }

@media (max-width: 420px) {
  .ibp-otp-digit { width: 40px; height: 50px; font-size: 22px; }
  .ibp-otp-group { gap: 7px; }
}

/* ── Step indicator ───────────────────────────────────────── */
.ibp-steps       { display: flex; gap: 8px; margin-bottom: 24px; }
.ibp-step        { flex: 1; height: 4px; border-radius: 2px; background: var(--color-border-subtle); }
.ibp-step--done  { background: var(--color-success); }
.ibp-step--active{ background: var(--grw-deep-green); }

/* ── Status banners ───────────────────────────────────────── */
.ibp-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-radius: var(--r-lg);
  padding: 16px 20px;
}

.ibp-status-banner--info    { background: rgba(23,92,211,0.07);  border: 1px solid rgba(23,92,211,0.18);  border-left: 3px solid var(--color-info); }
.ibp-status-banner--warning { background: rgba(183,121,31,0.07); border: 1px solid rgba(183,121,31,0.18); border-left: 3px solid var(--color-warning); }
.ibp-status-banner--error   { background: rgba(180,35,24,0.07);  border: 1px solid rgba(180,35,24,0.18);  border-left: 3px solid var(--color-error); }
.ibp-status-banner--success { background: rgba(22,128,60,0.07);  border: 1px solid rgba(22,128,60,0.18);  border-left: 3px solid var(--color-success); }

.ibp-status-banner__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ibp-status-banner--info    .ibp-status-banner__icon { background: rgba(23,92,211,0.14);  color: var(--color-info); }
.ibp-status-banner--warning .ibp-status-banner__icon { background: rgba(183,121,31,0.14); color: var(--color-warning); }
.ibp-status-banner--error   .ibp-status-banner__icon { background: rgba(180,35,24,0.14);  color: var(--color-error); }
.ibp-status-banner--success .ibp-status-banner__icon { background: rgba(22,128,60,0.14);  color: var(--color-success); }

.ibp-status-banner__content { flex: 1; min-width: 0; }

.ibp-status-banner__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.4;
}

.ibp-status-banner__body {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin-top: 4px;
}
.ibp-status-banner__body p { margin: 3px 0 0; }
.ibp-status-banner__body p:first-child { margin-top: 0; }

.ibp-status-banner__actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

/* Matching-account list inside a status banner (e.g. duplicate-BVN warning) */
.ibp-bvn-match-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }

/* ── Dismissible tips (brief, friendly guidance callouts) ───── */
.ibp-tip { position: relative; padding-right: 44px; }
.ibp-tip__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.ibp-tip__close:hover { background: var(--color-surface-alt); color: var(--color-text); }

/* ── Document list ────────────────────────────────────────── */
.ibp-doc-list    { display: flex; flex-direction: column; gap: 0; padding: 0 20px; }
.ibp-doc-item    { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-border-subtle); }
.ibp-doc-item:last-child { border-bottom: none; padding-bottom: 0; }
.ibp-doc-icon    { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--color-surface-alt); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--color-text-muted); }
.ibp-doc-info    { flex: 1; min-width: 0; }
.ibp-doc-name    { font-size: 14px; font-weight: 500; color: var(--color-text); white-space: normal; word-break: break-word; }
.ibp-doc-meta    { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.ibp-doc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ibp-doc-list--investor { padding: 0; }
.ibp-doc-list--investor .ibp-doc-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
}
.ibp-doc-list--investor .ibp-doc-info { width: 100%; min-width: 0; }
.ibp-doc-list--investor .ibp-doc-name { overflow-wrap: normal; word-break: normal; }
.ibp-doc-file-name {
  display: flex;
  align-items: baseline;
  min-width: 0;
  white-space: nowrap;
}
.ibp-doc-file-name__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; word-break: normal; }
.ibp-doc-file-name__date { flex-shrink: 0; }
.ibp-doc-list--investor .ibp-doc-actions {
  grid-column: 2;
  width: 100%;
  padding: 8px 0 0;
}
.ibp-doc-list--investor .ibp-doc-actions .grw-btn {
  width: auto;
  margin-left: auto;
}

/* ── KYC document request list (investor-facing) ─────────── */
.ibp-doc-request-list     { display: flex; flex-direction: column; gap: 16px; }
.ibp-doc-request-item     { padding: 14px 16px; border: 1px solid var(--color-border); border-radius: var(--r-md); background: var(--color-surface); }
.ibp-doc-request-header   { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ibp-doc-request-header .ibp-font-500 { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.ibp-doc-request-header .grw-badge { flex-shrink: 0; margin-top: 2px; }
.ibp-upload-form          { display: flex; flex-direction: column; gap: 4px; }
.grw-file-input-wrap      { position: relative; display: flex; align-items: center; gap: 8px; }
.grw-file-input           { width: 0.1px; height: 0.1px; opacity: 0; overflow: hidden; position: absolute; z-index: -1; }
.grw-file-label           { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; font-weight: 500; border-radius: var(--r-sm); background: var(--color-surface-alt); border: 1px solid var(--color-border); color: var(--color-text); cursor: pointer; transition: background .15s; }
.grw-file-label:hover     { background: var(--color-border-subtle); }
.ibp-kyc-attention        { border-color: color-mix(in srgb, var(--color-warning) 38%, var(--color-border)); background: color-mix(in srgb, var(--color-warning) 3%, var(--color-surface)); }
.ibp-icon--warning        { color: var(--grw-amber, #f59e0b); vertical-align: middle; }
.ibp-mr-1                 { margin-right: 4px; }
.ibp-kyc-continuity-note  { margin: 10px 0 0; padding: 9px 11px; border-radius: var(--r-sm); background: var(--color-info-subtle, rgba(23,92,211,0.07)); color: var(--color-text-secondary); font-size: 12px; line-height: 1.5; }
.ibp-doc-replace          { position: relative; }
.ibp-doc-replace > summary { list-style: none; cursor: pointer; }
.ibp-doc-replace > summary::-webkit-details-marker { display: none; }
.ibp-doc-replace__form    { width: min(360px, calc(100vw - 64px)); margin-top: 8px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--r-md); background: var(--color-surface); box-shadow: var(--shadow-md); }
.ibp-doc-replace__form .grw-helper { margin: 6px 0 12px; }

@media (max-width: 640px) {
  .ibp-doc-item { align-items: flex-start; flex-wrap: wrap; }
  .ibp-doc-actions { width: 100%; padding-left: 48px; }
  .ibp-doc-actions .grw-btn { flex: 1; }
  .ibp-doc-replace { flex: 1; }
  .ibp-doc-replace > summary { justify-content: center; }
}

@media (max-width: 900px) {
  .ibp-doc-list--investor .ibp-doc-item {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
  }
  .ibp-doc-list--investor .ibp-doc-actions {
    grid-column: 2;
    width: 100%;
    padding: 8px 0 0;
  }
  .ibp-doc-list--investor .ibp-doc-actions .grw-btn { margin-left: auto; }
  .ibp-doc-list--investor .ibp-doc-file-name { display: block; }
  .ibp-doc-list--investor .ibp-doc-file-name__text { display: block; }
  .ibp-doc-list--investor .ibp-doc-file-name__date { display: block; margin-top: 2px; }
  .ibp-doc-list--investor .ibp-doc-file-name__date > span { display: none; }
}

/* ── KYC document request list (admin review) ─────────────── */
.ibp-doc-list--requests { display: flex; flex-direction: column; gap: 10px; padding: 4px 20px 20px; }
.ibp-doc-item--request {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--color-border-subtle);
  border-left: 3px solid var(--color-border);
  border-radius: var(--r-md);
  background: var(--color-surface);
}
.ibp-doc-item--request.is-pending   { border-left-color: var(--color-warning); background: rgba(183,121,31,0.04); }
.ibp-doc-item--request.is-submitted { border-left-color: var(--color-info);    background: rgba(23,92,211,0.04); }
.ibp-doc-item--request.is-resolved  { opacity: 0.7; }
.ibp-doc-item__header  { display: flex; align-items: flex-start; gap: 12px; }
.ibp-doc-item__status  { flex-shrink: 0; white-space: nowrap; margin-top: 1px; }
.ibp-doc-item__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.ibp-doc-review-form,
.ibp-doc-review-form .grw-textarea { width: 100%; }

/* Submitted requests use <details> so the review form (textarea + approve/
   reject) is collapsed by default — with several pending requests, having
   every one permanently expanded made this section very long. */
details.ibp-doc-item--request { padding: 0; }
details.ibp-doc-item--request > summary {
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
details.ibp-doc-item--request > summary::-webkit-details-marker { display: none; }
details.ibp-doc-item--request > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
details.ibp-doc-item--request[open] > summary::after { transform: rotate(-135deg); }
.ibp-doc-item__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 14px;
}

/* Sub-groups within a consolidated documents card (e.g. "Needs your review",
   "Awaiting investor", "On file") — a quiet divider + label, not a full card. */
.ibp-doc-section + .ibp-doc-section { border-top: 1px solid var(--color-border-subtle); }
.ibp-doc-section__title {
  padding: 16px 20px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.ibp-doc-section:first-child .ibp-doc-section__title { padding-top: 14px; }
.ibp-doc-section:last-child .ibp-doc-list,
.ibp-doc-section:last-child .ibp-doc-list--requests { padding-bottom: 20px; }

/* ── Generic collapsible section (native <details>/<summary>) ─────────────
   Reused wherever a secondary form/list would otherwise always render open
   and add unnecessary length to a page (KYC doc requests, profile update
   review forms, admin settings' secret-value editors). Closed by default. */
.ibp-collapsible { border-top: 1px solid var(--color-border-subtle); }
.ibp-collapsible__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.ibp-collapsible__toggle::-webkit-details-marker { display: none; }
.ibp-collapsible__toggle::after {
  content: '';
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.ibp-collapsible[open] > .ibp-collapsible__toggle::after { transform: rotate(-135deg); }
.ibp-collapsible__body { padding: 0 20px 20px; }

@media (max-width: 680px) {
  .ibp-doc-list--requests { padding: 4px 12px 16px; }
  .ibp-doc-item--request { padding: 14px; }
  .ibp-doc-item--request .ibp-doc-item__header {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px 12px;
  }
  .ibp-doc-item--request .ibp-doc-item__status {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    margin-top: 0;
    white-space: normal;
  }
  .ibp-doc-item--request .ibp-doc-name { white-space: normal; }
  .ibp-doc-item--request .ibp-doc-item__actions {
    justify-content: stretch;
  }
  .ibp-doc-item--request .ibp-doc-item__actions > .grw-btn,
  .ibp-doc-item--request .ibp-doc-item__actions > form,
  .ibp-doc-item--request .ibp-doc-item__actions > form .grw-btn {
    width: 100%;
  }
  .ibp-doc-review-form .grw-textarea {
    display: block;
    min-height: 88px;
    margin-inline: auto;
  }
  .ibp-doc-review-form .ibp-row-actions {
    justify-content: center;
    gap: 8px;
  }
  .ibp-doc-review-form .ibp-row-actions .grw-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
}

/* ── Authenticator app (TOTP) setup ───────────────────────── */
.ibp-totp-steps  { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.ibp-totp-steps > li { border-bottom: 1px solid var(--color-border-subtle); padding-bottom: 20px; }
.ibp-totp-steps > li:last-child { border-bottom: none; padding-bottom: 0; }
.ibp-totp-qr     { display: block; border: 1px solid var(--color-border); border-radius: var(--r-md); padding: 10px; background: #fff; }
.ibp-totp-key    { font-family: var(--font-mono, monospace); font-size: 14px; letter-spacing: 0.5px; background: var(--color-surface-alt); border: 1px solid var(--color-border); border-radius: var(--r-sm); padding: 8px 12px; display: inline-block; user-select: all; }

/* ── Chat / Message thread ────────────────────────────────── */
.ibp-thread           { display: flex; flex-direction: column; gap: 16px; padding: 16px 0; }
.ibp-bubble           { max-width: 75%; display: flex; flex-direction: column; }
.ibp-bubble--investor { align-self: flex-end; align-items: flex-end; }
.ibp-bubble--admin    { align-self: flex-start; align-items: flex-start; }
.ibp-bubble__body     { padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.ibp-bubble--investor .ibp-bubble__body {
  background: var(--grw-deep-green);
  color: #fff;
  border-radius: 12px 12px 0 12px;
}
.ibp-bubble--admin .ibp-bubble__body {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: 12px 12px 12px 0;
  color: var(--color-text);
}
.ibp-bubble__meta     { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* ── Status timeline ──────────────────────────────────────── */
.ibp-timeline         { display: flex; flex-direction: column; }
.ibp-timeline__item   { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.ibp-timeline__item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--color-border-subtle);
}
.ibp-timeline__dot         { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.ibp-timeline__dot--success { background: var(--color-success); }
.ibp-timeline__dot--warning { background: var(--color-warning); }
.ibp-timeline__dot--error   { background: var(--color-error); }
.ibp-timeline__dot--info    { background: var(--color-info); }
.ibp-timeline__dot--pending { background: var(--color-pending); }
.ibp-timeline__dot--neutral { background: var(--color-text-muted); }
.ibp-timeline__content      { flex: 1; }
.ibp-timeline__title        { font-size: 14px; font-weight: 600; color: var(--color-text); }
.ibp-timeline__date         { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Dropdown action menu ─────────────────────────────────── */
.ibp-dropdown         { position: relative; display: inline-block; }
.ibp-dropdown__menu   {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: var(--z-dropdown);
  padding: 4px;
  display: none;
}
.ibp-dropdown__menu.is-open       { display: block; }
.ibp-dropdown__item               { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; color: var(--color-text); cursor: pointer; border: none; background: none; width: 100%; text-align: left; text-decoration: none; font-family: var(--font-ui); }
.ibp-dropdown__item:hover         { background: var(--color-surface-alt); }
.ibp-dropdown__item--danger       { color: var(--color-error); }
.ibp-dropdown__item--danger:hover { background: rgba(180,35,24,0.06); }
.ibp-dropdown__sep                { height: 1px; background: var(--color-border-subtle); margin: 4px 0; }

/* Fixed-position variant [data-dropdown-toggle] — escapes any overflow:auto/hidden ancestor
   (e.g. a horizontally-scrolling table wrapper) by positioning from viewport coordinates that
   ibp.js computes and writes into --ibp-dropdown-left/top on open. */
.ibp-dropdown__menu--fixed {
  position: fixed;
  left: var(--ibp-dropdown-left, 0);
  top: var(--ibp-dropdown-top, 0);
  right: auto;
}

/* Icon-only trigger button (kebab menus, etc.) */
.ibp-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: var(--r-sm); border: 1px solid var(--color-border-subtle);
  background: transparent; color: var(--color-text-muted); cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.ibp-icon-btn:hover { background: var(--color-surface-alt); color: var(--color-text); }
.ibp-icon-btn svg { width: 16px; height: 16px; }
.ibp-icon-btn.is-active { background: var(--color-primary-tint, rgba(0,101,39,0.1)); border-color: var(--color-primary); color: var(--color-primary); }

/* Toggleable filter chip (e.g. "Needs attention") */
.ibp-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--color-text-muted);
  background: var(--color-surface); border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-full); padding: 6px 12px 6px 10px; text-decoration: none;
  white-space: nowrap; cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.ibp-chip:hover { background: var(--color-surface-alt); }
.ibp-chip__count {
  background: var(--color-warning); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}
.ibp-chip--active { background: rgba(0, 101, 39, 0.1); border-color: var(--color-primary); color: var(--color-primary); }
.ibp-chip--active .ibp-chip__count { background: var(--color-primary); }

/* ── Conversation list item ───────────────────────────────── */
.ibp-conv-list          { display: flex; flex-direction: column; }
.ibp-conv-item          { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-bottom: 1px solid var(--color-border-subtle); text-decoration: none; color: inherit; transition: background var(--transition-fast); }
.ibp-conv-item:hover    { background: var(--color-surface-alt); }
.ibp-conv-item--unread .ibp-conv-subject { font-weight: 700; }
.ibp-unread-dot         { width: 8px; height: 8px; border-radius: 50%; background: var(--grw-light-green); flex-shrink: 0; margin-top: 6px; }
.ibp-unread-dot--read   { background: transparent; }
.ibp-conv-body          { flex: 1; min-width: 0; }
.ibp-conv-subject       { font-size: 14px; color: var(--color-text); }
.ibp-conv-preview       { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibp-conv-meta          { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ibp-conv-date          { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }

/* ── Auth layout extras ───────────────────────────────────── */
.ibp-feature-list  { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.ibp-feature-item  { display: flex; align-items: flex-start; gap: 12px; }
.ibp-feature-icon  { width: 32px; height: 32px; border-radius: 8px; background: rgba(132,202,35,0.15); border: 1px solid rgba(132,202,35,0.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--grw-light-green); }
.ibp-feature-text  { font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.5; }
.ibp-feature-text strong { color: #fff; }
.ibp-trust-badges  { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.ibp-trust-badge   { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 6px 12px; font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 500; letter-spacing: 0.04em; }
.ibp-security-footer { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--color-border-subtle); }
.ibp-security-item   { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--color-text-muted); }

/* ── Access denied / empty states ────────────────────────── */
.ibp-center-block  { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 24px; }
.ibp-error-icon    { width: 80px; height: 80px; border-radius: 50%; background: rgba(180,35,24,0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; color: var(--color-error); }
.ibp-empty-icon    { width: 64px; height: 64px; border-radius: 50%; background: var(--color-surface-alt); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: var(--color-text-muted); }
.ibp-empty-title   { font-size: 16px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.ibp-empty-sub     { font-size: 14px; color: var(--color-text-muted); }

/* ── Sticky panel ─────────────────────────────────────────── */
.ibp-sticky { position: sticky; top: calc(var(--topbar-height) + 24px); }

/* ── Divider ──────────────────────────────────────────────── */
.ibp-divider        { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 13px; color: var(--color-text-muted); }
.ibp-divider::before, .ibp-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border-subtle); }

/* ── Brand logo in sidebar (text) ─────────────────────────── */
.ibp-brand-logo { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.ibp-brand-sub  { font-size: 10px; color: rgba(255,255,255,0.45); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Right-aligned label row (password + forgot link) ─────── */
.ibp-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ibp-label-row .grw-label { margin: 0; }

/* ── Auth footer note ─────────────────────────────────────── */
.ibp-auth-footer-note { margin-top: 20px; text-align: center; font-size: 13px; color: var(--color-text-muted); }

/* ── Report table (dense) ─────────────────────────────────── */
.ibp-report-table tbody { font-size: 13px; }
.ibp-report-table tbody tr:nth-child(even) { background: var(--color-surface-alt); }
.ibp-report-table th,
.ibp-report-table td { vertical-align: middle; }
.ibp-report-table .grw-table__amount {
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.ibp-report-na {
  color: var(--color-text-muted);
  font-weight: 500;
}
.ibp-report-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 140px;
}
.ibp-report-status__details {
  display: grid;
  gap: 4px;
  width: 100%;
}
.ibp-report-status__detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-size: 11px;
  line-height: 1.35;
}
.ibp-report-status__label {
  color: var(--color-text-muted);
  white-space: nowrap;
}
.ibp-report-status__value {
  color: var(--color-text);
  font-weight: 600;
  text-align: right;
}
.ibp-report-status--center {
  align-items: center;
  margin-inline: auto;
}
.ibp-report-status--center .ibp-report-status__detail {
  justify-content: space-between;
}
.ibp-report-status--center .ibp-report-status__value {
  text-align: right;
}
.ibp-report-count {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.ibp-report-count > div:first-child strong {
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: 15px;
}
.ibp-report-count > div:first-child span,
.ibp-report-count__breakdown {
  color: var(--color-text-muted);
  font-size: 11px;
}
.ibp-report-count__breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 10px;
}
.ibp-report-count__breakdown strong {
  color: var(--color-text);
  font-family: var(--font-ui);
}

/* ── Auto-fill grid (export/filter fields) */
.ibp-grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

/* ── Info banner */
.ibp-info-banner { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; background: var(--color-info-surface, #eff6ff); border-radius: 6px; border-left: 3px solid var(--color-info, #3b82f6); color: var(--color-info, #3b82f6); }
.ibp-info-banner p { margin: 0; font-size: 13px; color: var(--color-info-text, #1e40af); }

/* ── Inline link */
.ibp-link       { color: var(--grw-deep-green); text-decoration: none; }
.ibp-link:hover { text-decoration: underline; }

/* ── Access-denied page */
.ibp-error-desc    { font-size: 15px; color: var(--color-text-muted); line-height: 1.65; max-width: 380px; margin: 0 auto 24px; }
.ibp-error-actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }

/* ── Allocate inline form (compact) ──────────────────────── */
.ibp-inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.ibp-inline-form .grw-input { height: 32px; font-size: 13px; }

/* ── User status indicators ───────────────────────────────── */
.ibp-status-active   { color: var(--color-success); font-weight: 600; }
.ibp-status-inactive { color: var(--color-error);   font-weight: 600; }

/* ── Context panel ────────────────────────────────────────── */
.ibp-context-panel  { background: var(--color-surface-alt); border: 1px solid var(--color-border-subtle); border-radius: var(--r-md); padding: 12px 16px; }
.ibp-projection-panel { background: var(--color-surface-alt); border: 1px solid var(--color-border-subtle); border-radius: var(--r-md); padding: 14px 16px; min-width: 0; }
.ibp-projection-panel__title { font-size: 14px; font-weight: 700; color: var(--color-text); margin-bottom: 2px; }
.ibp-projection-panel .ibp-kv-grid dd { text-align: right; font-variant-numeric: tabular-nums; }
[data-topup-summary] .ibp-kv-grid dd { text-align: left; font-variant-numeric: normal; overflow-wrap: anywhere; min-width: 0; }
.ibp-topup-combined-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; padding: 6px 8px; background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: var(--r-sm); font-size: 13px; }
.ibp-formula-stack { display: grid; gap: 4px; margin-top: 12px; color: var(--color-text-muted); font-size: 12px; line-height: 1.45; }
.ibp-nested-fields { display: grid; gap: 12px; padding: 12px; border: 1px dashed var(--color-border-subtle); border-radius: var(--r-md); background: var(--color-surface); }
.ibp-nested-fields[hidden] { display: none; }
.ibp-fieldset-reset { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: grid; gap: 12px; }
.ibp-fieldset-reset[hidden] { display: none; }
.ibp-segmented-control { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; border: 1px solid var(--color-border-subtle); border-radius: var(--r-md); background: var(--color-surface-alt); }
.ibp-segmented-control__item { position: relative; display: flex; align-items: center; justify-content: center; min-height: 34px; border-radius: calc(var(--r-md) - 3px); color: var(--color-text-muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease; }
.ibp-segmented-control__item input { position: absolute; opacity: 0; pointer-events: none; }
.ibp-segmented-control__item:has(input:checked) { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }

/* ── Offer detail v1 inspired layout ─────────────────────── */
.od-hero {
  background: linear-gradient(135deg, var(--grw-dark-green, #003d1d) 0%, var(--grw-deep-green, #006527) 62%, #004d1e 100%);
  border-radius: var(--r-xl, 14px);
  padding: clamp(22px, 3vw, 34px);
  margin-bottom: var(--sp-6, 24px);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.od-hero::before,
.od-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(132, 202, 35, 0.08);
  pointer-events: none;
}
.od-hero::before { width: 240px; height: 240px; top: -70px; right: -60px; }
.od-hero::after { width: 320px; height: 320px; bottom: -120px; left: 38%; background: rgba(132, 202, 35, 0.05); }
.od-hero__top { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.od-hero__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--r-full, 999px);
  background: rgba(255,255,255,0.13); color: #d9f99d;
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 12px; font-weight: 800;
}
.od-hero__status { background: rgba(22,128,60,.30) !important; border: 1px solid rgba(132,202,35,.38); color: #bbf7d0 !important; }
.od-hero__timing { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.od-hero__date-band { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.88); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; }
.od-hero__date-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; opacity: .60; margin-right: 2px; }
.od-hero__date-arrow { opacity: .45; font-weight: 400; }
.od-hero__cd-after { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; opacity: .60; align-self: flex-end; padding-bottom: 3px; margin-left: 1px; }
.od-hero__countdown {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-md, 8px); padding: 7px 14px;
}
.od-hero__cd-seg { text-align: center; min-width: 34px; }
.od-hero__cd-val { font-size: 19px; font-weight: 900; font-family: var(--font-mono); line-height: 1; font-variant-numeric: tabular-nums; }
.od-hero__cd-lbl { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .7; margin-top: 3px; }
.od-hero__cd-sep { opacity: .55; font-weight: 900; align-self: flex-start; padding-top: 1px; }
.od-hero__identity { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; margin-bottom: 24px; min-width: 0; }
.od-hero__logo { width: 66px; height: 66px; border-radius: var(--r-lg, 12px); object-fit: contain; background: rgba(255,255,255,.96); border: 1px solid rgba(255,255,255,.22); padding: 8px; flex-shrink: 0; box-shadow: 0 14px 34px rgba(0,0,0,.18); }
.od-hero__logo--fallback { display: flex; align-items: center; justify-content: center; color: var(--grw-deep-green, #006527); font-weight: 900; font-size: 24px; font-family: var(--font-ui); }
.od-hero__copy { min-width: 0; }
.od-hero__title { font-size: clamp(24px, 3vw, 34px); line-height: 1.12; font-weight: 850; margin: 0 0 7px; text-wrap: balance; }
.od-hero__sub { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; }
.od-hero__metrics { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.13); border-radius: var(--r-md, 8px); overflow: hidden; }
.od-hero__metrics--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.od-hero__metric { background: rgba(0,0,0,.15); padding: 14px 16px; min-width: 0; }
.od-hero__metric-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .66; margin-bottom: 5px; }
.od-hero__metric-val { font-size: clamp(16px, 1.75vw, 21px); font-weight: 700; font-family: var(--font-ui); line-height: 1.2; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.od-hero__metric-val--money { color: #84ca23; }
.od-hero__metric-val--list { line-height: 1.45; letter-spacing: 0; }
.od-hero__metric-sub { font-size: 11px; opacity: .62; margin-top: 3px; }
.od-hero__progress-wrap { position: relative; z-index: 1; margin-top: 16px; }
.od-hero__progress-label { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; color: rgba(255,255,255,.75); margin-bottom: 7px; }
.od-hero__progress-bar { height: 6px; background: rgba(255,255,255,.2); border-radius: var(--r-full, 999px); overflow: hidden; }
.od-hero__progress-fill { height: 100%; border-radius: inherit; background: var(--grw-light-green, #84ca23); }
.od-split { --od-panel-height: min(760px, calc(100dvh - var(--topbar-height, 64px) - 126px)); display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-6, 24px); align-items: stretch; }
.od-left { min-width: 0; }
/* z-index is required (not just for stacking order among od-right's own
   children) — position:sticky always opens a new stacking context, even at
   z-index:auto. Without an explicit value here, that context lands in the
   z-index:auto "layer" and paints BEHIND any other element on the page that
   has an explicit z-index (e.g. .od-hero__metrics at z-index:1) — which
   swallowed the confirmation modals nested inside this panel, regardless of
   their own (much higher) z-index, since a descendant's z-index only ranks
   it within its own stacking context, not the page's. */
.od-right { position: sticky; top: calc(var(--topbar-height, 64px) + 20px); align-self: start; z-index: 2; }
.od-info-card { height: var(--od-panel-height); min-height: 560px; display: flex; overflow: hidden; }
.od-info-card .grw-card__body { padding: 20px; display: flex; flex-direction: column; min-height: 0; width: 100%; }
.od-tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--color-border, #e5e7eb); margin-bottom: 20px; overflow-x: auto; flex-shrink: 0; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.od-tab-btn {
  padding: 10px 18px; font-size: 13px; font-weight: 700;
  color: var(--color-text-muted); border: 0; background: transparent;
  cursor: pointer; white-space: nowrap; border-bottom: 2.5px solid transparent;
  margin-bottom: -2px; transition: color .16s ease, border-color .16s ease;
  font-family: var(--font-ui); scroll-snap-align: start; flex: 0 0 auto;
}
.od-tab-btn:hover { color: var(--color-text); }
.od-tab-btn.is-active { color: var(--grw-deep-green, #006527); border-bottom-color: var(--grw-deep-green, #006527); }
.od-tab-panel[hidden] { display: none; }
.od-tab-panel { animation: od-tab-in .16s ease; overflow: auto; min-height: 0; padding-right: 4px; flex: 1 1 auto; width: 100%; scrollbar-width: thin; }
@keyframes od-tab-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.od-section + .od-section { margin-top: 22px; }
.od-section__header { margin-bottom: 12px; }
.od-section__title { margin: 0; font-size: 15px; line-height: 1.25; font-weight: 800; color: var(--color-text); }
.od-overview-stack { display: flex; flex-direction: column; gap: 18px; width: 100%; }
.od-overview-intro {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface-alt);
}
.od-overview-kicker {
  margin-bottom: 6px;
  color: var(--grw-deep-green, #006527);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.od-overview-intro p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.od-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.od-overview-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface);
}
.od-overview-card span {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 750;
}
.od-overview-card strong {
  display: block;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.od-overview-card--money strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-primary, #006527);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.od-checklist { display: flex; flex-direction: column; gap: 10px; }
.od-checklist__item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface);
}
.od-checklist__mark {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full, 999px);
  background: rgba(0,101,39,.10);
  color: var(--grw-deep-green, #006527);
  font-size: 12px;
  font-weight: 850;
}
.od-checklist__item p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 4px; bottom: 4px; width: 2px; background: var(--color-border, #e5e7eb); }
.tl-item { position: relative; margin-bottom: 24px; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot { position: absolute; left: -23px; top: 2px; width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--color-border, #e5e7eb); background: var(--color-surface); display: flex; align-items: center; justify-content: center; color: #fff; }
.tl-dot--done { background: var(--color-success, #16803c); border-color: var(--color-success, #16803c); }
.tl-dot--active { background: var(--grw-deep-green, #006527); border-color: var(--grw-deep-green, #006527); box-shadow: 0 0 0 3px rgba(0,101,39,.18); }
.tl-date { font-size: 11px; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.tl-title { font-size: 14px; font-weight: 800; color: var(--color-text); }
.tl-desc { font-size: 13px; color: var(--color-text-secondary); margin-top: 3px; line-height: 1.5; }
.sub-widget { height: var(--od-panel-height); min-height: 560px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--r-xl, 14px); overflow: hidden; box-shadow: var(--shadow-md, 0 10px 26px rgba(15,23,42,.08)); display: flex; flex-direction: column; }
.sub-widget__header { padding: 18px 20px 14px; border-bottom: 1px solid var(--color-border-subtle); }
.sub-widget__title { font-size: 15px; font-weight: 850; color: var(--color-text); margin: 0 0 3px; }
.sub-widget__subtitle { font-size: 12px; color: var(--color-text-muted); margin: 0; line-height: 1.45; }
.sub-widget__body { padding: 20px; overflow: auto; min-height: 0; scrollbar-width: thin; }
.ibp-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.ibp-table-scroll .grw-table { min-width: 640px; }

@media (max-width: 1100px) {
  .od-split { grid-template-columns: 1fr; }
  .od-right { position: static; }
  .od-info-card,
  .sub-widget { height: auto; min-height: 0; }
  .od-tab-panel,
  .sub-widget__body { overflow: visible; }
}
@media (max-width: 760px) {
  .od-hero__timing { width: 100%; margin-left: 0; align-items: center; }
  .od-hero__date-band { justify-content: center; }
  .od-hero__countdown { width: 100%; justify-content: center; }
  .od-hero__identity { align-items: flex-start; gap: 12px; }
  .od-hero__logo { width: 54px; height: 54px; border-radius: var(--r-md, 8px); }
  .od-hero__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .od-hero__metrics--3col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .od-hero__progress-label { flex-direction: column; gap: 4px; }
  .od-info-card .grw-card__body { padding: 14px; }
  .od-tab-nav {
    gap: 6px; border-bottom: 0; margin-bottom: 16px; padding: 4px;
    border: 1px solid var(--color-border-subtle); border-radius: var(--r-md, 8px);
    background: var(--color-surface-alt); scroll-snap-type: x proximity;
  }
  .od-tab-btn {
    min-height: 38px; padding: 8px 12px; border-radius: calc(var(--r-md, 8px) - 3px);
    border-bottom: 0; margin-bottom: 0; background: transparent; min-width: max-content;
  }
  .od-tab-btn.is-active { background: var(--color-surface); box-shadow: 0 1px 2px rgba(15,23,42,.08); border-bottom-color: transparent; }
  .ibp-kv-grid { grid-template-columns: 1fr; gap: 4px 0; }
  .ibp-kv-grid dd { margin-bottom: 8px; overflow-wrap: anywhere; }
  .od-overview-grid { grid-template-columns: 1fr; }
  .od-overview-intro,
  .od-overview-card,
  .od-checklist__item { padding-inline: 12px; }
  .ibp-table-scroll { margin-inline: -2px; padding-bottom: 4px; position: relative; }

  /* Unlike .grw-table-wrap, this scroll container never had a hint that a
     table like Available Series / Tenor Options extends past the viewport —
     the last column (e.g. Gross Implied Yield) could be silently cut off. */
  .ibp-table-scroll::before {
    content: 'Scroll sideways to view all columns';
    display: block;
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--r-md, 8px);
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
  }
}
@media (max-width: 480px) {
  .od-hero__metrics,
  .od-hero__metrics--3col { grid-template-columns: 1fr; }
  .od-hero__identity { flex-direction: column; }
  .od-tab-btn { padding-inline: 12px; }
  .sub-widget__body { padding: 16px; }

  /* Large deal-size figures (₦30,000,000,000.00) could still be wider than
     one line at this width even after stacking to a single column, and
     overflow-wrap:anywhere would break them mid-digit-group rather than
     shrink — drop the size floor further before letting it wrap at all. */
  .od-hero__metric-val { font-size: clamp(14px, 4.5vw, 18px); }
}
.ibp-context-label  { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); margin-bottom: 4px; }
.ibp-context-value  { font-size: 14px; color: var(--color-text); }

/* ── Layout: form narrow container ───────────────────────── */
.ibp-form-narrow { max-width: 680px; margin-inline: auto; display: flex; flex-direction: column; gap: 20px; }
.ibp-form-wide   { max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: 20px; }

/* ── Layout: two-col variant with wider right ────────────── */
.ibp-layout-2col--380 { grid-template-columns: 1fr 380px; }

/* ── Layout: detail stack (left column items) ────────────── */
.ibp-detail-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Subscription detail cards: history and actions can span both columns. */
.ibp-subscription-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  min-width: 0;
}
.ibp-subscription-grid > * { min-width: 0; }
.ibp-subscription-grid .ibp-kv-grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}
.ibp-subscription-grid .ibp-kv-grid dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .ibp-subscription-grid { grid-template-columns: minmax(0, 1fr); }
}




/* ── Layout: grid variants ────────────────────────────────── */
.ibp-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ibp-grid-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.ibp-col-full  { grid-column: 1 / -1; }

/* ── Definition list variants ─────────────────────────────── */
.ibp-dl-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.ibp-dl-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 0; }
.ibp-dl-term { font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 2px; }
.ibp-dl-defn { font-size: 14px; font-weight: 500; color: var(--color-text); margin: 0; }
.ibp-dl-defn--mono { font-family: monospace; font-size: 13px; letter-spacing: 0.05em; }

/* ── Data list (key/value) ────────────────────────────────── */
.ibp-kv-grid { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.ibp-kv-grid dt { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.ibp-kv-grid dd { font-size: 14px; margin: 0; }
.ibp-kv-grid--compact { grid-template-columns: 150px 1fr; gap: 6px 12px; }

/* ── Stats grid (3 cells) ─────────────────────────────────── */
.ibp-stats-3col    { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.ibp-stat-cell     { padding: 16px; background: var(--color-surface-alt); border-radius: 8px; text-align: center; }
.ibp-stat-cell__value { font-size: 24px; font-weight: 700; color: var(--grw-deep-green); }
.ibp-stat-cell__label { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

/* ── Stats grid (auto-fill, any column count) ──────────────── */
.ibp-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.ibp-stat-card  { padding: 16px 20px; background: var(--color-surface-alt); border-radius: 8px; }

/* ── Flex utilities ───────────────────────────────────────── */
.ibp-flex         { display: flex; }
.ibp-flex-col     { flex-direction: column; }
.ibp-flex-wrap    { flex-wrap: wrap; }
.ibp-items-center { align-items: center; }
.ibp-items-start  { align-items: flex-start; }
.ibp-items-end    { align-items: flex-end; }
.ibp-justify-between { justify-content: space-between; }
.ibp-justify-end  { justify-content: flex-end; }
.ibp-justify-center { justify-content: center; }
.ibp-flex-1       { flex: 1; }
.ibp-flex-shrink-0 { flex-shrink: 0; }
.ibp-min-w-0      { min-width: 0; }
.ibp-ml-auto      { margin-left: auto; }
.ibp-gap-1        { gap: 4px; }
.ibp-gap-2        { gap: 8px; }
.ibp-gap-3        { gap: 12px; }
.ibp-gap-4        { gap: 16px; }
.ibp-gap-5        { gap: 20px; }
.ibp-gap-6        { gap: 24px; }

/* ── Spacing utilities ────────────────────────────────────── */
.ibp-mb-0 { margin-bottom: 0; }
.ibp-mb-2 { margin-bottom: 8px; }
.ibp-mb-3 { margin-bottom: 12px; }
.ibp-mb-4 { margin-bottom: 16px; }
.ibp-mb-5 { margin-bottom: 20px; }
.ibp-mb-6 { margin-bottom: 24px; }
.ibp-mb-8 { margin-bottom: 32px; }
.ibp-mt-1 { margin-top: 4px; }
.ibp-mt-2 { margin-top: 8px; }
.ibp-mt-3 { margin-top: 12px; }
.ibp-mt-4 { margin-top: 16px; }
.ibp-mt-auto { margin-top: auto; }
.ibp-pt-0 { padding-top: 0; }
.ibp-pt-4 { padding-top: 16px; }
.ibp-pb-0 { padding-bottom: 0; }
.ibp-p-4  { padding: 16px; }
.ibp-p-6  { padding: 24px; }

/* ── Typography ───────────────────────────────────────────── */
.ibp-text-xs     { font-size: 11px; }
.ibp-text-sm     { font-size: 13px; }
.ibp-text-base   { font-size: 14px; }
.ibp-text-lg     { font-size: 18px; }
.ibp-font-500    { font-weight: 500; }
.ibp-font-600    { font-weight: 600; }
.ibp-font-700    { font-weight: 700; }
.ibp-font-800    { font-weight: 800; }
.ibp-text-muted  { color: var(--color-text-muted); }
.ibp-text-secondary { color: var(--color-text-secondary, var(--color-text-muted)); }
.ibp-text-primary { color: var(--grw-deep-green); }
.ibp-text-success { color: var(--color-success, #16a34a); }
.ibp-text-center { text-align: center; }
.ibp-text-right  { text-align: right; }
.grw-table th.ibp-text-right,
.grw-table td.ibp-text-right { text-align: right; }
.grw-table th.ibp-text-center,
.grw-table td.ibp-text-center { text-align: center; }
.ibp-review-table th.ibp-text-right,
.ibp-review-table td.ibp-text-right { text-align: right; }
.ibp-review-table th.ibp-text-center,
.ibp-review-table td.ibp-text-center { text-align: center; }
.ibp-font-mono   { font-family: monospace; }
.ibp-uppercase   { text-transform: uppercase; letter-spacing: 0.04em; }
.ibp-nowrap      { white-space: nowrap; }
.ibp-truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibp-pre-wrap    { white-space: pre-wrap; }
.ibp-break-word  { word-break: break-word; }

/* ── Sizing ───────────────────────────────────────────────── */
.ibp-w-full        { width: 100%; }
.ibp-max-w-md      { max-width: 680px; }
.ibp-col-id        { width: 40px; }
.ibp-col-err       { max-width: 260px; }

/* ── Table cell content helpers ─────────────────────────────── */
.ibp-cell-primary   { display: block; font-size: 14px; font-weight: 500; }
.ibp-cell-secondary { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Visual ───────────────────────────────────────────────── */
.ibp-code      { font-family: monospace; font-size: 13px; background: var(--color-surface-alt); padding: 2px 6px; border-radius: 4px; }
.ibp-surface   { background: var(--color-surface); }
.ibp-surface-alt { background: var(--color-surface-alt); }
.ibp-rounded   { border-radius: 8px; }
.ibp-rounded-lg { border-radius: 12px; }
.ibp-border-t  { border-top: 1px solid var(--color-border-subtle); }
.ibp-border-b  { border-bottom: 1px solid var(--color-border-subtle); }
.ibp-card--danger  { border: 1px solid rgba(180,35,24,0.25); }
.ibp-card--success { border: 1px solid rgba(22,128,60,0.25); }
.ibp-opacity-50 { opacity: 0.5; }

/* ── Back link ────────────────────────────────────────────── */
.ibp-back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--color-text-muted); text-decoration: none; margin-bottom: 16px; }
.ibp-back-link:hover { color: var(--grw-deep-green); text-decoration: none; }

/* ── Option cards (radio / checkbox wrapped in a selectable card) ── */
.ibp-type-cards                   { display: flex; gap: 12px; flex-wrap: wrap; }
.ibp-type-cards .grw-option-card  { flex: 1; min-width: 180px; }

/* ── Type card (radio button wrapped in a selectable card) ── */
.ibp-type-cards .ibp-type-card { flex: 1; min-width: 200px; }
.ibp-type-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-md, 8px);
  cursor: pointer;
  user-select: none;
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.ibp-type-card:hover { border-color: var(--grw-deep-green); }
.ibp-type-card:has(input:checked) {
  border-color: var(--grw-deep-green);
  box-shadow: 0 0 0 2px rgba(0,101,39,0.12), var(--shadow-sm);
  background: rgba(0,101,39,0.04);
}
.ibp-type-card::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ibp-type-card:has(input:checked)::before {
  border-color: var(--grw-deep-green);
  box-shadow: inset 0 0 0 4px var(--grw-deep-green);
}
.ibp-type-card__title { font-weight: 600; font-size: 14px; color: var(--color-text); }
.ibp-type-card__sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

.grw-option-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; cursor: pointer; user-select: none;
}
.grw-option-card:has(.grw-radio__input:checked),
.grw-option-card:has(.grw-check__input:checked) {
  border-color: var(--grw-deep-green);
  box-shadow: 0 0 0 2px rgba(0,101,39,0.12), var(--shadow-sm);
  background: rgba(0,101,39,0.04);
}
.grw-option-card__icon {
  width: 42px; height: 42px; border-radius: var(--r-md, 8px);
  background: var(--color-surface-alt);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--color-text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.grw-option-card:has(.grw-radio__input:checked) .grw-option-card__icon {
  background: rgba(0,101,39,0.10); color: var(--grw-deep-green);
}
.grw-option-card__body { flex: 1; min-width: 0; }
.grw-option-card__title { font-weight: 600; font-size: 14px; color: var(--color-text); }
.grw-option-card__sub   { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* ── Two-factor method chooser (stacked, roomier variant) ─── */
.ibp-2fa-method-list { display: flex; flex-direction: column; gap: 12px; }
.ibp-2fa-method-list .grw-option-card {
  width: 100%;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px;
}
.ibp-2fa-method-list .grw-option-card__icon { width: 44px; height: 44px; margin-top: 2px; }
.ibp-2fa-method-list .grw-option-card__title { font-size: 15px; }
.ibp-2fa-method-list .grw-option-card__sub   { font-size: 13px; line-height: 1.55; margin-top: 5px; }

/* ── Step indicator (complex) ─────────────────────────────── */
.ibp-steps-bar         { display: flex; gap: 0; margin-bottom: 32px; background: var(--color-surface-alt); border-radius: 8px; overflow: hidden; }
.ibp-step-tab          { flex: 1; padding: 14px 20px; display: flex; align-items: center; gap: 10px; }
.ibp-step-tab--active  { background: var(--grw-deep-green); color: #fff; }
.ibp-step-num          { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.ibp-step-tab--active .ibp-step-num  { background: rgba(255,255,255,0.3); }
.ibp-step-tab--pending .ibp-step-num { background: var(--color-border); color: var(--color-text-muted); }
.ibp-step-label        { font-size: 13px; font-weight: 600; }
.ibp-step-tab--pending .ibp-step-label { color: var(--color-text-muted); font-weight: 400; }

/* ── Director entry ───────────────────────────────────────── */
.ibp-director-entry     { padding: 16px; background: var(--color-surface-alt); border-radius: 8px; }
.ibp-director-heading   { font-size: 12px; font-weight: 600; color: var(--color-text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Upload panel ─────────────────────────────────────────── */
.ibp-upload-panel {
  margin-top: 12px;
  padding: 20px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border, #d0d5dd);
  border-radius: var(--r-lg, 12px);
  text-align: left;
}
.ibp-upload-panel__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.ibp-upload-panel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: var(--r-md, 8px);
  background: rgba(0, 101, 39, 0.08);
  color: var(--grw-deep-green, #006527);
}
.ibp-upload-panel__icon svg { width: 18px; height: 18px; }
.ibp-upload-panel--warning .ibp-upload-panel__icon { background: rgba(183, 121, 31, 0.12); color: #8B5A0F; }
.ibp-upload-panel__title { font-weight: 650; color: var(--color-text, #101828); overflow-wrap: anywhere; }
.ibp-upload-panel__meta { margin-top: 2px; font-size: 13px; color: var(--color-text-muted, #667085); overflow-wrap: anywhere; }
.ibp-upload-panel .grw-dropzone { padding: var(--sp-6, 20px) var(--sp-4, 16px); }
.ibp-upload-panel form > .grw-btn { margin-top: 16px; }
@media (max-width: 480px) {
  .ibp-upload-panel { padding: 16px; }
  .ibp-upload-panel form > .grw-btn { width: 100%; justify-content: center; }
}

/* ── Inline note input (workflow forms) ───────────────────── */
.ibp-inline-note { width: 120px; }

/* ── Sticky panel ─────────────────────────────────────────── */
.ibp-sticky-panel { position: sticky; top: 20px; }

/* ── Thread scrollable container ─────────────────────────── */
.ibp-thread-wrap { max-height: 480px; overflow-y: auto; scroll-behavior: smooth; }

/* ── Conversation list (investor inbox) ───────────────────── */
.ibp-conv-list-wrap { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.ibp-conv-row       { display: flex; align-items: stretch; gap: 0; padding: 14px 18px; border-bottom: 1px solid var(--color-border-subtle); background: var(--color-surface); text-decoration: none; color: inherit; transition: background 0.15s; }
.ibp-conv-row:hover { background: var(--color-surface-alt); }
.ibp-conv-row--unread { background: var(--color-primary-subtle, rgba(0,101,39,0.04)); }
.ibp-conv-row__dot  { width: 18px; flex-shrink: 0; display: flex; align-items: flex-start; padding-top: 4px; }
.ibp-conv-row__body { flex: 1; min-width: 0; }
.ibp-conv-row__title { font-size: 14px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibp-conv-row--unread .ibp-conv-row__title { font-weight: 700; }
.ibp-conv-row__preview { font-size: 13px; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ibp-conv-row__meta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: 16px; }
.ibp-conv-row__date { font-size: 12px; color: var(--color-text-muted); }
.ibp-unread-badge   { min-width: 20px; height: 20px; border-radius: 10px; background: var(--grw-deep-green); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* ── Pagination bar ───────────────────────────────────────── */
.ibp-pagination    { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ibp-pagination--center { justify-content: center; gap: 8px; }
.ibp-page-info     { font-size: 13px; color: var(--color-text-muted); }
.ibp-page-btns     { display: flex; gap: 6px; }
.ibp-pagination__controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ibp-page-size-select { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.ibp-page-size-select select { width: auto; min-width: 64px; }

/* ── Admin conversation item (wider layout) ───────────────── */
.ibp-admin-conv-list { display: flex; flex-direction: column; }
.ibp-admin-conv-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--color-border-subtle); text-decoration: none; color: inherit; transition: background 0.12s; }
.ibp-admin-conv-item:hover { background: var(--color-surface-alt); }
.ibp-admin-conv-item--unread { background: rgba(22,163,74,0.04); }
.ibp-admin-conv-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(22,163,74,0.15); color: #065F46; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ibp-admin-conv-body  { flex: 1; min-width: 0; }
.ibp-admin-conv-name  { font-weight: 600; font-size: 14px; }
.ibp-admin-conv-subject { font-size: 14px; }
.ibp-admin-conv-subject--bold { font-weight: 700; }
.ibp-admin-conv-preview { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.ibp-admin-conv-meta  { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ibp-admin-conv-date  { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }

/* ── Filter bar form ──────────────────────────────────────── */
.ibp-filter-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.ibp-filter-form .grw-form-group { margin: 0; min-width: 160px; }
.ibp-filter-form .ibp-flex-1 { min-width: 200px; }
.ibp-filter-form__actions { display: flex; gap: 8px; align-items: center; }

/* ── Subscriptions: type-sectioned tables ────────────────────
   One table per offer type (Commercial Paper / Bond / Public Offer / Rights
   Issue) rather than one flat list — each type has genuinely different
   natural columns (tenor+discount, tenor+yield, broker/CHN/CSCS, rights
   taken), so a single shared table either hid that detail or padded every
   row with mostly-empty cells. Reuses .grw-table + .ibp-table-card (see §8
   Mobile Card System) so each section is a normal sortable table on desktop
   and collapses to bordered cards at ≤680px for free — same responsive
   mechanics Admin's subscriptions table already relies on. */
.ibp-sub-list { display: flex; flex-direction: column; gap: 12px; }

/* This table has up to 12 columns depending on product type, far more than
   the shared .grw-table default (760px) accounts for. At typical desktop/
   tablet widths that forced every column to squeeze below its natural
   content width, and combined with .grw-table's overflow-wrap:anywhere
   default, long values (investor/offer names, subscription references,
   currency amounts) broke mid-word or mid-digit instead of the horizontal
   scroll .grw-table-wrap already provides (overflow-x:auto) — widening the
   table lets that scroll take over instead of squeeze-wrapping. */
.ibp-sub-table { min-width: 1320px; }

.ibp-sub-table th:first-child,
.ibp-sub-table td:first-child { min-width: 220px; }

/* Multi-word text (investor/offer names) should still wrap at a space if it
   ever has to — just never mid-word, which the overflow-wrap:anywhere
   default above allows. Single-token values (amounts, reference codes) have
   no word boundary to break at gracefully at all, so they stay on one line
   and rely on the table's horizontal scroll instead.
   Specificity note: table.grw-table.ibp-sub-table td (0,2,2) is deliberately
   more specific than the .grw-table td rule it's overriding (0,1,1) — with
   equal specificity the later-in-file rule wins regardless of which reads as
   "more specific to this table", and .grw-table td comes after this block. */
table.grw-table.ibp-sub-table td { overflow-wrap: normal; word-break: normal; }

/* min-width guard, not a media query on the .ibp-table-card breakpoint
   itself: below 681px this table is already in card view (a real table
   layout with no room to grow into on the sub-680px breakpoint's terms), so
   forcing nowrap there would just overflow the card silently — the mobile
   card CSS's own white-space:normal (see §8) is the right behaviour there. */
@media (min-width: 681px) {
  table.grw-table.ibp-sub-table td .ibp-font-mono,
  table.grw-table.ibp-sub-table td[data-label="Value"] .ibp-cell-primary {
    white-space: nowrap;
  }
}

/* Dashboard's "Recent Subscriptions" table — same squeeze-wrap problem as
   .ibp-sub-table above (shared .grw-table 760px default too narrow for its
   content, overflow-wrap:anywhere breaking amounts/references mid-character
   instead of letting .grw-table-wrap's horizontal scroll take over), just a
   simpler 6-column table so it gets its own, narrower min-width rather than
   reusing .ibp-sub-table's 1320px. */
@media (min-width: 681px) {
  table.grw-table.ibp-dash-sub-table { min-width: 1100px; }
  table.grw-table.ibp-dash-sub-table td { overflow-wrap: normal; word-break: normal; }
  table.grw-table.ibp-dash-sub-table td .ibp-mono,
  table.grw-table.ibp-dash-sub-table td[data-label="Amount"] {
    white-space: nowrap;
  }
}

/* Click-to-sort headers — global affordance for data tables with unambiguous, high-contrast indicators. */
th[data-sort-key] {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 28px !important;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
th[data-sort-key]:hover {
  background-color: var(--color-surface-alt, #F3F6F4);
  color: var(--color-primary, #006527);
}
th[data-sort-key]:focus-visible {
  outline: 2px solid var(--grw-light-green, #84CA23);
  outline-offset: -2px;
}
th[data-sort-key]::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.45;
  transition: opacity 0.15s ease, transform 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A9691' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 15l5 5 5-5'/%3E%3Cpath d='M7 9l5-5 5 5'/%3E%3C/svg%3E");
}
th[data-sort-key]:hover::after {
  opacity: 0.85;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23006527' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 15l5 5 5-5'/%3E%3Cpath d='M7 9l5-5 5 5'/%3E%3C/svg%3E");
}
th[data-sort-key].is-sorted-asc,
th[data-sort-key].is-sorted-desc {
  color: var(--color-primary, #006527) !important;
  font-weight: 700 !important;
  background-color: rgba(0, 101, 39, 0.08) !important;
}
th[data-sort-key].is-sorted-asc::after {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23006527' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='M5 12l7-7 7 7'/%3E%3C/svg%3E");
}
th[data-sort-key].is-sorted-desc::after {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23006527' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14'/%3E%3Cpath d='M19 12l-7 7-7-7'/%3E%3C/svg%3E");
}

.ibp-sub-table .ibp-pay-session-hint { text-align: left; max-width: none; margin: 6px 0 0; }
.ibp-sub-table .ibp-upload-panel { margin-top: 0; }

/* ── Admin subscriptions filters ─────────────────────────── */
.ibp-sub-filter {
  margin-bottom: 20px;
}

.ibp-sub-filter .grw-card__header {
  align-items: flex-start;
}

.ibp-sub-filter .grw-card__body {
  padding-top: 14px;
}

.ibp-sub-filter__form {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.35fr)
    minmax(150px, .85fr)
    minmax(170px, 1fr)
    minmax(160px, .9fr)
    minmax(125px, .65fr)
    minmax(125px, .65fr)
    minmax(132px, auto);
  gap: 12px;
  align-items: end;
}

.ibp-sub-filter__field {
  margin: 0;
  min-width: 0;
}

.ibp-sub-filter__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.ibp-sub-filter__actions .grw-btn {
  min-width: 62px;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .ibp-sub-filter__form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .ibp-sub-filter__field--search { grid-column: span 6; }
  .ibp-sub-filter__field--offer,
  .ibp-sub-filter__field--type { grid-column: span 6; }
  .ibp-sub-filter__field--status { grid-column: span 4; }
  .ibp-sub-filter__field--date { grid-column: span 3; }
  .ibp-sub-filter__actions { grid-column: span 2; }
}

@media (max-width: 900px) {
  .ibp-sub-filter__field--search,
  .ibp-sub-filter__field--offer,
  .ibp-sub-filter__field--type {
    grid-column: span 12;
  }

  .ibp-sub-filter__field--status,
  .ibp-sub-filter__field--date {
    grid-column: span 6;
  }

  .ibp-sub-filter__actions {
    grid-column: span 12;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .ibp-sub-filter .grw-card__header,
  .ibp-sub-filter .grw-card__body {
    padding-inline: 14px;
  }

  .ibp-sub-filter__form {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .ibp-sub-filter__field--search,
  .ibp-sub-filter__field--offer,
  .ibp-sub-filter__field--type,
  .ibp-sub-filter__field--status,
  .ibp-sub-filter__field--date,
  .ibp-sub-filter__actions {
    grid-column: 1;
  }

  .ibp-sub-filter__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ibp-sub-filter__actions .grw-btn {
    width: 100%;
  }
}

/* ── Admin reports filters (same visual language as subscriptions' filters,
   adapted for its 5-field shape: search, offer, status, from, to) ───────── */
.ibp-report-filter {
  margin-bottom: 28px;
}

.ibp-report-filter .grw-card__header {
  align-items: flex-start;
}

.ibp-report-filter .grw-card__body {
  padding-top: 14px;
}

.ibp-report-filter__form {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.4fr)
    minmax(190px, 1fr)
    minmax(170px, 1fr)
    minmax(125px, .65fr)
    minmax(125px, .65fr)
    minmax(132px, auto);
  gap: 12px;
  align-items: end;
}

.ibp-report-filter__field {
  margin: 0;
  min-width: 0;
}

.ibp-report-filter__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.ibp-report-filter__actions .grw-btn {
  min-width: 62px;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .ibp-report-filter__form {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .ibp-report-filter__field--search,
  .ibp-report-filter__field--offer { grid-column: span 6; }
  .ibp-report-filter__field--status { grid-column: span 4; }
  .ibp-report-filter__field--date { grid-column: span 3; }
  .ibp-report-filter__actions { grid-column: span 2; }
}

@media (max-width: 900px) {
  .ibp-report-filter__field--search,
  .ibp-report-filter__field--offer {
    grid-column: span 12;
  }

  .ibp-report-filter__field--status,
  .ibp-report-filter__field--date {
    grid-column: span 6;
  }

  .ibp-report-filter__actions {
    grid-column: span 12;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .ibp-report-filter .grw-card__header,
  .ibp-report-filter .grw-card__body {
    padding-inline: 14px;
  }

  .ibp-report-filter__form {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .ibp-report-filter__field--search,
  .ibp-report-filter__field--offer,
  .ibp-report-filter__field--status,
  .ibp-report-filter__field--date,
  .ibp-report-filter__actions {
    grid-column: 1;
  }

  .ibp-report-filter__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ibp-report-filter__actions .grw-btn {
    width: 100%;
  }
}

/* ── Admin subscriptions workflow and table ───────────────── */
/* auto-fit (not a fixed 2-column grid + a viewport media query) so each card
   reflows to its OWN available width — these cards sit inside a 2-column
   grid, so their rendered width is already ~half the viewport well before
   any viewport-based breakpoint would fire, which is what caused controls
   inside them to overlap instead of wrap at ordinary laptop widths. */
.admin-sub-workbench {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.admin-sub-workflow .grw-card__body {
  display: grid;
  gap: 14px;
}

.admin-sub-workflow__selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--r-md);
  background: var(--color-surface-alt);
}

.admin-sub-workflow__selected > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 180px;
}

.admin-sub-workflow__selected strong,
.admin-sub-workflow__selected span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-sub-workflow__selected .grw-btn {
  flex: 0 0 auto;
}

.admin-sub-workflow__label {
  color: var(--color-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Dropzone always full width above its own upload button — a drag target
   competing with a button for horizontal room never reads well, at any
   card width, so this isn't conditional on a breakpoint at all. */
.admin-sub-workflow__upload {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.admin-sub-workflow__upload .grw-form-group {
  width: 100%;
}

.admin-allocation-guide { margin-top: 18px; padding: 18px 20px; border: 1px solid var(--color-border); border-radius: var(--r-md); background: var(--grw-surface-muted); }
.admin-allocation-guide > div:first-child { display: grid; gap: 3px; }
.admin-allocation-guide > div:first-child strong { color: var(--color-text); font-size: .9375rem; }
.admin-allocation-guide > div:first-child span,
.admin-allocation-guide > p { color: var(--color-text-muted); font-size: .8125rem; line-height: 1.5; }
.admin-allocation-guide dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 22px; margin: 16px 0 12px; }
.admin-allocation-guide dl > div { min-width: 0; }
.admin-allocation-guide dt { color: var(--color-text); font-size: .8125rem; font-weight: 650; }
.admin-allocation-guide dd { margin: 3px 0 0; color: var(--color-text-muted); font-size: .8125rem; line-height: 1.45; overflow-wrap: anywhere; }
.admin-allocation-guide code { font-size: .78rem; overflow-wrap: anywhere; }
.admin-allocation-guide > p { margin: 0; }

/* Allocation review: a flat, decision-focused summary followed by row evidence. */
.admin-allocation-preview__eyebrow { display: block; margin-bottom: 6px; color: var(--color-text-muted); font-size: .75rem; font-weight: 650; letter-spacing: .045em; text-transform: uppercase; }
.admin-allocation-preview { margin-bottom: 20px; padding: 22px 24px; border: 1px solid var(--color-border); border-radius: var(--r-lg); background: var(--grw-surface); }
.admin-allocation-preview__summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.admin-allocation-preview__summary-head h2 { margin: 0; color: var(--color-text); font-size: 1rem; }
.admin-allocation-preview__summary-head div > span { color: var(--color-text-muted); font-size: .75rem; }
.admin-allocation-preview__metrics { display: grid; grid-template-columns: .75fr 1.2fr 1.2fr 1fr; gap: 0; }
.admin-allocation-preview__metrics > div { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 0 20px; border-left: 1px solid var(--color-border); }
.admin-allocation-preview__metrics > div:first-child { padding-left: 0; border-left: 0; }
.admin-allocation-preview__metrics > div:last-child { padding-right: 0; }
.admin-allocation-preview__metrics span { color: var(--color-text-muted); font-size: .75rem; }
.admin-allocation-preview__metrics strong { color: var(--color-text); font-size: 1.2rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.admin-allocation-preview__metrics small { color: var(--color-text-muted); font-size: .6875rem; }
.admin-allocation-preview__progress { height: 5px; margin-top: 20px; overflow: hidden; border-radius: 999px; background: var(--grw-surface-muted); }
.admin-allocation-preview__progress > span { display: block; height: 100%; border-radius: inherit; background: var(--grw-color-primary); }
.admin-allocation-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; margin-bottom: 20px; padding: 20px 24px; border: 1px solid rgba(0, 101, 39, 0.24); border-radius: var(--r-lg); background: rgba(0, 101, 39, 0.045); }
.admin-allocation-confirm h2 { margin: 0; color: var(--color-text); font-size: 1rem; }
.admin-allocation-confirm p { max-width: 68ch; margin: 5px 0 0; color: var(--color-text-muted); font-size: .8125rem; line-height: 1.5; }
.admin-allocation-confirm form { flex: 0 0 auto; margin: 0; }
.admin-allocation-table .grw-table { min-width: 760px; }
.admin-allocation-table strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.admin-allocation-error-message { position: relative; padding-left: 14px; line-height: 1.45; }
.admin-allocation-error-message::before { position: absolute; top: .62em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--color-error); content: ""; }
.admin-allocation-error-message + .admin-allocation-error-message { margin-top: 5px; }
@media (max-width: 760px) {
  .admin-allocation-preview { padding: 18px; }
  .admin-allocation-preview__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 0; }
  .admin-allocation-preview__metrics > div { padding: 0 14px; }
  .admin-allocation-preview__metrics > div:nth-child(odd) { padding-left: 0; border-left: 0; }
  .admin-allocation-preview__metrics > div:nth-child(even) { padding-right: 0; }
  .admin-allocation-confirm { align-items: stretch; flex-direction: column; gap: 16px; padding: 18px; }
  .admin-allocation-confirm .grw-btn { width: 100%; min-height: 44px; }
  .admin-allocation-table .grw-table { min-width: 0; }
}

.admin-sub-workflow__upload .grw-form-group {
  margin: 0;
}

.admin-sub-workflow__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-sub-workflow__actions form {
  margin: 0;
}

.admin-sub-workflow__hint {
  color: var(--color-text-muted);
  font-size: 12px;
}

.admin-sub-workflow__empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--color-border);
  border-radius: var(--r-md);
  color: var(--color-text-muted);
}

.admin-sub-workflow__empty strong {
  color: var(--color-text);
}

.admin-sub-template-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(183, 121, 31, 0.32);
  border-radius: var(--r-md, 8px);
  background: rgba(183, 121, 31, 0.08);
}

.admin-sub-template-alert > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 220px;
}

.admin-sub-template-alert .grw-btn {
  flex: 0 0 auto;
}

.admin-sub-template-alert strong {
  color: var(--color-text, #1e2a26);
  font-size: 13px;
}

.admin-sub-template-alert span {
  color: var(--color-text-muted, #64748b);
  font-size: 12px;
  line-height: 1.45;
}

.admin-sub-card,
.admin-sub-card .grw-card__body {
  overflow: visible;
}

/* ── Admin offers management table ─────────────────────────── */
.ibp-offers-table { table-layout: fixed; min-width: 860px; }
.ibp-offers-table__col--name    { width: 22%; }
.ibp-offers-table__col--code    { width: 10%; }
.ibp-offers-table__col--type    { width: 13%; }
.ibp-offers-table__col--status  { width:  8%; }
.ibp-offers-table__col--date    { width: 10%; }
.ibp-offers-table__col--units   { width: 11%; }
.ibp-offers-table__col--actions { width: 16%; }
/* Name and Type wrap gracefully; compact columns stay on one line */
.ibp-offers-table td:nth-child(1),
.ibp-offers-table td:nth-child(3) { overflow-wrap: break-word; }
.ibp-offers-table td.ibp-col-nowrap { white-space: nowrap; }
.ibp-offers-table .ibp-row-actions  { flex-wrap: nowrap; }

abbr.ibp-abbr-value {
  text-decoration: underline dotted;
  text-underline-offset: 2px;
  text-decoration-color: var(--color-text-muted, #9ca3af);
  cursor: help;
}

/* ── Admin offer detail tabs ─────────────────────────────── */
.ibp-detail-tabs { margin-bottom: 0; }
.ibp-detail-tabs .od-tab-nav { margin-bottom: 24px; }
.ibp-detail-tabs > .od-tab-panel {
  overflow: visible;
  flex: none;
  padding-right: 0;
  scrollbar-width: auto;
}

@media (max-width: 760px) {
  .admin-sub-workbench {
    grid-template-columns: 1fr;
  }

  .admin-sub-workflow__selected,
  .admin-sub-workflow__upload {
    grid-template-columns: 1fr;
  }

  .admin-sub-workflow__selected {
    display: grid;
  }

  .admin-sub-workflow__selected .grw-btn,
  .admin-sub-workflow__upload .grw-btn {
    width: 100%;
  }

  .admin-sub-template-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-sub-template-alert .grw-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Reference data maintenance ───────────────────────────── */
.ibp-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--color-border-subtle); }
.ibp-tab { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; color: var(--color-text-muted); text-decoration: none; border-bottom: 2px solid transparent; font-weight: 600; font-size: 14px; }
.ibp-tab:hover { color: var(--color-text); }
.ibp-tab.is-active { color: var(--grw-deep-green); border-bottom-color: var(--grw-deep-green); }
.ibp-grid-4col { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(220px, 2fr) minmax(90px, .5fr) auto; gap: 14px; align-items: end; }
.ibp-grid-5col { display: grid; grid-template-columns: minmax(90px, .6fr) minmax(190px, 1.5fr) minmax(190px, 1.5fr) minmax(90px, .5fr) auto; gap: 14px; align-items: end; }
.ibp-form-actions-end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-bottom: 2px; }
.ibp-w-90 { width: 90px; }
.grw-input--sm { min-height: 34px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }

/* ── Toolkit: block-style radio/checkbox for decision panels ── */
.grw-check--block {
  display: flex;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-sm, 6px);
  background: var(--color-surface, #fff);
  cursor: pointer;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  transition: border-color 120ms, background 120ms;
}
.grw-check--block:has(.grw-check__input:checked) {
  border-color: var(--color-primary, #006527);
  background: var(--color-primary-subtle, rgba(0,101,39,0.06));
}
.grw-check--block:hover {
  border-color: var(--color-primary, #006527);
}

/* ── Empty state (centered) ───────────────────────────────── */
.ibp-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; }
.ibp-empty-state--sm { padding: 32px 16px; }

/* ── Card body: no padding ────────────────────────────────── */
.grw-card__body--flush { padding: 0; }

/* ── Page header inline badge ─────────────────────────────── */
.ibp-title-badge { vertical-align: middle; margin-left: 10px; font-size: 12px; }

/* ── Overflow menu row ────────────────────────────────────── */
/* Canonical rule lives in §4 Row actions below — this duplicate only
   carried flex-wrap, which is now set there too. */

/* ── Responsive breakpoints ───────────────────────────────── */
@media (max-width: 900px) {
  .ibp-layout-2col, .ibp-layout-2col--wide, .ibp-layout-2col--equal, .ibp-layout-2col--380 { grid-template-columns: 1fr; }
  .ibp-form-row, .ibp-grid-2col { grid-template-columns: 1fr; }
  .ibp-grid-3col { grid-template-columns: 1fr 1fr; }
  .ibp-dl       { grid-template-columns: 120px 1fr; }
  .ibp-kv-grid  { grid-template-columns: 140px 1fr; }
  .ibp-stats-3col { grid-template-columns: 1fr 1fr; }
  .ibp-grid-4col, .ibp-grid-5col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .ibp-stats-row { flex-direction: column; }
  .ibp-offers-grid { grid-template-columns: 1fr; }
  .ibp-filter-bar { flex-direction: column; }
  .ibp-filter-bar .grw-form-group { min-width: unset; width: 100%; }
  .ibp-grid-3col, .ibp-stats-3col, .ibp-dl-2col, .ibp-dl-3col { grid-template-columns: 1fr; }
  .ibp-steps-bar { flex-direction: column; }
  .ibp-grid-4col, .ibp-grid-5col { grid-template-columns: 1fr; }
}

/* ── Sidebar menu / logout ────────────────────────────── */
/* Always visible (no click-to-reveal) — separated from the identity row above by a divider. */
.ibp-sidebar-menu {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ibp-sidebar-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  height: auto;
  margin-bottom: 2px;
}
.ibp-sidebar-btn:last-child { margin-bottom: 0; }
.ibp-sidebar-btn--danger:hover {
  background: rgba(239,68,68,0.14);
  color: #FCA5A5;
  border-color: rgba(239,68,68,0.2);
}

/* Collapsed sidebar (icon rail): match the same icon-only treatment as nav items. */
.grw-sidebar.is-collapsed .ibp-sidebar-btn { justify-content: center; padding-inline: 0; }
.grw-sidebar.is-collapsed .ibp-sidebar-btn > span {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Action and unread counts remain visible in icon-only sidebar modes. The toolkit
   normally hides all badges and promotes spans to tooltip labels in rail mode. */
.ibp-nav-action-badge[hidden] { display: none !important; }

.grw-sidebar.is-collapsed .grw-nav-item .ibp-nav-action-badge {
  position: absolute;
  top: 5px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  opacity: 1;
  max-width: 28px;
  overflow: visible;
  pointer-events: none;
  font-size: 9px;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--grw-dark-green);
}

@media (min-width: 840px) and (max-width: 1199px) {
  .grw-sidebar:not(.is-mobile-open) .grw-nav-item .ibp-nav-action-badge {
    position: absolute;
    top: 5px;
    right: 7px;
    left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    width: auto;
    height: 16px;
    padding: 0 4px;
    opacity: 1;
    max-width: 28px;
    overflow: visible;
    pointer-events: none;
    font-size: 9px;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--grw-dark-green);
    transform: none;
  }
  .grw-sidebar:not(.is-mobile-open) .grw-nav-item .ibp-nav-action-badge::before { display: none; }
}

@media (max-width: 839px) {
  .grw-sidebar.is-mobile-open .grw-nav-item .ibp-nav-action-badge {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    width: auto;
    height: auto;
    margin-left: auto;
    padding: 2px 6px;
    opacity: 1;
    max-width: 36px;
    overflow: visible;
    background: var(--grw-light-green);
    color: var(--grw-dark-green);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    border-radius: var(--r-full);
    box-shadow: none;
  }
}

/* ── Topbar chrome ────────────────────────────────────── */
.ibp-breadcrumb-sep  { color: var(--color-border); }
.ibp-topbar-divider  { width: 1px; height: 20px; background: var(--color-border-subtle); margin: 0 4px; flex-shrink: 0; }

/* ── Topbar labeled action buttons (icon + always-visible text) ── */
.grw-topbar__action-btn--labeled {
  width: auto;
  padding: 0 var(--sp-3);
  gap: var(--sp-2);
  border: 1px solid var(--color-border-subtle);
}
.grw-topbar__action-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

/* ── Session lifecycle prompt ─────────────────────────── */
.ibp-session-prompt {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--ibp-z-toast);
  width: min(420px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}
.ibp-session-prompt[hidden] { display: none; }
.ibp-session-prompt__title { font-size: 14px; font-weight: 700; color: var(--color-text); margin-bottom: 3px; }
.ibp-session-prompt__text { font-size: 13px; color: var(--color-text-muted); line-height: 1.45; }
.ibp-session-prompt__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ibp-session-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--ibp-z-toast);
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--grw-deep-green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.ibp-session-toast.is-visible { opacity: 1; transform: translateY(0); }

/* ── Offer card stripe accent ─────────────────────────────── */
.ibp-offer-card         { position: relative; overflow: hidden; }
.ibp-offer-stripe       { height: 3px; position: absolute; top: 0; left: 0; right: 0; }
.ibp-offer-stripe--cp      { background: var(--color-info); }
.ibp-offer-stripe--bond    { background: var(--color-success); }
.ibp-offer-stripe--tbill   { background: var(--grw-light-green); }
.ibp-offer-stripe--equity  { background: var(--color-pending); }
.ibp-offer-stripe--default { background: var(--grw-light-green); }

.ibp-offer-card__name   { display: block; }
.ibp-offer-card__body   { padding-top: var(--sp-3); }
.ibp-offer-card__dl     { grid-template-columns: 80px 1fr; gap: 6px 12px; }
.ibp-offer-card__dl dt  { font-size: 11px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.ibp-offer-card__dl dd  { font-size: 13px; color: var(--color-text); margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Dashboard KPI link ───────────────────────────────────── */
.grw-kpi__link { display: inline-block; font-size: 12px; font-weight: 600; color: var(--grw-deep-green); text-decoration: none; }
.grw-kpi__link:hover { text-decoration: underline; color: var(--color-primary-hover); }

/* ── Character counter ────────────────────────────────────── */
.ibp-char-counter      { font-size: 11px; color: var(--color-text-muted); text-align: right; margin-top: 5px; min-height: 16px; transition: color var(--transition-fast); }
.ibp-char-counter--warn{ color: var(--color-warning); }
.ibp-char-counter--crit{ color: var(--color-error); font-weight: 600; }

/* ── Textarea layout guard ─────────────────────────────────── */
.grw-textarea { display: block; width: 100%; box-sizing: border-box; }

/* ── Message textarea ─────────────────────────────────────── */
.ibp-message-textarea { resize: vertical; min-height: 120px; }

/* ── Form field hint ──────────────────────────────────────── */
.ibp-field-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 5px; line-height: 1.45; }

/* ── Modal footer note ────────────────────────────────────── */
.ibp-modal-footer-note {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--color-text-muted);
  flex: 1;
}

/* ── grw-modal__footer: align left note + right actions ─── */
.grw-modal__footer { justify-content: space-between; }

/* ── grw-kpi__period overrides ibp-dashboard-kpi__note ─── */
.ibp-dashboard-kpi .grw-kpi__period {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Responsive: dashboard KPI row ───────────────────────── */
/* ── Dashboard KPI grid: 3 → 2 → 1 ─────────────────────── */
@media (max-width: 960px) {
  .ibp-dashboard-kpis { grid-template-columns: 1fr 1fr; gap: 16px; }
  /* Push the wide card after the other two so they fill row 1 together
     instead of each sitting alone next to an empty grid cell. */
  .ibp-dashboard-kpi--wide { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 540px) {
  .ibp-dashboard-kpis { grid-template-columns: 1fr; gap: 12px; }
  .ibp-dashboard-kpi--wide { grid-column: auto; order: 0; }
}

/* ── Offer card grid: 3 → 2 → 1 ─────────────────────────── */
@media (max-width: 1000px) {
  .ibp-offer-card-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 540px) {
  .ibp-offer-card-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ── ibp-grid-3col (offers index page): 3 → 2 → 1 ─────── */
@media (max-width: 960px) {
  .ibp-grid-3col { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 540px) {
  .ibp-grid-3col { grid-template-columns: 1fr !important; }
}

/* ── Offers search bar: stacks on mobile ─────────────────── */
@media (max-width: 540px) {
  .ibp-offers-search { flex-direction: column; gap: 10px; }
  .ibp-offers-search__input { min-width: unset; width: 100%; }
  .ibp-offers-search__actions { width: 100%; }
  .ibp-offers-search__actions .grw-btn { flex: 1; justify-content: center; min-height: 44px; }
}

/* ── Greenwich Capital Markets brand marks ─────────────── */
.ibp-sidebar-logo {
  width: 100%;
  max-height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* ── Logo + name lockup alignment ──────────────────────────── */
/* ── Auth brand: identity zone (logo, name, tagline) ──────── */
.ibp-auth-brand-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: clamp(16px, 4vh, 48px);
}

.ibp-auth-brand-logo {
  width: 220px;
  height: auto;
  max-width: 82%;
  object-fit: contain;
}

.ibp-auth-brand-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
}

.ibp-auth-brand-tagline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.48);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Auth brand: hero copy zone (badge, headline, sub) ───────
   flex: 1 lets this zone claim the space between the identity
   block and the footer, then centers its content within it —
   keeps the headline visually mid-panel instead of leaving a
   dead gap below it. ──────────────────────────────────────── */
.ibp-auth-brand-hero {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.grw-auth-brand__headline {
  text-align: center;
}

.grw-auth-brand__sub {
  text-align: center;
  max-width: 300px;
}

/* ── Auth brand: foot zone (badges + legal) ────────────────── */
.ibp-auth-brand-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-top: auto;
}

.ibp-auth-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* Quiet inline list, not boxed pills — keeps the footer from
   reading as another row of buttons. */
.ibp-auth-trust-badge {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ibp-auth-trust-badge + .ibp-auth-trust-badge {
  margin-left: 10px;
  padding-left: 12px;
  position: relative;
}

.ibp-auth-trust-badge + .ibp-auth-trust-badge::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

/* Remove the default "G" watermark — replaced by our own decorative layer */
.grw-auth-brand::before { content: none; }
/* Override space-between: stack items with gap, push logo down, pin foot to bottom */
.grw-auth-brand { justify-content: flex-start; gap: 44px; }

/* ── Auth brand decorative layer (mirrors landing hero) ────── */
.ibp-auth-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ibp-auth-decor { display: none; }

/* Ensure brand content sits above the decorative layer, fully centred */
.grw-auth-brand > div:not(.ibp-auth-decor) {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Authentication uses the same quiet surface as the portal workspace. */
.grw-auth-form {
  background-color: var(--color-bg);
  background-image: none;
}

[data-theme="dark"] .grw-auth-form {
  background-image: none;
}

/* ── Auth card horizontal centering ────────────────────────── */
.grw-auth-card {
  margin-left: auto;
  margin-right: auto;
}
.grw-auth-card__heading,
.grw-auth-card__sub {
  text-align: center;
}

.ibp-auth-security-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ibp-auth-security-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ── Auth: mobile layout ────────────────────────────────────
   greenwich.css hides .grw-auth-brand at ≤599px.
   We restore it as a slim bar showing logo + name only.
──────────────────────────────────────────────────────────── */
@media (max-width: 599px) {
  .grw-auth-shell {
    grid-template-rows: auto 1fr;
  }

  .grw-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 24px;
    min-height: 0;
  }

  /* Use the same high-specificity selector to hide every zone except identity.
     .grw-auth-brand > div:not(.ibp-auth-decor) has specificity 0,2,1 in the
     base rule and sets display:flex — we must match that to win. */
  .grw-auth-brand > div:not(.ibp-auth-decor) {
    display: none;
    width: auto;
  }

  /* Re-show only the identity zone — stacked vertically */
  .grw-auth-brand > div.ibp-auth-brand-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    margin-top: 0;
  }

  /* Also suppress the decor layer and tagline */
  .ibp-auth-decor,
  .ibp-auth-brand-tagline {
    display: none;
  }

  .ibp-auth-brand-logo {
    width: 200px;
    max-width: 65vw;
    height: auto;
  }

  .ibp-auth-brand-name {
    font-size: 17px;
    text-align: center;
  }

  /* Drop non-essential copy from the form card on mobile */
  .grw-auth-card__sub,
  .ibp-auth-security-footer {
    display: none;
  }
}

/* ── Alert list (model state errors) ──────────────────────── */
.ibp-alert-list {
  margin: 0;
  padding-left: 16px;
}

/* ── Alert fade-out (JS-triggered) ────────────────────────── */
.ibp-alert-fade {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* ── Prompt modal message text — the modal shell itself is grw-overlay/grw-modal
   (see the "Modal overlay + panel" section); this is the one surviving piece of an
   older, unused ibp-modal-overlay/ibp-modal component whose classes collided with an
   unrelated, later-defined ibp-modal system further down this file. ── */
.ibp-modal__message {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.55;
}
.ibp-confirm-modal--primary {
  border-top: 4px solid var(--grw-deep-green, #006527);
}
.ibp-confirm-modal--primary .grw-modal__title {
  color: var(--grw-deep-green, #006527);
}
.ibp-confirm-modal--danger {
  border-top: 4px solid var(--color-error, #ef4444);
}
.ibp-confirm-modal--danger .grw-modal__title {
  color: var(--color-error, #ef4444);
}
.ibp-confirm-alert {
  margin-bottom: 0;
}

/* ── Input validation states ──────────────────────────────── */
/* --color-error-surface was never defined anywhere — the #fef2f2 fallback below
   always rendered regardless of theme, unreadable under dark mode's light text
   color. Blend with the current theme's surface instead, matching .grw-select.is-invalid. */
.grw-input.is-invalid {
  border-color: var(--color-error, #ef4444);
  background-color: color-mix(in srgb, var(--color-error) 7%, var(--color-surface));
}

.grw-input.is-valid {
  border-color: var(--color-success, #22c55e);
}

/* ── Label with inline required mark ─────────────────────── */
.grw-label__required {
  color: var(--color-error, #ef4444);
  margin-left: 2px;
}

/* ── ibp-auth-footer-note (back-to-sign-in links) ─────────── */
.ibp-auth-footer-note {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
}

.ibp-auth-footer-note a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.ibp-auth-footer-note a:hover {
  color: var(--grw-deep-green);
}

/* ── Readonly field display ───────────────────────────────── */
.ibp-readonly-field {
  padding: 10px 14px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md, 6px);
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ── Toast notifications (success / info) ──────────────────── */
.ibp-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--ibp-z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.ibp-toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--color-surface, #fff);
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 28px rgba(10, 20, 15, 0.14);
  font-size: 14px;
  line-height: 1.5;
  animation: ibp-toast-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ibp-toast--success {
  border-left: 3px solid var(--color-success, #22c55e);
}

.ibp-toast--info {
  border-left: 3px solid var(--color-info, #3b82f6);
}

.ibp-toast--warning {
  border-left: 3px solid var(--color-warning, #f59e0b);
}

.ibp-toast__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.ibp-toast--success .ibp-toast__icon { color: var(--color-success, #22c55e); }
.ibp-toast--info    .ibp-toast__icon { color: var(--color-info,    #3b82f6); }
.ibp-toast--warning .ibp-toast__icon { color: var(--color-warning, #f59e0b); }

.ibp-toast__body {
  flex: 1;
  color: var(--color-text);
  font-weight: 500;
}

@keyframes ibp-toast-in {
  from { opacity: 0; transform: translateX(14px) scale(0.97); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}

/* reuse ibp-alert-fade for toast fade-out */
.ibp-alert-fade {
  opacity: 0 !important;
  transform: translateX(8px) !important;
  transition: opacity 0.35s ease, transform 0.35s ease !important;
}

/* Form row column variants */
.ibp-form-row--3col { grid-template-columns: 1fr 1fr 1fr; }
.ibp-form-row--4col { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* Repeatable row sections */
.ibp-series-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.ibp-repeater-list { display: flex; flex-direction: column; gap: 8px; }
.ibp-repeater-row  { display: flex; align-items: flex-end; gap: 10px; background: var(--color-surface-alt); border: 1px solid var(--color-border-subtle); border-radius: var(--r-md, 8px); padding: 14px; }
.ibp-repeater-row .ibp-form-row,
.ibp-repeater-row .ibp-form-row--4col { flex: 1; margin: 0; }
.ibp-repeater-remove { flex-shrink: 0; width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }

/* ── Repeater accordion cards (CP series & Bond tenors) ──── */
.ibp-repeater-card {
  border: 1px solid var(--color-border, #CBD5D0);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface, #ffffff);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ibp-repeater-card:hover {
  border-color: var(--grw-deep-green, #006527);
}
.ibp-repeater-card:focus-within {
  border-color: var(--grw-deep-green, #006527);
  box-shadow: 0 0 0 1px var(--grw-deep-green, #006527);
}
.ibp-repeater-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface-alt, #F3F6F4);
  padding: 6px 12px;
  min-height: 44px;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.ibp-repeater-card:not(.is-collapsed) .ibp-repeater-card__header {
  border-bottom-color: var(--color-border-subtle, #E7ECE9);
  background: #EBF2ED;
}
.ibp-repeater-card__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  flex: 1;
  color: var(--color-text, #1E2A26);
  font-family: inherit;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}
.ibp-repeater-card__toggle:hover {
  background: rgba(0, 101, 39, 0.08);
}
.ibp-repeater-card__chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: var(--color-text-secondary, #33413C);
}
.ibp-repeater-card.is-collapsed .ibp-repeater-card__chevron {
  transform: rotate(-90deg);
}
.ibp-repeater-card__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ibp-repeater-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--grw-dark-green, #144733);
}
.ibp-repeater-card__meta {
  font-size: 12px;
  color: var(--color-text-muted, #8A9691);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.ibp-repeater-card__badge {
  display: inline-block;
  background: #ffffff;
  border: 1px solid var(--color-border, #CBD5D0);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary, #33413C);
}
.ibp-repeater-card__body {
  padding: 16px;
  background: var(--color-surface, #ffffff);
}
.ibp-repeater-card.is-collapsed .ibp-repeater-card__body {
  display: none;
}
.ibp-repeater-card .ibp-repeater-remove {
  background: none;
  border: none;
  color: var(--color-text-muted, #8A9691);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.ibp-repeater-card .ibp-repeater-remove:hover {
  color: var(--color-error, #B42318);
  background: rgba(180, 35, 24, 0.08);
}
.ibp-repeater-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── KYC Document preview modal ──────────────────────────── */
.ibp-doc-preview-modal {
  max-width: 1040px;
  width: 94vw;
  height: 88vh;
  display: flex;
  flex-direction: column;
}
.ibp-doc-preview-modal__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: var(--color-surface-alt, #F8FAF9);
  position: relative;
}
.ibp-doc-preview-frame-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 12px;
}
.ibp-doc-preview-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  border-radius: 4px;
}
.ibp-doc-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  background: #ffffff;
}
@media (max-width: 680px) {
  .ibp-doc-preview-modal {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
  }
}

/* ibp-btn-icon (inline icon in buttons) */
.ibp-btn-icon { margin-right: 4px; flex-shrink: 0; }

/* mono utility */
.ibp-mono { font-family: monospace; font-size: 13px; letter-spacing: 0.03em; }

@media (max-width: 900px) {
  .ibp-form-row--3col { grid-template-columns: 1fr 1fr; }
  .ibp-form-row--4col { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ibp-form-row--3col,
  .ibp-form-row--4col { grid-template-columns: 1fr; }
}


/* ============================================================
   Offer Wizard — Step indicator, panes, review, nav
   ============================================================ */

/* Step indicator bar */
.ibp-wizard-steps {
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ibp-wizard-steps__list {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  counter-reset: none;
  min-width: 480px;
}
.ibp-wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-bottom: 0.25rem;
  cursor: pointer;
  user-select: none;
}
.ibp-wizard-step:hover .ibp-wizard-step__bubble {
  border-color: var(--grw-color-primary, #0f4c81);
  color: var(--grw-color-primary, #0f4c81);
}
.ibp-wizard-step.is-active:hover .ibp-wizard-step__bubble,
.ibp-wizard-step.is-complete:hover .ibp-wizard-step__bubble {
  filter: brightness(1.1);
  color: #fff;
}
/* Connector line between steps */
.ibp-wizard-step + .ibp-wizard-step::before {
  content: '';
  position: absolute;
  top: 14px;
  right: calc(50% + 16px);
  left: calc(-50% + 16px);
  height: 2px;
  background: var(--grw-border-color, #e2e8f0);
  z-index: 0;
}
.ibp-wizard-step.is-complete + .ibp-wizard-step::before,
.ibp-wizard-step.is-active + .ibp-wizard-step::before {
  background: var(--grw-color-primary, #0f4c81);
}
.ibp-wizard-step__bubble {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 1;
  position: relative;
  background: var(--grw-border-color, #e2e8f0);
  color: var(--grw-color-text-muted, #64748b);
  border: 2px solid var(--grw-border-color, #e2e8f0);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.ibp-wizard-step.is-active .ibp-wizard-step__bubble {
  background: var(--grw-color-primary, #0f4c81);
  border-color: var(--grw-color-primary, #0f4c81);
  color: #fff;
}
.ibp-wizard-step.is-complete .ibp-wizard-step__bubble {
  background: var(--grw-color-success, #16a34a);
  border-color: var(--grw-color-success, #16a34a);
  color: #fff;
}
.ibp-wizard-step.is-complete .ibp-wizard-step__bubble::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.ibp-wizard-step.is-complete .ibp-wizard-step__bubble {
  font-size: 0; /* hide number, show checkmark */
}
.ibp-wizard-step__label {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 0.375rem;
  color: var(--grw-color-text-muted, #64748b);
  text-align: center;
  white-space: nowrap;
}
.ibp-wizard-step.is-active .ibp-wizard-step__label {
  color: var(--grw-color-primary, #0f4c81);
  font-weight: 600;
}
.ibp-wizard-step.is-complete .ibp-wizard-step__label {
  color: var(--grw-color-success, #16a34a);
}
/* Locked step — not yet reachable; must complete prior steps via Continue first */
.ibp-wizard-step.is-locked {
  opacity: 0.38;
  cursor: default;
  pointer-events: none;
}

/* Hide button SVG icons during loading so they vanish with the label text */
.grw-btn.is-loading > svg { opacity: 0; }

/* Form locked during submit — prevent edits without using disabled (disabled drops fields from POST) */
form.is-submitting input:not([disabled]),
form.is-submitting select:not([disabled]),
form.is-submitting textarea:not([disabled]),
form.is-submitting button:not([type="submit"]) {
  pointer-events: none;
  opacity: 0.55;
  cursor: not-allowed;
}

/* Wizard pane */
.ibp-wizard-pane[hidden] { display: none; }

/* Wizard bottom nav */
.ibp-wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 2rem;
}
.ibp-wizard-nav--submit {
  border-top: 1px solid var(--grw-border-color, #e2e8f0);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
}

/* Card subtitle */
.grw-card__subtitle {
  font-size: 0.78rem;
  color: var(--grw-color-text-muted, #64748b);
  margin-left: 0.5rem;
}

.ibp-ops-note,
.ibp-conditional-panel {
  border: 1px solid var(--grw-border-color, #e2e8f0);
  border-radius: 8px;
  background: color-mix(in srgb, var(--grw-color-primary, #007a3d) 7%, var(--grw-surface, #fff));
}

.ibp-ops-note {
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  color: var(--grw-color-text, #1f2937);
  font-size: 0.85rem;
  line-height: 1.45;
}

.ibp-conditional-panel {
  padding: 1rem;
}

.ibp-select-readonly {
  pointer-events: none;
  background-color: var(--grw-surface-muted, #f8fafc);
  color: var(--grw-color-text-muted, #64748b);
}

[data-theme="dark"] .ibp-ops-note,
[data-theme="dark"] .ibp-conditional-panel,
.dark .ibp-ops-note,
.dark .ibp-conditional-panel {
  background: color-mix(in srgb, var(--grw-color-primary, #00a15d) 14%, var(--grw-surface, #111827));
  border-color: var(--grw-border-color, #334155);
}

/* Offer payment-gateway checklist — one row per active gateway */
.ibp-gateway-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--grw-border-color, #e2e8f0);
}

.ibp-gateway-row:last-child {
  border-bottom: none;
}

.ibp-gateway-row__fields {
  margin: 0.75rem 0 0 1.75rem;
  max-width: 26rem;
}

[data-theme="dark"] .ibp-gateway-row,
.dark .ibp-gateway-row {
  border-color: var(--grw-border-color, #334155);
}

/* Investor checkout: pick a gateway when an offer allows more than one */
.ibp-gateway-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Empty hint in step 3 when no product type selected */
.ibp-empty-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--grw-color-text-muted, #64748b);
  font-size: 0.875rem;
  padding: 1.25rem 1.5rem;
}
/* Ensure the HTML hidden attribute always wins over any display override */
[hidden] { display: none !important; }

/* Repeater header row (column labels) */
.ibp-repeater-header {
  display: grid;
  gap: 0.75rem;
  padding: 0 2.5rem 0.5rem 0;
}
.ibp-repeater-header.ibp-form-row--4col { grid-template-columns: repeat(4, 1fr); }
.ibp-repeater-header.ibp-bond-tenor-header { grid-template-columns: 1.5fr 1fr 1fr 1fr; }

/* Bond tenor row inner grid */
.ibp-bond-tenor-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 0.75rem;
  flex: 1;
}

/* Rights issue ratio inputs */
.ibp-ratio-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ibp-ratio-inputs .grw-input-wrap { flex: 1; }
.ibp-ratio-sep {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--grw-color-text-muted, #64748b);
  flex-shrink: 0;
}

/* Review step */
.ibp-review-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: #166534;
  margin-bottom: 1.5rem;
}
.ibp-review-banner svg { flex-shrink: 0; color: #16a34a; }

.ibp-review-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1.5rem;
  margin: 0;
}
.ibp-review-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grw-color-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.75rem;
  border-top: 1px solid var(--grw-border-color, #e2e8f0);
  margin-top: 0.5rem;
}
.ibp-review-list dd {
  font-size: 0.875rem;
  color: var(--grw-color-text, #1e293b);
  font-weight: 500;
  padding-top: 0.75rem;
  border-top: 1px solid var(--grw-border-color, #e2e8f0);
  margin-top: 0.5rem;
  margin-left: 0;
}
.ibp-review-list dt:first-of-type,
.ibp-review-list dd:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.ibp-review-empty {
  color: var(--grw-color-text-muted, #64748b);
  font-style: italic;
  font-size: 0.875rem;
}

/* Review table (for series/tenor rows) */
.ibp-table-wrap {
  width: 100%;
  margin-top: 0.5rem;
  overflow-x: auto;
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 74%, transparent);
  border-radius: var(--r-lg, 12px);
  background: var(--color-surface, #fbfcfb);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(16, 24, 22, 0.08));
  -webkit-overflow-scrolling: touch;
}

.ibp-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.ibp-table-wrap::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--color-surface-alt, #f3f6f4) 86%, transparent);
}

.ibp-table-wrap::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--color-text-muted, #7a8681) 36%, transparent);
  border: 3px solid color-mix(in srgb, var(--color-surface-alt, #f3f6f4) 86%, transparent);
  border-radius: var(--r-full, 999px);
}

.ibp-review-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--color-text, #1e2a26);
  font-size: 0.8125rem;
}

.ibp-review-table th {
  padding: 12px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 72%, transparent);
  background: color-mix(in srgb, var(--color-surface-alt, #eef3f0) 84%, var(--color-surface, #fbfcfb));
  color: color-mix(in srgb, var(--color-text-muted, #7a8681) 88%, var(--color-text, #1e2a26));
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.ibp-review-table td {
  padding: 13px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--color-border-subtle, #e8eeea) 78%, transparent);
  color: var(--color-text, #1e2a26);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.ibp-review-table tbody tr {
  background: var(--color-surface, #fbfcfb);
}

.ibp-review-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--color-surface-alt, #f3f6f4) 42%, var(--color-surface, #fbfcfb));
}

.ibp-review-table tbody tr:hover {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 7%, var(--color-surface, #fbfcfb));
}

.ibp-review-table tr:last-child td {
  border-bottom: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .ibp-wizard-steps { margin-bottom: 1.25rem; }
  .ibp-wizard-steps__list { min-width: 360px; }
  .ibp-wizard-step__label { font-size: 0.625rem; }

  .ibp-wizard-nav {
    flex-direction: column-reverse;
    gap: 0.75rem;
    padding-bottom: 1.5rem;
  }
  .ibp-wizard-nav .grw-btn { width: 100%; justify-content: center; }

  .ibp-review-list { grid-template-columns: 1fr; }
  .ibp-review-list dd { border-top: none; padding-top: 0.125rem; margin-top: 0; }
  .ibp-review-list dt { margin-top: 0.75rem; padding-top: 0.75rem; }

  .ibp-bond-tenor-row { grid-template-columns: 1fr; }
  .ibp-repeater-header.ibp-bond-tenor-header { display: none; }
  .ibp-repeater-header.ibp-form-row--4col { display: none; }

  .ibp-ratio-inputs { flex-wrap: wrap; }
}

@media (max-width: 900px) {
  .ibp-bond-tenor-row { grid-template-columns: 1fr 1fr 1fr; }
}


/* ============================================================
   Fixes: validation summary, select styling, wizard colours
   ============================================================ */

/* Hide empty ASP.NET validation summary and per-field hints when valid */
.validation-summary-valid { display: none !important; }
.field-validation-valid   { display: none !important; }

/* Screen-reader only utility */
.ibp-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Modal overlay + panel ───────────────────────────────── */
.grw-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: var(--ibp-z-modal);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.grw-overlay.is-open { opacity: 1; pointer-events: all; }
.grw-modal {
  background: var(--color-surface);
  border-radius: var(--r-xl, 12px);
  box-shadow: var(--shadow-xl, 0 20px 60px rgba(0,0,0,0.18));
  width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column;
  border: 1px solid var(--color-border, #e5e7eb);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.18s ease;
}
.grw-overlay.is-open .grw-modal { transform: translateY(0) scale(1); }
.grw-modal--sm  { max-width: 420px; }
.grw-modal--lg  { max-width: 720px; }
/* When a <form> wraps __body/__footer (posting the modal's own fields), it sits between
   .grw-modal and them in the DOM — without this, the form is a plain block box that breaks
   the flex chain, so __body's flex:1/overflow-y:auto never activates and __footer (with the
   submit button) can get silently clipped by .grw-modal's overflow:hidden once content is
   taller than max-height, instead of the body scrolling internally. min-height:0 lets the
   form actually shrink to the available space rather than pushing past it. */
.grw-modal > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.grw-modal__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  flex-shrink: 0;
}
.grw-modal__title    { font-size: 16px; font-weight: 700; color: var(--color-text); line-height: 1.3; }
.grw-modal__subtitle { font-size: 13px; color: var(--color-text-muted); margin-top: 3px; }
.grw-modal__close {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px; border: none;
  background: transparent; color: var(--color-text-muted); cursor: pointer; flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.grw-modal__close:hover { background: var(--color-surface-alt, #f3f4f6); color: var(--color-text); }
.grw-modal__body   { padding: var(--sp-6); overflow-y: auto; flex: 1; }
.grw-modal__footer {
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--color-border, #e5e7eb);
  display: flex; gap: var(--sp-2); justify-content: flex-end; flex-shrink: 0;
}
@media (max-width: 600px) {
  .grw-overlay  { align-items: flex-end; padding: 0; }
  .grw-modal    { max-width: 100%; border-radius: 12px 12px 0 0; max-height: 94vh; }
  .grw-modal__header, .grw-modal__body, .grw-modal__footer { padding-left: var(--sp-4); padding-right: var(--sp-4); }
}

/* ── User avatar (initials circle) ──────────────────────── */
.ibp-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; color: #fff;
  background: var(--color-primary-dark, #144733);
}
.ibp-user-avatar--lg { width: 44px; height: 44px; font-size: 14px; }
.ibp-user-avatar--c0 { background: #006527; }
.ibp-user-avatar--c1 { background: #144733; }
.ibp-user-avatar--c2 { background: #175CD3; }
.ibp-user-avatar--c3 { background: #B7791F; }
.ibp-user-avatar--c4 { background: #7A5AF8; }
.ibp-user-avatar--c5 { background: #B42318; }
.ibp-user-avatar--c6 { background: #0E7490; }
.ibp-user-avatar--c7 { background: #6B21A8; }
.ibp-user-cell { display: flex; align-items: center; gap: 10px; }
.ibp-user-cell__name  { font-weight: 600; font-size: 13px; line-height: 1.3; }
.ibp-user-cell__email { font-size: 12px; color: var(--color-text-muted); }

/* ── Select: full input-level styling (grw-select alone was only arrow) */
.grw-select {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 36px 0 var(--sp-4);
  background: var(--color-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9691' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: var(--font-ui);
  color: var(--color-text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1.4;
}
.grw-select:hover:not(:disabled):not(:focus) { border-color: var(--n5); }
.grw-select:focus {
  border-color: var(--grw-deep-green);
  box-shadow: var(--focus-shadow);
}
.grw-select:disabled {
  background-color: var(--n3);
  color: var(--n5);
  cursor: not-allowed;
  opacity: 1;
}
.grw-select.is-invalid { border-color: var(--color-error) !important; }
.grw-select--sm { height: 32px; font-size: 12px; }

/* ── Autofill: match theme instead of the browser's default yellow ───────
   Chrome/Safari paint autofilled fields with their own internal background,
   ignoring `background`/`background-color`. The only property they respect
   is `box-shadow`, so an oversized inset shadow is used to visually replace
   it; `-webkit-text-fill-color` is likewise the only way to override the
   forced text color. Uses the same --color-* tokens as the base input rules
   above, so light/dark mode are both handled by this one rule set. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-text-fill-color: var(--color-text) !important;
  caret-color: var(--color-text);
  -webkit-box-shadow: 0 0 0 1000px var(--color-surface) inset !important;
  box-shadow: 0 0 0 1000px var(--color-surface) inset !important;
  transition: background-color 9999s ease-in-out 0s, color 9999s ease-in-out 0s;
}
input:autofill,
textarea:autofill,
select:autofill {
  -moz-text-fill-color: var(--color-text) !important;
  box-shadow: 0 0 0 1000px var(--color-surface) inset !important;
}

/* ── Wizard step indicators: portal green theme ──────────────────────── */
.ibp-wizard-step + .ibp-wizard-step::before {
  background: var(--color-border, #CBD5D0);
}
.ibp-wizard-step.is-complete + .ibp-wizard-step::before,
.ibp-wizard-step.is-active  + .ibp-wizard-step::before {
  background: var(--grw-deep-green, #006527);
}
.ibp-wizard-step__bubble {
  background: var(--n3, #E7ECE9);
  color: var(--n5, #8A9691);
  border-color: var(--n3, #E7ECE9);
}
.ibp-wizard-step.is-active .ibp-wizard-step__bubble {
  background: var(--grw-deep-green, #006527);
  border-color: var(--grw-deep-green, #006527);
  color: #fff;
}
.ibp-wizard-step.is-complete .ibp-wizard-step__bubble {
  background: var(--grw-light-green, #84CA23);
  border-color: var(--grw-light-green, #84CA23);
  color: var(--grw-dark-green, #144733);
}
.ibp-wizard-step.is-complete .ibp-wizard-step__bubble::after {
  border-color: var(--grw-dark-green, #144733);
}
.ibp-wizard-step__label { color: var(--color-text-muted, #8A9691); }
.ibp-wizard-step.is-active .ibp-wizard-step__label {
  color: var(--grw-deep-green, #006527);
}
.ibp-wizard-step.is-complete .ibp-wizard-step__label {
  color: var(--grw-deep-green, #006527);
}

/* ── Review banner: portal green ──────────────────────────────────────── */
.ibp-review-banner {
  background: rgba(132, 202, 35, 0.08);
  border-color: rgba(132, 202, 35, 0.35);
  color: var(--grw-dark-green, #144733);
}
.ibp-review-banner svg { color: var(--grw-deep-green, #006527); }

/* ── Step validation error shake ─────────────────────────────────────── */
@keyframes ibp-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.ibp-wizard-pane.has-error { animation: ibp-shake 0.35s ease; }

/* Step error hint */
.ibp-step-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(180, 35, 24, 0.06);
  border: 1px solid rgba(180, 35, 24, 0.25);
  border-radius: 6px;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--color-error, #B42318);
  margin-bottom: 1rem;
}
.ibp-step-error[hidden] { display: none; }

/* ── Inline field error message ──────────────────────────────── */
.ibp-field-error {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-error, #ef4444);
  margin-top: 0.3rem;
  line-height: 1.4;
}

/* ── ASP.NET Core MVC validation class mappings ──────────────── */
/* field-validation-error / field-validation-valid are injected   */
/* by @Html.ValidationMessage() and asp-validation-for helpers.   */
.field-validation-error {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-error, #ef4444);
  margin-top: 0.3rem;
  line-height: 1.4;
}
.field-validation-valid { display: none; }

/* input-validation-error is set by asp-for tag helper on invalid fields */
.input-validation-error {
  border-color: var(--color-error, #ef4444) !important;
  background-color: color-mix(in srgb, var(--color-error) 7%, var(--color-surface)) !important;
}

/* Auto-highlight inputs/selects inside a form-group that has a   */
/* visible field error span — works for manual name= inputs too.  */
.grw-form-group:has(.field-validation-error) .grw-input,
.grw-form-group:has(.field-validation-error) .grw-input-wrap .grw-input,
.grw-form-group:has(.field-validation-error) .grw-textarea {
  border-color: var(--color-error, #ef4444) !important;
  background-color: color-mix(in srgb, var(--color-error) 7%, var(--color-surface)) !important;
}
.grw-form-group:has(.field-validation-error) .grw-select {
  border-color: var(--color-error, #ef4444) !important;
  background-color: color-mix(in srgb, var(--color-error) 7%, var(--color-surface)) !important;
}

/* grw-helper--error used in existing auth views */
.grw-helper--error {
  color: var(--color-error, #ef4444) !important;
  font-weight: 500;
}

/* Admin subscription diagnostics remain visible without competing with the workflow stage. */
.ibp-status-secondary {
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.86;
}
.ibp-next-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 11rem;
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}
.ibp-next-action::before {
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--grw-deep-green);
  content: "";
}

/* ── Select invalid: match grw-input.is-invalid surface ──────── */
.grw-select.is-invalid {
  background-color: color-mix(in srgb, var(--color-error) 7%, var(--color-surface));
}

/* ── Toast: error variant ─────────────────────────────────────── */
.ibp-toast--error {
  border-left: 3px solid var(--color-error, #ef4444);
}
.ibp-toast--error .ibp-toast__icon { color: var(--color-error, #ef4444); }

/* ── Full-page processing overlay for long-running submits ─── */
.ibp-page-loader {
  position: fixed;
  inset: 0;
  z-index: var(--ibp-z-loader);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 22, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ibp-page-loader__panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 18px 50px rgba(16, 24, 22, 0.18);
}

.ibp-page-loader__spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(0, 101, 39, 0.18);
  border-top-color: var(--grw-deep-green);
  animation: grw-spin 0.65s linear infinite;
  flex: 0 0 auto;
}

.ibp-page-loader__text {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

/* ── Step indicator: error state ─────────────────────────────── */
.ibp-wizard-step.is-error .ibp-wizard-step__bubble {
  background:   var(--color-error, #ef4444) !important;
  border-color: var(--color-error, #ef4444) !important;
  color: #fff !important;
  font-size: 0.75rem !important;
}
/* Suppress the is-complete checkmark when the step has errors */
.ibp-wizard-step.is-error .ibp-wizard-step__bubble::after { display: none; }
/* Active step with errors: keep primary/brand colour, only dot signals error */
.ibp-wizard-step.is-active.is-error .ibp-wizard-step__bubble {
  background:   var(--grw-deep-green, #006527) !important;
  border-color: var(--grw-deep-green, #006527) !important;
}
.ibp-wizard-step.is-error .ibp-wizard-step__label {
  color: var(--color-error, #ef4444);
}
.ibp-wizard-step.is-active.is-error .ibp-wizard-step__label {
  color: var(--grw-deep-green, #006527);
}
/* Pulsing red badge dot in the top-right corner of the bubble */
.ibp-wizard-step.is-error .ibp-wizard-step__bubble::before {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  z-index: 2;
  animation: ibp-error-dot-pulse 1.4s ease-in-out infinite;
}
@keyframes ibp-error-dot-pulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.45); opacity: 0.6; }
}
/* Pulsing green dot marking an unviewed notice download link — same animation
   pattern as ibp-error-dot-pulse above, positioned inline rather than as a
   corner badge since it sits next to link text, not a bubble icon. */
.ibp-notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ibp-notice-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grw-deep-green, #006527);
  flex: 0 0 auto;
  animation: ibp-notice-dot-pulse 1.6s ease-in-out infinite;
}
@keyframes ibp-notice-dot-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.5; }
}
@media (prefers-reduced-motion: reduce) {
  .ibp-notice-badge__dot { animation: none; }
}
/* Brief flash applied via JS when arriving from a notice-ready email's ?notice= link. */
.ibp-notice-badge.is-notice-highlighted {
  border-radius: 6px;
  outline: 2px solid var(--grw-deep-green, #006527);
  outline-offset: 4px;
}

/* ── Layout: centre grw-content within grw-main ──────────────── */
.grw-content {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

/* ── Sidebar logo swap ──────────────────────────────────────── */
.ibp-sidebar-logo--full {
  width: 100%;
  max-height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
}
.ibp-sidebar-logo--icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex: 0 0 auto;
  display: none;
}

.grw-sidebar,
.grw-topbar,
.grw-main {
  transition:
    width 320ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-left 320ms cubic-bezier(0.22, 1, 0.36, 1),
    left 320ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 320ms ease;
}

.grw-sidebar__brand {
  min-height: 72px;
  padding-inline: 18px;
}

.grw-sidebar.is-collapsed .grw-sidebar__brand {
  padding-inline: 0;
}

.grw-nav-tooltip {
  transform: translate(0, -50%) translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.grw-nav-tooltip.is-visible {
  transform: translate(0, -50%) translateX(0);
}

.grw-sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-drawer, 700) - 1);
  background: rgba(16, 24, 22, 0.56);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: ibp-sidebar-overlay-in 180ms ease both;
}

@keyframes ibp-sidebar-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Desktop collapsed: swap to icon only */
.grw-sidebar.is-collapsed .ibp-sidebar-logo--full { display: none; }
.grw-sidebar.is-collapsed .ibp-sidebar-logo--icon { display: block; }
/* Rail mode 840-1199px: icon only, brand centred */
@media (min-width: 840px) and (max-width: 1199px) {
  .ibp-sidebar-logo--full { display: none !important; }
  .ibp-sidebar-logo--icon { display: block !important; }
  .grw-sidebar__brand { justify-content: center; gap: 0; }
}
/* Mobile: sidebar is off-canvas by default — hide logos */
@media (max-width: 839px) {
  .ibp-sidebar-logo--full { display: none !important; }
  .ibp-sidebar-logo--icon { display: block !important; }
  .grw-sidebar__brand { justify-content: space-between; gap: 12px; }
  .grw-sidebar__brand > div { display: none; }
  .grw-nav-tooltip { display: none !important; }

  .grw-sidebar.is-mobile-open .ibp-sidebar-logo--full {
    display: block !important;
    width: min(210px, calc(100vw - 118px));
    max-width: calc(100% - 48px);
    max-height: 42px;
  }

  .grw-sidebar.is-mobile-open .ibp-sidebar-logo--icon {
    display: none !important;
  }

  .grw-sidebar.is-mobile-open .grw-sidebar__brand {
    justify-content: space-between;
    padding-inline: 18px 14px;
  }

  .grw-sidebar.is-mobile-open .grw-sidebar__close {
    margin-left: 10px;
  }
}

/* ── Mobile sidebar backdrop ───────────────────────────────── */
.ibp-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: calc(var(--z-drawer, 300) - 1);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ibp-sidebar-backdrop.is-active {
  display: block;
  opacity: 1;
}

/* ============================================================
   Responsive hardening for operational pages
   Tables, filters, action bars, cards, drawers and form layouts
   ============================================================ */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.grw-main,
.grw-content,
.grw-card,
.grw-card__body,
.grw-table-wrap {
  min-width: 0;
}

.grw-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.grw-table-wrap::after {
  content: '';
  display: block;
  height: 1px;
}

.grw-table {
  min-width: 760px;
}

.grw-table td,
.grw-table th {
  overflow-wrap: anywhere;
}

.grw-table td:last-child,
.grw-table th:last-child {
  white-space: nowrap;
}

.grw-card__header,
.grw-card__footer,
.grw-page-header,
.ibp-section-header,
.ibp-pagination,
.grw-pagination,
.grw-table-toolbar {
  min-width: 0;
}

/* Card header variant that wraps when filter form is present */
.grw-card__header--filters {
  flex-wrap: wrap;
  gap: 12px;
}
.grw-card__header--filters > form {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ibp-search-field { min-width: 200px; flex: 1 1 200px; }

.grw-card__header > *,
.grw-page-header__left,
.ibp-section-header > * {
  min-width: 0;
}

.grw-page-header__title,
.grw-card__title,
.ibp-section-title {
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* A leading icon SVG is `display:block` by the global img/svg reset, so a plain-text
   title containing one breaks onto its own line above the text unless the title itself
   becomes a flex row. Scoped to :has(svg) so plain-text titles (the vast majority) are
   untouched. */
.grw-page-header__title:has(svg),
.grw-card__title:has(svg),
.ibp-section-title:has(svg) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.grw-page-header__subtitle,
.grw-card__subtitle {
  text-wrap: pretty;
}

/* Stacks a card's title above its subtitle instead of both sharing a row
   inside the flex header — without this, min-width:0 on flex children lets
   a short title get squeezed by a long subtitle until overflow-wrap:anywhere
   breaks it mid-word (e.g. "Security" → "Securi/ty"). */
.grw-card__header-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ibp-page-actions,
.ibp-filter-bar__actions,
.ibp-filter-form__actions,
.ibp-action-row,
.ibp-row-actions,
.ibp-page-btns,
.grw-card__footer {
  flex-wrap: wrap;
}

.ibp-filter-form,
.ibp-filter-bar {
  width: 100%;
}

.ibp-filter-form .grw-form-group,
.ibp-filter-bar .grw-form-group {
  min-width: min(220px, 100%);
}

.ibp-quick-links {
  margin-bottom: 0;
}

.ibp-quick-links .grw-btn {
  flex: 1 1 220px;
}

.ibp-doc-item,
.ibp-conv-item,
.ibp-admin-conv-item,
.ibp-conv-row {
  min-width: 0;
}

.ibp-sticky,
.ibp-sticky-panel {
  align-self: start;
}

.ibp-review-table {
  min-width: 520px;
}

.ibp-review-table,
.ibp-report-table {
  display: table;
}

.ibp-form-row,
.ibp-grid-2col,
.ibp-grid-3col,
.ibp-grid-4col,
.ibp-grid-5col,
.ibp-grid-auto,
.ibp-dl-2col,
.ibp-dl-3col,
.ibp-stats-3col,
.ibp-bond-tenor-row {
  min-width: 0;
}

.ibp-form-row > *,
.ibp-grid-2col > *,
.ibp-grid-3col > *,
.ibp-grid-4col > *,
.ibp-grid-5col > *,
.ibp-grid-auto > *,
.ibp-dl-2col > *,
.ibp-dl-3col > *,
.ibp-stats-3col > *,
.ibp-bond-tenor-row > * {
  min-width: 0;
}

@media (max-width: 1199px) {
  .grw-content {
    max-width: 100%;
  }

  .ibp-layout-2col,
  .ibp-layout-2col--wide,
  .ibp-layout-2col--equal,
  .ibp-layout-2col--380 {
    gap: 20px;
  }
}

@media (max-width: 839px) {
  .grw-shell.sidebar-collapsed .grw-main,
  .grw-main {
    margin-left: 0 !important;
  }

  .grw-shell.sidebar-collapsed .grw-topbar,
  .grw-topbar {
    left: 0 !important;
  }

  .grw-topbar {
    padding-inline: 14px;
    gap: 10px;
  }

  .grw-topbar__breadcrumb {
    min-width: 0;
    overflow: hidden;
  }

  .grw-topbar__breadcrumb span:last-child,
  .grw-topbar__breadcrumb a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .grw-topbar__actions {
    gap: 6px;
  }

  .grw-sidebar.is-mobile-open {
    width: min(86vw, 320px) !important;
  }

  .grw-content {
    padding: 20px 16px 32px;
  }

  .grw-page-header {
    margin-bottom: 20px;
  }

  .grw-page-header__title {
    font-size: 22px;
  }

  .grw-card {
    border-radius: 12px;
  }

  .grw-card__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }

  .grw-card__header > .grw-btn,
  .grw-card__header > .ibp-page-actions,
  .grw-card__header > .ibp-action-row,
  .grw-card__header > form {
    width: 100%;
  }

  .grw-card__header--filters > form {
    margin-left: 0;
    width: 100%;
  }

  .grw-card__header--filters > form select,
  .grw-card__header--filters > form .grw-input,
  .grw-card__header--filters > form .grw-btn {
    width: 100%;
  }

  .ibp-search-field { min-width: 0; }

  .grw-card__body {
    padding: 16px;
  }

  .grw-card__body--flush {
    padding: 0;
  }

  .grw-card__footer {
    align-items: stretch;
    padding: 14px 16px;
  }

  .grw-btn {
    min-height: 44px;
    height: auto;
    padding-block: 9px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }

  .grw-btn--sm {
    min-height: 44px;
    padding-block: 7px;
  }

  .ibp-page-actions,
  .ibp-filter-bar__actions,
  .ibp-filter-form__actions,
  .ibp-action-row,
  .ibp-row-actions,
  .ibp-quick-links,
  .grw-table-toolbar__left,
  .grw-table-toolbar__right {
    width: 100%;
  }

  .ibp-page-actions .grw-btn,
  .ibp-filter-bar__actions .grw-btn,
  .ibp-filter-form__actions .grw-btn,
  .ibp-action-row .grw-btn,
  .ibp-row-actions .grw-btn,
  .grw-table-toolbar__right .grw-btn {
    flex: 1 1 140px;
  }

  .ibp-filter-form,
  .ibp-filter-bar {
    align-items: stretch;
    gap: 12px;
  }

  .ibp-filter-form .grw-form-group,
  .ibp-filter-form .ibp-flex-1,
  .ibp-filter-bar .grw-form-group {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .ibp-sticky,
  .ibp-sticky-panel {
    position: static;
  }

  .ibp-bubble {
    max-width: 92%;
  }

  .ibp-thread-wrap {
    max-height: 60dvh;
  }

  .ibp-admin-conv-preview {
    max-width: 100%;
  }

  .ibp-conv-meta,
  .ibp-admin-conv-meta,
  .ibp-conv-row__meta {
    margin-left: 0;
  }

  .ibp-session-prompt {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }
}

@media (max-width: 640px) {
  .grw-content {
    padding-inline: 12px;
  }

  .grw-topbar__breadcrumb {
    font-size: 12px;
  }

  .grw-topbar__actions .grw-avatar,
  .ibp-topbar-divider {
    display: none;
  }

  .grw-topbar__action-label {
    display: none;
  }
  .grw-topbar__action-btn--labeled {
    width: 36px;
    padding: 0;
    border-color: transparent;
  }

  .grw-page-header__left,
  .grw-page-header__right,
  .grw-page-header > a,
  .grw-page-header > div,
  .grw-page-header .ibp-page-actions {
    width: 100%;
  }

  .grw-page-header .grw-btn,
  .grw-page-header .ibp-page-actions .grw-btn {
    width: 100%;
  }

  .grw-table {
    min-width: 680px;
  }

  .grw-table th,
  .grw-table td {
    padding: 10px 12px;
  }

  .grw-table-wrap {
    border-radius: 10px;
  }

  /* Tables using the card layout (.ibp-table-card, see §8 Mobile Card
     System below) stack into full-width cards at ≤680px — there's nothing
     to scroll sideways to, so the hint would be actively misleading. */
  .grw-table-wrap:not(.ibp-table-card)::before {
    content: 'Scroll sideways to view all columns';
    display: block;
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border-subtle);
    background: var(--color-surface-alt);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
  }

  .ibp-review-table {
    min-width: 480px;
  }

  .ibp-review-table th,
  .ibp-review-table td {
    padding-right: 12px;
  }

  .ibp-doc-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .ibp-doc-info {
    flex: 1 1 calc(100% - 48px);
  }

  .ibp-doc-actions {
    width: 100%;
    padding-left: 48px;
  }

  .ibp-doc-actions .grw-btn {
    width: 100%;
  }

  .ibp-conv-item,
  .ibp-admin-conv-item,
  .ibp-conv-row {
    padding: 14px;
  }

  .ibp-conv-row {
    flex-wrap: wrap;
  }

  .ibp-conv-row__body {
    flex: 1 1 calc(100% - 24px);
  }

  .ibp-conv-row__meta,
  .ibp-conv-meta,
  .ibp-admin-conv-meta {
    width: 100%;
    align-items: flex-start;
    text-align: left;
    padding-left: 18px;
  }

  .ibp-admin-conv-item {
    flex-wrap: wrap;
  }

  .ibp-admin-conv-body {
    flex: 1 1 calc(100% - 52px);
  }

  .ibp-admin-conv-meta {
    padding-left: 50px;
  }

  .ibp-pagination,
  .grw-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .ibp-page-btns {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .ibp-page-btns .grw-btn {
    flex: 0 0 auto;
  }

  .ibp-inline-form {
    flex-wrap: wrap;
    width: 100%;
  }

  .ibp-inline-form .grw-input,
  .ibp-inline-note {
    width: 100%;
  }

  .ibp-inline-form .grw-btn {
    flex: 1 1 120px;
  }

  .ibp-repeater-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ibp-repeater-row .ibp-form-row,
  .ibp-repeater-row .ibp-form-row--4col {
    width: 100%;
  }

  .ibp-repeater-remove {
    align-self: flex-end;
  }

  .ibp-type-cards .grw-option-card {
    flex-basis: 100%;
    min-width: 0;
  }

  .ibp-dl,
  .ibp-kv-grid {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .ibp-kv-grid dt,
  .ibp-dl dt {
    padding-top: 10px;
  }

  .ibp-stats-row > * {
    min-width: 0;
  }

  .ibp-stat-value {
    font-size: 24px;
  }

  .ibp-review-banner {
    align-items: flex-start;
  }

  .ibp-session-prompt {
    align-items: stretch;
    flex-direction: column;
  }

  .ibp-session-prompt__actions {
    width: 100%;
  }

  .ibp-session-prompt__actions .grw-btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .grw-content {
    padding: 12px 10px 28px;
  }

  .grw-card__header,
  .grw-card__body {
    padding: 14px;
  }

  .grw-card__body--flush {
    padding: 0;
  }

  .grw-page-header__title {
    font-size: 20px;
  }

  .ibp-wizard-steps__list {
    min-width: 320px;
  }

  .ibp-wizard-step__label {
    white-space: normal;
    line-height: 1.15;
  }

  .ibp-wizard-step + .ibp-wizard-step::before {
    top: 13px;
  }

  .grw-btn {
    width: 100%;
  }

  .ibp-page-btns .grw-btn,
  .ibp-inline-form .grw-btn,
  .ibp-row-actions .grw-btn,
  .grw-table td .grw-btn,
  .ibp-pagination__controls .grw-btn {
    width: auto;
  }
}
body.ibp-sidebar-open { overflow: hidden; }

/* ── Sidebar brand text: prevent overflow on small widths ────── */
.grw-sidebar__brand > div { min-width: 0; overflow: hidden; }

/* ── Admin offer detail summary strip ───────────────────────── */
.ibp-offer-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(240px, 1.25fr) minmax(250px, 1.15fr) minmax(140px, 0.65fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 72%, transparent);
  border-radius: var(--r-lg, 12px);
  background: color-mix(in srgb, var(--color-border, #d7ded9) 78%, transparent);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(16, 24, 22, 0.08));
}
.ibp-offer-summary > div {
  position: relative;
  min-width: 0;
  padding: 18px 20px 19px;
  background: color-mix(in srgb, var(--color-surface, #fbfcfb) 94%, var(--color-surface-alt, #f3f6f4));
}
.ibp-offer-summary__main {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--grw-deep-green, #006527) 12%, var(--color-surface, #fbfcfb)),
      color-mix(in srgb, var(--color-surface, #fbfcfb) 92%, var(--color-surface-alt, #f3f6f4))
    ) !important;
}
.ibp-offer-summary__main::before {
  content: "";
  position: absolute;
  inset-block: 14px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 0 var(--r-full, 999px) var(--r-full, 999px) 0;
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 82%, var(--color-surface, #fbfcfb));
}
.ibp-offer-summary__label {
  display: block;
  margin-bottom: 8px;
  color: color-mix(in srgb, var(--color-text-muted, #7a8681) 88%, var(--color-text, #1e2a26));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ibp-offer-summary strong {
  display: block;
  color: var(--color-text, #1e2a26);
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ibp-offer-summary p {
  margin: 6px 0 0;
  color: var(--color-text-secondary, var(--color-text-muted, #5f6b66));
  font-size: 13px;
  line-height: 1.45;
}
.ibp-offer-summary code {
  font-size: 12px;
  color: var(--color-text, #1e2a26);
  background: color-mix(in srgb, var(--color-surface-alt, #eef3f0) 88%, var(--color-surface, #fbfcfb));
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 70%, transparent);
}

/* ── Offer notice template editor ─────────────────────────── */
.ibp-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ibp-template-editor {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 78%, transparent);
  border-radius: var(--r-lg, 12px);
  background: color-mix(in srgb, var(--color-surface, #fbfcfb) 94%, var(--color-surface-alt, #f3f6f4));
}

.ibp-template-editor__section,
.ibp-template-builder-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ibp-template-editor__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ibp-template-editor__header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ibp-template-editor__eyebrow {
  color: var(--color-text-muted, #7a8681);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ibp-template-editor__header strong {
  color: var(--color-text, #1e2a26);
  font-size: 15px;
}

.ibp-template-editor__textarea {
  min-height: 360px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
  white-space: pre;
  overflow: auto;
}

.ibp-placeholder-panel,
.ibp-template-table-picker,
.ibp-template-json {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 70%, transparent);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface, #fbfcfb);
}

.ibp-placeholder-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.ibp-placeholder-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--grw-deep-green, #006527) 28%, var(--color-border, #d7ded9));
  border-radius: var(--r-full, 999px);
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 7%, var(--color-surface, #fbfcfb));
  color: var(--color-text, #1e2a26);
  cursor: pointer;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 11px;
  font-weight: 700;
}

.ibp-placeholder-chip:hover {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 12%, var(--color-surface, #fbfcfb));
}

/* Inline "insert placeholder" widget attached to a text field */
.ibp-tplb-value-wrap { position: relative; }
.ibp-tplb-value-wrap .grw-input,
.ibp-tplb-value-wrap .grw-textarea { padding-right: 34px; }
.ibp-tplb-ph-trigger {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid var(--color-border, #d7ded9);
  background: var(--color-surface, #fbfcfb);
  color: var(--color-text-muted, #7a8681);
  cursor: pointer;
}
.ibp-tplb-ph-trigger:hover {
  color: var(--grw-deep-green, #006527);
  border-color: var(--grw-deep-green, #006527);
}
.ibp-tplb-ph-dropdown {
  /* Fixed (not absolute) so it escapes .ibp-tplb-section's overflow:hidden and any
     scrolling ancestor — position is computed in JS from the trigger's bounding rect. */
  position: fixed;
  z-index: 1000;
  width: 280px;
  max-height: 280px;
  overflow-y: auto;
  padding: 10px;
  background: var(--color-surface, #fbfcfb);
  border: 1px solid var(--color-border, #d7ded9);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}
.ibp-tplb-ph-dropdown .ibp-placeholder-list { margin: 4px 0 10px; }

/* Placeholders get a distinct look wherever they appear in content boxes */
.ibp-tplb-ph-token {
  display: inline;
  padding: 0 3px;
  border-radius: 3px;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-weight: 700;
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 14%, transparent);
  color: var(--grw-deep-green, #006527);
}

/* Live preview shown under a paragraph once it contains a placeholder — reflects what the
   text actually looks like, since a native textarea can't style a substring in place. */
.ibp-tplb-text-preview {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-surface-alt, #f3f6f4);
  border: 1px dashed var(--color-border, #d7ded9);
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text, #1e2a26);
  white-space: pre-wrap;
  word-break: break-word;
}
.ibp-tplb-text-preview-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #7a8681);
  margin-bottom: 3px;
}

/* Table row Value input gets a distinct whole-field look when it holds a placeholder —
   in practice these values are almost always a single {{Token}}, never mixed with prose. */
.ibp-tplb-value-wrap .grw-input.ibp-has-placeholder {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 7%, var(--color-surface, #fbfcfb));
  border-color: color-mix(in srgb, var(--grw-deep-green, #006527) 32%, var(--color-border, #d7ded9));
  color: var(--grw-deep-green, #006527);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  font-weight: 700;
}

.ibp-template-table-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.ibp-template-table-picker > .ibp-template-editor__eyebrow {
  grid-column: 1 / -1;
}

.ibp-template-json summary {
  color: var(--color-text, #1e2a26);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.ibp-template-json .ibp-template-editor__textarea {
  min-height: 260px;
  margin-top: 10px;
}

.ibp-template-test-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.ibp-template-test-row .grw-form-group {
  margin: 0;
}

.ibp-template-test-row__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .ibp-offer-summary { grid-template-columns: 1fr; }
  .ibp-template-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ibp-template-editor__section,
  .ibp-template-builder-fields,
  .ibp-template-table-picker,
  .ibp-template-test-row {
    grid-template-columns: 1fr;
  }

  .ibp-template-test-row__actions {
    justify-content: stretch;
  }

  .ibp-template-test-row__actions .grw-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

.ibp-template-grid--stacked { grid-template-columns: 1fr; }

/* ── Template builder v2 (dynamic section editor) ─────────────── */
.ibp-tplb-panel {
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 70%, transparent);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface, #fbfcfb);
  display: grid;
  gap: 12px;
}
.ibp-tplb-panel-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted, #7a8681);
}
.ibp-tplb-toggle-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.ibp-tplb-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--r-full, 999px);
  border: 1px solid var(--color-border, #d7ded9);
  background: var(--color-surface, #fff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text, #1e2a26);
  transition: background 120ms, border-color 120ms, color 120ms;
  -webkit-user-select: none;
  user-select: none;
}
.ibp-tplb-toggle-btn.is-active {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 10%, white);
  border-color: var(--grw-deep-green, #006527);
  color: var(--grw-deep-green, #006527);
}
.ibp-tplb-toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted, #7a8681);
}
.ibp-tplb-sections-wrap {
  display: grid;
  gap: 10px;
}
.ibp-tplb-sections-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ibp-tplb-sections {
  display: grid;
  gap: 8px;
}
.ibp-tplb-section {
  border: 1px solid var(--color-border, #d7ded9);
  border-radius: var(--r-md, 8px);
  background: var(--color-surface, #fff);
  overflow: hidden;
  transition: box-shadow 140ms, border-color 140ms;
}
.ibp-tplb-section.is-dragging {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
  opacity: 0.82;
}
.ibp-tplb-section.drag-over {
  border-color: var(--grw-deep-green, #006527);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--grw-deep-green, #006527) 22%, transparent);
}
.ibp-tplb-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: color-mix(in srgb, var(--color-surface-alt, #f3f6f4) 55%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 70%, transparent);
  -webkit-user-select: none;
  user-select: none;
}
.ibp-tplb-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 24px;
  color: var(--color-text-muted, #9ca3af);
  cursor: grab;
  flex-shrink: 0;
  border-radius: 4px;
  transition: color 100ms;
}
.ibp-tplb-handle:active { cursor: grabbing; }
.ibp-tplb-handle:hover { color: var(--color-text, #1e2a26); }
.ibp-tplb-handle svg { display: block; }
.ibp-tplb-section-type { flex: 1; display: flex; align-items: center; gap: 7px; }
.ibp-tplb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-full, 999px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ibp-tplb-badge--paragraph {
  background: color-mix(in srgb, #3b82f6 11%, white);
  color: #1d4ed8;
  border: 1px solid color-mix(in srgb, #3b82f6 22%, transparent);
}
.ibp-tplb-badge--table {
  background: color-mix(in srgb, #8b5cf6 11%, white);
  color: #6d28d9;
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, transparent);
}
.ibp-tplb-badge--signature {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 10%, white);
  color: var(--grw-deep-green, #006527);
  border: 1px solid color-mix(in srgb, var(--grw-deep-green, #006527) 20%, transparent);
}
.ibp-tplb-badge--image {
  background: color-mix(in srgb, #f59e0b 12%, white);
  color: #b45309;
  border: 1px solid color-mix(in srgb, #f59e0b 24%, transparent);
}
.ibp-tplb-section-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ibp-tplb-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--r-sm, 6px);
  background: transparent;
  color: var(--color-text-muted, #7a8681);
  cursor: pointer;
  transition: background 110ms, color 110ms;
  flex-shrink: 0;
}
.ibp-tplb-ctrl-btn:hover { background: var(--color-surface-alt, #f3f6f4); color: var(--color-text, #1e2a26); }
.ibp-tplb-ctrl-btn--danger:hover { background: #fee2e2; color: #dc2626; }
.ibp-tplb-section-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.ibp-tplb-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ibp-tplb-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.ibp-tplb-style-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-sm, 6px);
  background: color-mix(in srgb, var(--color-surface-alt, #f3f6f4) 60%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-border, #d7ded9) 60%, transparent);
}
.ibp-tplb-fontsize-input { width: 60px !important; }

/* Rich-text (Quill) paragraph editor inside the notice template builder */
.ibp-tplb-quill-wrap { display: grid; gap: 6px; }
.ibp-tplb-quill-toolbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ibp-tplb-quill-toolbar.ql-toolbar.ql-snow {
  flex: 1 1 auto;
  border-radius: var(--r-md, 8px);
  border-color: var(--color-border, #d7ded9);
  background: var(--color-surface, #fbfcfb);
  padding: 6px 8px;
}
.ibp-tplb-ph-trigger--toolbar {
  position: static;
  flex-shrink: 0;
}
.ibp-tplb-quill-editor.ql-container.ql-snow {
  border-radius: var(--r-md, 8px);
  border-color: var(--color-border, #d7ded9);
  background: var(--color-surface, #fbfcfb);
  font-family: var(--font-ui);
  font-size: 14px;
}
.ibp-tplb-quill-editor .ql-editor {
  min-height: 84px;
  color: var(--color-text, #1e2a26);
  line-height: 1.5;
}
.ibp-tplb-quill-editor .ql-editor.ql-blank::before {
  color: var(--color-text-muted, #7a8681);
  font-style: normal;
}
.ibp-tplb-quill-editor.ql-container.ql-snow:focus-within {
  border-color: var(--grw-deep-green, #006527);
  box-shadow: var(--focus-shadow);
}
/* The free-form letter-body canvas replaces what used to be a list of small per-section
   editors, so it needs real writing room rather than the ~84px a single paragraph got. */
.ibp-tplb-quill-editor--canvas .ql-editor { min-height: 360px; font-family: Verdana, sans-serif; font-size: 10px; }
.ibp-tplb-quill-editor--canvas .ql-picker.ql-font,
.ibp-tplb-quill-editor--canvas .ql-picker.ql-size { width: 90px; }
.ibp-tplb-quill-editor--canvas .ql-editor table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.ibp-tplb-quill-editor--canvas .ql-editor table td,
.ibp-tplb-quill-editor--canvas .ql-editor table th { border: 1px solid var(--color-border, #d7ded9); padding: 6px 8px; }
.ibp-tplb-quill-editor--canvas .ql-editor img { max-width: 100%; }
.ibp-tplb-table-rows { display: grid; gap: 6px; }
.ibp-tplb-table-row {
  display: grid;
  grid-template-columns: 20px 1fr 1fr 90px;
  gap: 6px;
  align-items: center;
}
.ibp-tplb-row-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #9ca3af);
  cursor: grab;
  height: 34px;
  border-radius: 4px;
  transition: color 100ms;
}
.ibp-tplb-row-handle:active { cursor: grabbing; }
.ibp-tplb-row-handle:hover { color: var(--color-text, #1e2a26); }
.ibp-tplb-table-header {
  display: grid;
  grid-template-columns: 20px 1fr 1fr 90px;
  gap: 6px;
  padding: 0 0 4px;
}
.ibp-tplb-table-header-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #7a8681);
}
.ibp-tplb-add-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ibp-tplb-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--r-full, 999px);
  border: 1.5px dashed var(--color-border, #d7ded9);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-muted, #7a8681);
  transition: background 110ms, border-color 110ms, color 110ms;
}
.ibp-tplb-add-btn:hover {
  border-color: var(--grw-deep-green, #006527);
  color: var(--grw-deep-green, #006527);
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 5%, white);
}
.ibp-tplb-asset-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ibp-tplb-asset-preview {
  height: 48px;
  max-width: 160px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--color-border, #d7ded9);
  background: color-mix(in srgb, var(--color-surface-alt, #f3f6f4) 80%, transparent);
  display: none;
}
.ibp-tplb-asset-preview.is-loaded { display: block; }
.ibp-tplb-asset-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: var(--r-md, 8px);
  border: 1px solid var(--color-border, #d7ded9);
  background: var(--color-surface, #fff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text, #1e2a26);
  transition: background 110ms, border-color 110ms;
}
.ibp-tplb-asset-btn:hover {
  border-color: var(--grw-deep-green, #006527);
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 4%, white);
}
.ibp-tplb-asset-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  width: 100%;
  height: 100%;
}
.ibp-tplb-asset-status {
  font-size: 11px;
  color: var(--color-text-muted, #7a8681);
}
.ibp-tplb-ph-categories { display: grid; gap: 8px; margin-top: 8px; }
.ibp-tplb-ph-cat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #7a8681);
  margin-bottom: 4px;
}
.ibp-tplb-ph-hint {
  font-size: 11px;
  font-style: italic;
  color: var(--color-text-muted, #7a8681);
  padding: 2px 0;
  min-width: 160px;
}
.ibp-tplb-empty {
  padding: 28px;
  text-align: center;
  color: var(--color-text-muted, #7a8681);
  font-size: 13px;
  border: 1.5px dashed var(--color-border, #d7ded9);
  border-radius: var(--r-md, 8px);
}
.ibp-tplb-uploading { opacity: 0.5; pointer-events: none; }
.ibp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .ibp-tplb-2col,
  .ibp-tplb-3col { grid-template-columns: 1fr; }
  .ibp-tplb-table-row { grid-template-columns: 20px 1fr 1fr 28px; }
  .ibp-tplb-table-header { grid-template-columns: 20px 1fr 1fr 28px; }
}

/* ── Offer logo thumbnail ──────────────────────────────────────── */
.ibp-offer-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--color-border, #e5e7eb);
  background-color: var(--color-surface-alt, #f9fafb);
}
.ibp-offer-logo--lg {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}
.ibp-offer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ibp-offer-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: var(--color-surface-alt, #f3f4f6);
  border: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text-muted, #9ca3af);
  flex-shrink: 0;
}
.ibp-offer-logo-placeholder--lg {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

/* ── Toolkit file upload dropzone ──────────────────────────────── */
.grw-dropzone {
  display: block;
  border: 2px dashed var(--color-border, #d0d5dd);
  border-radius: var(--r-lg, 12px);
  padding: var(--sp-10, 32px) var(--sp-8, 24px);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition-fast, 160ms ease), background var(--transition-fast, 160ms ease), box-shadow var(--transition-fast, 160ms ease);
  background: var(--color-surface, #fff);
}
.grw-dropzone:hover,
.grw-dropzone.is-dragging {
  border-color: var(--grw-deep-green, #006527);
  background: rgba(0, 101, 39, 0.03);
}
.grw-dropzone__icon {
  display: block;
  width: 40px;
  height: 40px;
  color: var(--n5, #667085);
  margin: 0 auto var(--sp-4, 16px);
}
.grw-dropzone__title {
  font-weight: 650;
  color: var(--color-text, #101828);
  margin-bottom: var(--sp-1, 4px);
  overflow-wrap: anywhere;
}
.grw-dropzone__sub {
  font-size: 13px;
  color: var(--color-text-muted, #667085);
  overflow-wrap: anywhere;
}

/* ── Offer document upload: selected state for toolkit dropzone ─ */
.ibp-file-dropzone {
  position: relative;
}
.grw-dropzone.is-selected {
  border-color: var(--grw-deep-green, #006527);
  background: rgba(0, 101, 39, 0.04);
}
.grw-dropzone.is-selected .grw-dropzone__icon,
.grw-dropzone.is-selected .grw-dropzone__title {
  color: var(--grw-deep-green, #006527);
}
.ibp-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ibp-file-input--dropzone {
  inset: 0;
  width: 100%;
  height: 100%;
  clip: auto;
  opacity: 0;
  cursor: pointer;
}
.ibp-file-dropzone:focus-within {
  box-shadow: var(--focus-shadow, 0 0 0 3px rgba(132, 202, 35, 0.35));
}

/* ── intl-tel-input integration ─────────────────────────────────────────── */
.iti { width: 100%; }
.iti__tel-input {
  width: 100%;
  height: var(--grw-input-h, 42px);
  padding: var(--grw-input-py, 10px) var(--grw-input-px, 14px) var(--grw-input-py, 10px) 52px;
  font-size: var(--grw-input-fs, 14px);
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.iti__tel-input:focus {
  border-color: var(--color-primary);
  box-shadow: var(--focus-shadow, 0 0 0 3px rgba(132, 202, 35, 0.35));
}
.grw-form-group:has(.field-validation-error) .iti__tel-input {
  border-color: var(--color-danger, #dc3545);
}
.iti__country-container { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.iti__selected-country {
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  border-right: 1px solid var(--color-border);
  color: var(--color-text);
  transition: background-color var(--transition-fast);
}
.iti__selected-country:hover,
.iti__selected-country:focus-visible {
  background: var(--color-surface-alt);
}
.iti__selected-country:focus-visible {
  outline: 2px solid var(--button-focus);
  outline-offset: -2px;
}

/* The picker is appended to body so it remains visible above modal content. */
.iti--container { z-index: var(--ibp-z-above-modal); }
.iti__dropdown-content {
  width: min(360px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 32px));
  overflow: hidden;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-ui);
}
.iti__search-input {
  width: calc(100% - 20px);
  min-height: 40px;
  margin: 10px;
  padding: 0 12px;
  color: var(--color-text);
  background: var(--color-surface-alt);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-sm);
  font: 14px/1.4 var(--font-ui);
  outline: none;
}
.iti__search-input::placeholder { color: var(--color-text-muted); }
.iti__search-input:focus {
  background: var(--color-surface);
  border-color: var(--color-primary);
  box-shadow: var(--focus-shadow);
}
.iti__country-list {
  color: var(--color-text);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border-subtle);
  scrollbar-color: var(--color-border) var(--color-surface-alt);
}
.iti__country {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.4;
}
.iti__country.iti__highlight {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
}
.iti__country-name { font-weight: 500; }
.iti__dial-code { color: var(--color-text-muted); }
.iti__country.iti__highlight .iti__dial-code { color: var(--color-text-secondary); }
.iti__divider { border-bottom-color: var(--color-border-subtle); }
.iti__arrow { border-top-color: var(--color-text-muted); }
.iti__arrow--up {
  border-top-color: transparent;
  border-bottom-color: var(--color-text-muted);
}

/* ── Profile-gate overlay ────────────────────────────────────────────────── */
.ibp-gate-wrapper {
  position: relative;
}
.ibp-gate-wrapper--locked > *:not(.ibp-gate-overlay) {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}
.ibp-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 320px;
}
.ibp-gate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg, 12px);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.ibp-gate-card__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ibp-gate-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}
.ibp-gate-card__body {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6b7280);
  margin: 0;
  line-height: 1.6;
}

/* ── Profile wizard step-error banner ────────────────────────────────────── */
.ibp-step-error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  background: color-mix(in srgb, var(--color-danger, #dc3545) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-danger, #dc3545) 30%, transparent);
  border-radius: var(--r-sm);
  color: var(--color-danger, #dc3545);
  font-size: 0.875rem;
  font-weight: 500;
}
.ibp-step-error svg { flex-shrink: 0; }

/* ── grw-label optional marker ───────────────────────────────────────────── */
.grw-label__optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted, #9ca3af);
  margin-left: 0.25rem;
}

/* -- Custom searchable combobox ---------------------------------------------- */

/* Native select is hidden; stays in DOM for form submission */
.ibp-cselect__native { display: none !important; }

/* Trigger button — mirrors grw-select / grw-input appearance */
.ibp-cselect__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 40px;
  padding: 0 14px 0 var(--sp-4, 16px);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--color-text);
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.ibp-cselect__trigger:hover:not(:disabled) { border-color: var(--n5); }
.ibp-cselect__trigger:focus,
.ibp-cselect__trigger--open { border-color: var(--grw-deep-green, #006527); box-shadow: var(--focus-shadow); }
.ibp-cselect__trigger.is-invalid { border-color: var(--color-error) !important; }
.ibp-cselect__trigger.is-invalid:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.2); }

.ibp-cselect__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ibp-cselect__trigger--placeholder .ibp-cselect__label { color: var(--color-text-muted); }

.ibp-cselect__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: transform 200ms ease;
}
.ibp-cselect__trigger--open .ibp-cselect__arrow { transform: rotate(180deg); }

/* Floating dropdown — position: fixed escapes any overflow container */
.ibp-cselect__dropdown {
  position: fixed;
  z-index: 9990;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 160px;
}

/* Inline search field at the top of the dropdown */
.ibp-cselect__search-wrap {
  padding: var(--sp-2, 8px);
  border-bottom: 1.5px solid var(--color-border-subtle);
  background: var(--color-surface-alt);
  transition: border-color var(--transition-fast);
}
.ibp-cselect__search-wrap:focus-within { border-bottom-color: var(--grw-deep-green, #006527); }
.ibp-cselect__search-field {
  position: relative;
}
.ibp-cselect__search-icon {
  position: absolute;
  left: var(--sp-3, 12px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  pointer-events: none;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.ibp-cselect__search-field:focus-within .ibp-cselect__search-icon { color: var(--grw-deep-green, #006527); }
.ibp-cselect__search {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 var(--sp-4, 16px) 0 38px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--color-text);
  font-family: var(--font-ui);
  caret-color: var(--grw-deep-green, #006527);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.ibp-cselect__search:focus {
  border-color: var(--grw-deep-green, #006527);
  box-shadow: var(--focus-shadow);
}
.ibp-cselect__search::placeholder { color: var(--color-text-muted); }

/* Options list */
.ibp-cselect__list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.ibp-cselect__option {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast);
}
.ibp-cselect__option--placeholder { color: var(--color-text-muted); font-style: italic; }
.ibp-cselect__option:hover { background: var(--color-surface-alt); }
.ibp-cselect__option--selected {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 8%, transparent);
  color: var(--grw-deep-green, #006527);
  font-weight: 500;
}
.ibp-cselect__option--focused { background: var(--color-surface-alt); }
.ibp-cselect__option--selected.ibp-cselect__option--focused {
  background: color-mix(in srgb, var(--grw-deep-green, #006527) 14%, transparent);
}
.ibp-cselect__empty {
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ── Profile wizard: auto-save chip, BVN status, loading state ────────── */
.ibp-autosave-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 6px;
  text-align: right;
}

.ibp-saved-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-success);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  margin-right: 8px;
}

.ibp-saved-chip--show { opacity: 1; }

.ibp-bvn-verified { color: var(--color-success); font-size: 13px; }
.ibp-bvn-failed   { color: var(--color-error);   font-size: 13px; }
.text-warning { color: var(--color-warning, #9a6700); }
/* .text-success/.text-error were referenced by the BVN/bank-account inline status
   helpers in ibp.js (showStatus/showBankAccountStatus) but never defined — only the
   warning state actually rendered in color. Defined here so all three states work. */
.text-success { color: var(--color-success, #16a34a); }
.text-error   { color: var(--color-error, #dc2626); }

.ibp-director-entry.is-confirmed {
  border-color: color-mix(in srgb, var(--color-success) 38%, var(--color-border));
  box-shadow: inset 3px 0 0 var(--color-success);
}

.ibp-director-actions {
  display: flex;
  justify-content: flex-end;
}

.ibp-director-bvn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 10px;
  align-items: stretch;
}

.ibp-director-bvn-row .grw-input-wrap {
  min-width: 0;
}

.ibp-director-confirm-btn {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ibp-director-bvn-row {
    grid-template-columns: 1fr;
  }

  .ibp-director-confirm-btn {
    min-height: 40px;
  }
}

.ibp-policy-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  background: var(--color-surface-alt);
}

.ibp-policy-panel__header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.ibp-policy-panel__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.ibp-policy-panel__subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
}

.ibp-policy-panel__body {
  padding: 16px;
}

.ibp-btn--loading {
  position: relative;
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
  color: transparent !important;
}

.ibp-btn--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 101, 39, 0.2);
  border-top-color: #006527;
  border-radius: 50%;
  animation: grw-spin 0.65s linear infinite;
}

/* ── Validation bypass controls (registration review) ──────────────────────── */
.ibp-bypass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ibp-bypass-row__info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ibp-inline-form { margin: 0; }

.ibp-global-bypass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.ibp-bypass-control {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--r-md);
  background: var(--color-surface);
}
.ibp-bypass-control--active {
  border-color: var(--color-warning, #f59e0b);
  background: color-mix(in srgb, var(--color-warning, #f59e0b) 6%, transparent);
}
.ibp-bypass-control__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

/* Disabled decision radio */
.grw-check.is-disabled { opacity: 0.45; cursor: not-allowed; }
.grw-check.is-disabled .grw-check__input { pointer-events: none; }

/* Misc helpers used in detail view */
.ibp-d-block { display: block; }
.ibp-divider { border: none; border-top: 1px solid var(--color-border); }
.ibp-mr-1 { margin-right: 4px; }
.ibp-ml-2 { margin-left: 8px; }

/* Investor-facing bypass notice */
.ibp-validation-bypass-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--color-warning-bg, #fffbeb);
  border: 1px solid var(--color-warning-border, #fcd34d);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--color-warning-text, #92400e);
  line-height: 1.5;
}
.ibp-validation-bypass-notice svg { flex-shrink: 0; margin-top: 1px; }

/* ── Dashboard header: stack on tablet/mobile ────────────── */
@media (max-width: 720px) {
  .ibp-dashboard-header {
    margin-bottom: 20px;
  }

  .ibp-dashboard-header .ibp-page-actions {
    width: 100%;
  }

  .ibp-dashboard-header .ibp-page-actions .grw-btn {
    flex: 1 1 140px;
    justify-content: center;
    min-height: 40px;
  }

  .ibp-dashboard-section-header {
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .ibp-dashboard-section-header .grw-btn {
    white-space: nowrap;
    min-height: 36px;
  }

  .ibp-dashboard .grw-table {
    min-width: 620px;
  }

  /* KPI: tighten padding on smaller screens */
  .ibp-dashboard-kpi.grw-kpi {
    padding: 18px 20px;
  }

  .ibp-dashboard-kpi .grw-kpi__value {
    font-size: 22px;
  }

  .ibp-dashboard-kpi--wide .grw-kpi__value {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  /* Keep Browse offers / Open inbox as a compact side-by-side pair rather
     than stacking each full-width — at phone widths two 44px-tall,
     edge-to-edge buttons read as oversized for what are just nav shortcuts. */
  .ibp-dashboard-header .ibp-page-actions {
    gap: 8px;
  }

  .ibp-dashboard-header .ibp-page-actions .grw-btn {
    flex: 1 1 0;
    min-height: 44px;
    font-size: 13px;
    padding-inline: 12px;
  }

  .ibp-dashboard-section-header {
    flex-direction: column;
    gap: 8px;
  }

  .ibp-dashboard-section-header .grw-btn {
    width: 100%;
    justify-content: center;
  }

  /* Status banner: compact on very small screens */
  .ibp-status-banner {
    padding: 14px 16px;
    gap: 12px;
  }

  .ibp-status-banner__icon {
    width: 34px;
    height: 34px;
  }

  /* Offer card footer: stack button below dates */
  .offer-card__footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .offer-card__footer .grw-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 14px;
  }

  /* KPI value size on very small phones */
  .ibp-dashboard-kpi .grw-kpi__value {
    font-size: 20px;
  }

  .ibp-dashboard-kpi--wide .grw-kpi__value {
    font-size: 16px;
  }
}

/* ── Pending-gate (subscribe panel for under-review investors) ───── */
.ibp-pending-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 12px;
}
.ibp-pending-gate__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(23, 92, 211, 0.08);
  color: var(--color-info, #175cd3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.ibp-pending-gate__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--grw-color-text, #1e293b);
  margin: 0;
}
.ibp-pending-gate__body {
  font-size: 13px;
  color: var(--grw-color-text-muted, #64748b);
  margin: 0;
  line-height: 1.55;
}

/* ── Global review status strip (dismissible layout banner) ─────── */
.ibp-status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}
.ibp-status-strip svg { flex-shrink: 0; }
.ibp-status-strip--info {
  background: rgba(23, 92, 211, 0.07);
  border: 1px solid rgba(23, 92, 211, 0.2);
  color: #1e3a8a;
}
.ibp-status-strip--warning {
  background: rgba(183, 121, 31, 0.07);
  border: 1px solid rgba(183, 121, 31, 0.2);
  color: #78350f;
}
.ibp-status-strip__text { flex: 1; }
.ibp-status-strip__link {
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}
.ibp-status-strip--info .ibp-status-strip__link    { color: #175cd3; }
.ibp-status-strip--warning .ibp-status-strip__link { color: #92400e; }
.ibp-status-strip__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  opacity: 0.45;
  flex-shrink: 0;
  color: inherit;
}
.ibp-status-strip__close:hover { opacity: 1; }
}

/* ── Settings index cards ───────────────────────────────────────── */
.ibp-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.ibp-settings-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ibp-settings-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ibp-settings-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(0, 101, 39, 0.08);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ibp-settings-card__body { flex: 1; min-width: 0; }
.ibp-settings-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.ibp-settings-card__desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.ibp-settings-card__action {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

/* ── Form actions row (save / cancel) ───────────────────────────── */
.ibp-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  padding-bottom: 8px;
}

/* ── Inline badges ───────────────────────────────────────────────── */
.ibp-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 6px;
}
.ibp-badge--secret {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}
.ibp-badge--auto {
  background: rgba(16, 124, 65, 0.08);
  color: #065f46;
  border: 1px solid rgba(16, 124, 65, 0.2);
}

/* ── NGX offer picker ────────────────────────────────────────────── */
.ibp-ngx-lookup {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ibp-ngx-lookup__status {
  font-size: 13px;
}
.ibp-ngx-offer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}
.ibp-ngx-offer-item {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}
.ibp-ngx-offer-item:last-child { border-bottom: none; }
.ibp-ngx-offer-item:hover,
.ibp-ngx-offer-item:focus {
  background: rgba(0, 101, 39, 0.06);
  outline: none;
}
.ibp-ngx-offer-item__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.ibp-ngx-offer-item__sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 1px;
}

/* ── Online payment flow overlay ─────────────────────────────────────────── */
.ibp-pay-amount-block { text-align: center; padding: 4px 0; }
.ibp-pay-amount {
  font-size: 30px; font-weight: 800; color: var(--color-text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.5px; line-height: 1.2;
}
.ibp-pay-fee-note { font-size: 12px; color: var(--color-text-muted); line-height: 1.5; margin-top: 5px; }

.ibp-pay-status-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px;
  background: var(--color-surface-alt);
  border-radius: 8px;
  border: 1px solid var(--color-border-subtle);
  transition: border-color 0.2s;
}
.ibp-pay-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,101,39,0.14);
  border-top-color: var(--grw-deep-green, #006527);
  animation: grw-spin 0.65s linear infinite;
  flex: 0 0 auto;
}
.ibp-pay-spinner[hidden] { display: none; }
.ibp-pay-status-text { font-size: 13px; font-weight: 600; color: var(--color-text); }

.ibp-pay-win-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.ibp-pay-win-chip--open   { background: rgba(22,128,60,0.1);  color: var(--color-success, #16803c); }
.ibp-pay-win-chip--closed { background: rgba(180,35,24,0.08); color: var(--color-error,   #b42318); }
.ibp-pay-win-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ibp-pay-session-hint {
  font-size: 11px; color: var(--color-text-muted); line-height: 1.4;
  margin-top: 6px; text-align: right;
  white-space: normal; /* override inherited nowrap from the actions td */
  overflow-wrap: anywhere;
  max-width: 180px; margin-left: auto;
}

/* ── Payment modal sizing & content fixes ────────────────────────── */
.ibp-pay-modal { max-width: 480px; }
/* Prevent long mono reference string from overflowing the kv-grid cell */
.ibp-pay-modal .ibp-kv-grid dd { overflow-wrap: anywhere; min-width: 0; }

/* ── Checkbox label ──────────────────────────────────────────────── */
.ibp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}
.ibp-checkbox-label .ibp-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--color-primary, #006527);
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════
   DATA TABLE SYSTEM  v2
   Reusable component layer. Base: grw-table / grw-table-wrap
   from greenwich.css. Apply modifier classes and data attributes
   to activate features — no page-specific overrides needed.
   ══════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────────
   §1  Global table enhancements
   Automatically applied to every grw-table in the admin area.
   ────────────────────────────────────────────────────────────── */

/* Crisper, more scannable header row */
.grw-table th {
  background: var(--color-surface-alt, #f7f8f6);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary, #5f6b68);
  white-space: nowrap;
  user-select: none;
  border-bottom-width: 2px;
}

/* Slightly stronger hover for row tracking */
.grw-table tbody tr { transition: background 80ms; }
.grw-table tbody tr:hover { background: rgba(0, 101, 39, 0.04); }

/* ── Table variants ── */
/* Denser padding for data-heavy tables */
.grw-table.ibp-table--compact th,
.grw-table.ibp-table--compact td { padding-top: 7px; padding-bottom: 7px; }

/* Alternating row stripes */
.grw-table.ibp-table--striped tbody tr:nth-child(even) {
  background: var(--color-surface-alt, #f9fafb);
}
.grw-table.ibp-table--striped tbody tr:nth-child(even):hover {
  background: rgba(0, 101, 39, 0.04);
}

/* ────────────────────────────────────────────────────────────────
   §2  Column helpers
   ────────────────────────────────────────────────────────────── */

/* Shrink column to minimum needed width */
.grw-table th.ibp-col-shrink,
.grw-table td.ibp-col-shrink { width: 1%; white-space: nowrap; }

/* Date columns never line-break */
.grw-table td.ibp-col-date,
.grw-table th.ibp-col-date { white-space: nowrap; }

/* Responsive column hiding */
@media (max-width: 680px)  { .grw-table .ibp-col-hide-mobile { display: none !important; } }
@media (max-width: 900px)  { .grw-table .ibp-col-hide-tablet { display: none !important; } }

/* ────────────────────────────────────────────────────────────────
   §3  Cell content patterns
   ────────────────────────────────────────────────────────────── */

/* Two-line cells: bold primary + muted secondary */
.ibp-cell-primary   { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--color-text); }
.ibp-cell-secondary { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; line-height: 1.3; }

/* User cell: avatar + name/email */
.ibp-user-cell        { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ibp-user-cell__info  { min-width: 0; flex: 1; }
.ibp-user-cell__name  { display: block; font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibp-user-cell__sub,
.ibp-user-cell__email { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ────────────────────────────────────────────────────────────────
   §4  Row actions
   ────────────────────────────────────────────────────────────── */

/* Shared action-button group for table row/footer cells — always centered
   in its cell so the header's ibp-text-center and this container agree. */
.ibp-row-actions { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.ibp-row-actions form { margin: 0; }

/* ────────────────────────────────────────────────────────────────
   §5  Table Toolbar  (unified filter / search bar)

   Usage — inside grw-card__header or above the table card:
     <div class="ibp-table-toolbar">
       <div class="ibp-table-toolbar__field ibp-table-toolbar__field--search">
         <label class="ibp-table-toolbar__label">Search</label>
         <input class="grw-input" …>
       </div>
       <div class="ibp-table-toolbar__field ibp-table-toolbar__field--select">
         <label class="ibp-table-toolbar__label">Status</label>
         <select class="grw-select" …>
       </div>
       <div class="ibp-table-toolbar__actions">
         <button class="grw-btn grw-btn--primary grw-btn--sm">Filter</button>
         <a class="grw-btn grw-btn--ghost grw-btn--sm">Clear</a>
       </div>
     </div>
   ────────────────────────────────────────────────────────────── */

.ibp-table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 20px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-subtle);
}

.ibp-table-toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
  max-width: 240px;
}
.ibp-table-toolbar__field--search { min-width: 200px; max-width: 320px; }
.ibp-table-toolbar__field--date   { min-width: 120px; max-width: 155px; }
.ibp-table-toolbar__field--select { min-width: 140px; max-width: 200px; }
.ibp-table-toolbar__field--grow   { flex: 2; max-width: none; }

.ibp-table-toolbar__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.ibp-table-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Also lift the labels in the existing ibp-filter-form */
.ibp-filter-form .grw-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* ────────────────────────────────────────────────────────────────
   §6  Pagination  (enhances existing ibp-pagination classes)
   ────────────────────────────────────────────────────────────── */

.grw-card__footer.ibp-pagination { padding: 12px 20px; }
.ibp-page-info  { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.ibp-page-btns  { gap: 4px; }

/* ────────────────────────────────────────────────────────────────
   §7  Empty states — two patterns supported
   Pattern A (preferred): <section class="ibp-empty-state">
                            <svg class="ibp-empty-icon" …>
   Pattern B (legacy):    <div class="ibp-empty-state">
                            <div class="ibp-empty-icon"><svg …>
   ────────────────────────────────────────────────────────────── */

.ibp-empty-state { padding: 52px 24px; }
.ibp-empty-state--sm { padding: 32px 16px; }

/* Explicit resets below are required — svg.ibp-empty-icon is more specific than the base
   .ibp-empty-icon rule (line ~872, meant for the div-wrapped Pattern B badge) only for the
   properties it redeclares, so width/height/border-radius/background would otherwise leak
   through and give Pattern A's "bare icon" an unwanted circular badge behind it. */
svg.ibp-empty-icon   { display: block; width: 56px; height: 56px; border-radius: 0; background: none; margin: 0 auto 18px; color: var(--color-text-muted); }
div.ibp-empty-icon   { margin-bottom: 18px; }
h3.ibp-empty-title,
p.ibp-empty-title    { font-size: 15px; font-weight: 600; color: var(--color-text); margin: 0 0 6px; }
.ibp-empty-sub       { font-size: 13px; color: var(--color-text-muted); margin: 0; max-width: 360px; }

/* ────────────────────────────────────────────────────────────────
   §8  Mobile Card System

   HOW TO USE
   ══════════
   1. Add "ibp-table-card" to the grw-table-wrap div.
   2. Add data-label="Column Name" to every <td> in the table.
   3. Mark the name/title cell:  data-card-role="header"
      Mark the actions cell:     data-card-role="footer"

   Result at ≤ 680px: each <tr> becomes a bordered card.
   Above 680px: normal table with horizontal scroll.

   EXAMPLE
   ═══════
   <div class="grw-table-wrap ibp-table-card">
     <table class="grw-table">
       <tbody>
         <tr>
           <td data-label="Name" data-card-role="header">Offer X</td>
           <td data-label="Status">Active</td>
           <td data-label="Date">01 Jan 2026</td>
           <td data-card-role="footer">
             <div class="ibp-row-actions"><a …>View</a></div>
           </td>
         </tr>
       </tbody>
     </table>
   </div>
   ────────────────────────────────────────────────────────────── */

@media (max-width: 680px) {

  /* Strip the scroll-wrapper chrome — individual cards supply their own */
  .ibp-table-card {
    overflow: hidden;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
  }

  /* Table and tbody become block containers */
  .ibp-table-card .grw-table {
    display: block;
    min-width: 0;
    table-layout: auto;
    width: 100%;
    max-width: 100%;
  }
  .ibp-table-card .grw-table thead { display: none; }
  .ibp-table-card .grw-table tbody { display: block; width: 100%; }

  /* Each row = one card */
  .ibp-table-card .grw-table tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: var(--color-surface);
    border: 1px solid var(--color-border-subtle);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  }
  .ibp-table-card .grw-table tr:last-child { margin-bottom: 0; }
  .ibp-table-card .grw-table tbody tr:hover { background: var(--color-surface); }

  /* Every cell: label on the left, value on the right */
  .ibp-table-card .grw-table td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 9px 14px;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    border-top: none;
    border-bottom: 1px solid var(--color-border-subtle);
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
    font-size: 13px;
    text-align: right;
  }
  .ibp-table-card .grw-table td:last-child { border-bottom: none; }

  /* Label injected from the data-label attribute */
  .ibp-table-card .grw-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: left;
    padding-top: 1px;
  }

  /* Header row: hero, full-width, left-aligned, tinted */
  .ibp-table-card .grw-table td[data-card-role="header"] {
    justify-content: flex-start;
    text-align: left;
    background: var(--color-surface-alt, rgba(0,0,0,0.025));
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--color-border-subtle);
  }
  .ibp-table-card .grw-table td[data-card-role="header"]::before { display: none; }

  /* Footer row: action buttons, left-aligned, tinted */
  .ibp-table-card .grw-table td[data-card-role="footer"] {
    justify-content: flex-start;
    text-align: left;
    background: var(--color-surface-alt, rgba(0,0,0,0.025));
    border-bottom: none;
    border-top: 1px solid var(--color-border-subtle);
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .ibp-table-card .grw-table td[data-card-role="footer"]::before { display: none; }
  /* Buttons of very different lengths (e.g. "View" next to "Generate New
     Payment Link") shouldn't be squeezed to equal widths on one fixed row —
     let a long one fall to its own line instead. */
  .ibp-table-card .grw-table td[data-card-role="footer"] .ibp-row-actions { flex-wrap: wrap; }
  .ibp-table-card .grw-table td[data-card-role="footer"] .ibp-pay-session-hint {
    flex-basis: 100%;
    max-width: none;
    margin: 8px 0 0;
    text-align: left;
  }

  /* .grw-btn--ghost is borderless by design everywhere else — it reads fine
     inside a normal desktop table cell, or next to a bolder primary button.
     But stretched across a full-width card footer here (its normal way of
     filling the row via .ibp-row-actions's flex-grow), a lone ghost button
     has no visible edge at all — it looks like ambient text, not something
     tappable, and there is no hover state on touch to reveal it. Give it a
     real boundary in this context only, without touching the ghost style
     used everywhere else. */
  .ibp-table-card .grw-table td[data-card-role="footer"] .grw-btn--ghost:not(.grw-btn--danger) {
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
  }
  .ibp-table-card .grw-table td[data-card-role="footer"] .grw-btn--ghost:not(.grw-btn--danger):active {
    background: var(--n3);
  }

  /* Prevent inner elements from forcing cards wider */
  .ibp-table-card .grw-table td .grw-badge  { white-space: normal; max-width: 100%; }
  .ibp-table-card .grw-table td .ibp-code   { white-space: normal; word-break: break-all; max-width: 100%; }
  .ibp-table-card .grw-table td .ibp-user-cell { justify-content: flex-start; min-width: 0; }
  .ibp-table-card .grw-table td .ibp-user-cell__name,
  .ibp-table-card .grw-table td .ibp-user-cell__email,
  .ibp-table-card .grw-table td .ibp-user-cell__sub {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  /* Unwrap any ellipsis-clipped cell content inside cards */
  .ibp-table-card .grw-table td .ibp-cell-primary,
  .ibp-table-card .grw-table td .ibp-cell-secondary {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
  }

  /* Additional KYC has a denser, multi-line request summary. Give that cell
     the full card width and keep the primary review action comfortably sized. */
  .ibp-additional-kyc-table .grw-table td[data-label="Requests"] {
    display: block;
    text-align: left;
  }
  .ibp-additional-kyc-table .grw-table td[data-label="Requests"]::before {
    display: block;
    margin-bottom: 8px;
  }
  .ibp-additional-kyc-table .grw-table td[data-label="Requests"] > * {
    width: 100%;
  }
  .ibp-additional-kyc-table .grw-table td[data-card-role="footer"] .grw-btn {
    width: 100%;
    white-space: nowrap;
  }
}

/* ────────────────────────────────────────────────────────────────
   §9  Responsive breakpoints for toolbar & pagination
   ────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .ibp-table-toolbar { padding: 12px 16px; gap: 10px; }
  .ibp-table-toolbar__field { min-width: 120px; }
}

@media (max-width: 680px) {
  /* Toolbar fields wrap to 2-per-row on mobile */
  .ibp-table-toolbar { padding: 12px; gap: 8px; }
  .ibp-table-toolbar__field,
  .ibp-table-toolbar__field--search,
  .ibp-table-toolbar__field--date,
  .ibp-table-toolbar__field--select { min-width: 0; max-width: 100%; flex: 1 1 calc(50% - 4px); }
  .ibp-table-toolbar__field--grow   { flex: 1 1 100%; }
  .ibp-table-toolbar__actions       { width: 100%; justify-content: flex-end; }

  /* Compact pagination on small screens */
  .grw-card__footer.ibp-pagination { padding: 10px 12px; }
  .ibp-page-info { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════
   FUNCTIONAL ANIMATION OVERRIDES  — must be last in this file
   ───────────────────────────────────────────────────────────────────
   greenwich.css applies a blanket @media (prefers-reduced-motion)
   rule that sets animation-duration: 0.01ms !important and
   animation-iteration-count: 1 !important on every element.
   That silently kills all spinners and loaders.

   Spinners and loaders are essential UI feedback — not decorative.
   These overrides restore them. Placed last so they win the cascade.
════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  /* ── Core spinners ──────────────────────────────────────────── */
  .grw-spinner,
  .grw-btn.is-loading::after,
  .ibp-btn--loading::after,
  .ibp-page-loader__spinner,
  .ibp-pay-spinner {
    animation-name: grw-spin !important;
    animation-duration: 0.8s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-delay: 0s !important;
  }

  /* ── Skeleton shimmer ───────────────────────────────────────── */
  .grw-skeleton {
    animation-name: grw-shimmer !important;
    animation-duration: 2.5s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
    animation-delay: 0s !important;
  }

  /* ── Auth brand panel animations (ibp.css-defined) ─────────── */
  .ibp-auth-orb--1,
  .ibp-auth-orb--2 {
    animation-duration: 30s !important;
    animation-iteration-count: infinite !important;
  }

  /* ── UI transitions — restore at comfortable speed ─────────── */
  /* greenwich.css also kills transition-duration. Restore for     */
  /* interactive elements where visual feedback matters.           */
  .grw-btn,
  .grw-nav-item,
  .grw-sidebar,
  .grw-topbar,
  .grw-modal,
  .grw-dropdown__menu,
  [data-menu-toggle] {
    transition-duration: 0.2s !important;
  }
}

/* ── FAQ accordion (investor portal + landing page) ────────
   Native <details>/<summary> — no JS needed. ──────────────── */
.ibp-faq-list { display: flex; flex-direction: column; }
.ibp-faq-item { border-bottom: 1px solid var(--color-border-subtle); }
.ibp-faq-item:last-child { border-bottom: none; }
.ibp-faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.ibp-faq-item__question::-webkit-details-marker { display: none; }
.ibp-faq-item__question::after {
  content: '';
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-right: 1.5px solid var(--color-text-muted);
  border-bottom: 1.5px solid var(--color-text-muted);
  transform: rotate(45deg);
  transition: transform 150ms ease;
}
.ibp-faq-item[open] > .ibp-faq-item__question::after { transform: rotate(-135deg); }
.ibp-faq-item__answer {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.ibp-faq-item__answer p { margin: 0; }

/* ============================================================
   DARK MODE — readability fixes for ibp.css components
   Several status/accent components below hardcode a semantic
   colour (--grw-deep-green, --color-info, etc.) as TEXT on a
   surface that becomes dark under [data-theme="dark"], instead
   of a lighter, dark-surface-tuned variant like .grw-badge
   already uses. This block brings them in line with that
   existing badge/alert convention (lighter, more saturated text
   over a slightly stronger-opacity tint).
   ============================================================ */
[data-theme="dark"] {
  /* Offer cards */
  .offer-card__meta-value--rate,
  .offer-card__days-left,
  .grw-kpi__link {
    color: #4ADE80;
  }
  .offer-card__logo-fallback--cp     { background: rgba(22,163,74,0.18);  color: #4ADE80; }
  .offer-card__logo-fallback--bond   { background: rgba(183,121,31,0.2); color: #FBB045; }
  .offer-card__logo-fallback--public { background: rgba(23,92,211,0.2);  color: #60A5FA; }
  .offer-card__logo-fallback--rights { background: rgba(147,51,234,0.22); color: #C4B5FD; }
  .offer-card__payment-badge--online { background: rgba(23,92,211,0.2);  color: #60A5FA; }
  .offer-card__payment-badge--bank   { background: var(--color-surface-alt); color: var(--color-text-secondary); }
  .offer-card__days-left--warn       { color: #FBB045; }

  /* Confirm modal accent title */
  .ibp-confirm-modal--primary .grw-modal__title { color: #4ADE80; }

  /* Wizard step indicator */
  .ibp-wizard-step.is-active .ibp-wizard-step__label,
  .ibp-wizard-step.is-complete .ibp-wizard-step__label {
    color: #4ADE80;
  }

  /* Review banner (offer wizard summary step) */
  .ibp-review-banner {
    background: rgba(132, 202, 35, 0.14);
    color: #C8F59D;
  }
  .ibp-review-banner svg { color: #4ADE80; }

  /* Admin inbox conversation avatar */
  .ibp-admin-conv-avatar { background: rgba(22,163,74,0.22); color: #4ADE80; }

  /* Dismissible status strips */
  .ibp-status-strip--info    { color: #93C5FD; }
  .ibp-status-strip--warning { color: #FBB045; }
  .ibp-status-strip--info .ibp-status-strip__link    { color: #60A5FA; }
  .ibp-status-strip--warning .ibp-status-strip__link { color: #FBB045; }

  /* Inline badges */
  .ibp-badge--secret { background: rgba(220,38,38,0.18);  color: #F87171; }
  .ibp-badge--auto   { background: rgba(16,124,65,0.2);   color: #4ADE80; }

  /* Dashboard KPI stat icons */
  .ibp-stat-icon--green   { background: rgba(0,101,39,0.22);   color: #4ADE80; }
  .ibp-stat-icon--warning { background: rgba(183,121,31,0.22); color: #FBB045; }
  .ibp-stat-icon--info    { background: rgba(23,92,211,0.22);  color: #60A5FA; }
  .ibp-stat-icon--pending { background: rgba(122,90,248,0.22); color: #A78BFA; }

  /* Form-level status banners */
  .ibp-status-banner--info    { border-left-color: #60A5FA; }
  .ibp-status-banner--warning { border-left-color: #FBB045; }
  .ibp-status-banner--error   { border-left-color: #F87171; }
  .ibp-status-banner--success { border-left-color: #4ADE80; }
  .ibp-status-banner--info    .ibp-status-banner__icon { background: rgba(23,92,211,0.22);  color: #60A5FA; }
  .ibp-status-banner--warning .ibp-status-banner__icon { background: rgba(183,121,31,0.22); color: #FBB045; }
  .ibp-status-banner--error   .ibp-status-banner__icon { background: rgba(180,35,24,0.22);  color: #F87171; }
  .ibp-status-banner--success .ibp-status-banner__icon { background: rgba(22,128,60,0.22);  color: #4ADE80; }

  /* Registration pending gate */
  .ibp-pending-gate__icon { background: rgba(23,92,211,0.18); color: #60A5FA; }

  /* Subscription payment window chips */
  .ibp-pay-win-chip--open   { color: #4ADE80; }
  .ibp-pay-win-chip--closed { color: #F87171; }

  /* Custom select — selected option */
  .ibp-cselect__option--selected {
    background: rgba(0, 101, 39, 0.22);
    color: #4ADE80;
  }

  /* Template builder section-type chips (color-mix'd against literal white) */
  .ibp-tplb-badge--paragraph { background: rgba(59,130,246,0.18);  color: #93C5FD; }
  .ibp-tplb-badge--table     { background: rgba(139,92,246,0.18); color: #C4B5FD; }
  .ibp-tplb-badge--signature { background: rgba(180,83,9,0.2);    color: #FBB045; }
  .ibp-tplb-badge--image     { background: rgba(0,101,39,0.2);    color: #4ADE80; }

  .ibp-field-review__row { border-top-color: var(--color-border-subtle); }
  .ibp-field-review__row--rejected { background: rgba(239,68,68,0.06); }
  .ibp-field-review__decision--approved { color: #4ADE80; }
  .ibp-field-review__decision--rejected { color: #F87171; }
}

/* ── Per-field profile update review (PendingProfileUpdates.cshtml) ─── */
.ibp-field-review__row {
  padding: 14px 0;
  border-top: 1px solid var(--color-border-subtle);
}
.ibp-field-review__row:first-child { border-top: none; padding-top: 0; }
.ibp-field-review__row--rejected { background: rgba(239,68,68,0.04); margin: 0 -4px; padding-left: 4px; padding-right: 4px; border-radius: 6px; }
.ibp-field-review__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ibp-field-review__label { font-weight: 600; font-size: 13px; }
.ibp-field-review__diff {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.ibp-field-review__diff .ibp-field-review__arrow { color: var(--color-text-muted); }
.ibp-field-review__reason { margin-top: 10px; }
.ibp-field-review__decision { font-size: 13px; margin-top: 4px; }
.ibp-field-review__decision--approved { color: #16A34A; font-weight: 500; }
.ibp-field-review__decision--rejected { color: #DC2626; font-weight: 500; }

@media (max-width: 640px) {
  .ibp-field-review__diff { grid-template-columns: 1fr; }
  .ibp-field-review__diff .ibp-field-review__arrow { display: none; }

  /* Keep investor KYC rows on their grid. Earlier generic document rules
     target flex rows and otherwise add width/padding that can cover text. */
  .ibp-doc-list--investor .ibp-doc-info {
    width: auto;
    min-width: 0;
  }
  .ibp-doc-list--investor .ibp-doc-actions {
    grid-column: 2;
    width: 100%;
    padding: 8px 0 0;
  }
  .ibp-doc-list--investor .ibp-doc-actions .grw-btn {
    width: auto;
    flex: 0 0 auto;
    margin-left: auto;
  }
}
/* Calm post-login MFA onboarding, sized for clear reading and large targets.
   Uses plain rgba()/hex rather than color-mix() — color-mix() rendered as a
   no-op in some environments here, silently dropping the highlighted card's
   entire border+background and leaving it visually identical to a plain <p>. */
.ibp-mfa-onboarding { max-width: 720px; margin: 0 auto; padding: 8px 0 40px; }
.ibp-mfa-onboarding__header { max-width: 620px; margin-bottom: 28px; }
.ibp-mfa-onboarding__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(0, 101, 39, 0.1);
  color: var(--grw-deep-green, #006527);
}
.ibp-mfa-onboarding__badge svg { width: 24px; height: 24px; }
.ibp-mfa-onboarding__header p { max-width: 62ch; margin: 10px 0 0; color: var(--color-text-muted); line-height: 1.6; }
.ibp-mfa-onboarding__eyebrow { display: block; margin-bottom: 8px; color: var(--grw-color-primary); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.ibp-mfa-choice {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  background: var(--grw-surface);
}
.ibp-mfa-choice--recommended {
  border-color: rgba(0, 101, 39, 0.3);
  background: rgba(0, 101, 39, 0.045);
}
.ibp-mfa-choice__icon-row { display: flex; align-items: flex-start; gap: 14px; }
.ibp-mfa-choice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: var(--r-md, 8px);
  background: rgba(0, 101, 39, 0.1);
  color: var(--grw-deep-green, #006527);
}
.ibp-mfa-choice:not(.ibp-mfa-choice--recommended) .ibp-mfa-choice__icon {
  background: var(--grw-surface-muted, #f3f4f6);
  color: var(--color-text-muted);
}
.ibp-mfa-choice__icon svg { width: 20px; height: 20px; }
.ibp-mfa-choice__content { min-width: 0; flex: 1 1 auto; }
.ibp-mfa-choice h2 { margin: 0; font-size: 1.125rem; }
.ibp-mfa-choice p { max-width: 58ch; margin: 8px 0 0; color: var(--color-text-muted); line-height: 1.55; }
.ibp-mfa-choice__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ibp-mfa-steps { margin: 12px 0 0; padding-left: 22px; color: var(--color-text-muted); font-size: .875rem; line-height: 1.7; }
.ibp-mfa-choice > .grw-btn { align-self: flex-start; min-width: 200px; }

.ibp-mfa-onboarding__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}
.ibp-mfa-onboarding__footer form { margin: 0; }
.ibp-mfa-dismiss { max-width: 330px; color: var(--color-text-muted); font-size: .8125rem; }
.ibp-mfa-dismiss summary { cursor: pointer; padding: 9px 0; color: var(--color-text-muted); }
.ibp-mfa-dismiss p { margin: 8px 0; line-height: 1.5; }
@media (max-width: 640px) {
  .ibp-mfa-onboarding { padding-top: 4px; }
  .ibp-mfa-choice { padding: 18px; }
  .ibp-mfa-choice > .grw-btn { width: 100%; min-height: 44px; }
  .ibp-mfa-onboarding__footer { align-items: stretch; flex-direction: column; }
}

/* Notifications bell dropdown (admin topbar) */
.ibp-notif-dropdown { width: 360px; min-width: 0; padding: 0; }
.ibp-notif-dropdown__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-subtle);
}
.ibp-notif-dropdown__mark-all {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}
.ibp-notif-dropdown__mark-all:hover { text-decoration: underline; }
.ibp-notif-dropdown__list { max-height: 360px; overflow-y: auto; }
.ibp-notif-dropdown__empty {
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  font-size: 13px;
  color: var(--color-text-muted);
}
.ibp-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--color-border-subtle);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.ibp-notif-item:last-child { border-bottom: none; }
.ibp-notif-item:hover { background: var(--color-surface-alt); }
.ibp-notif-item__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: var(--r-full);
  background: var(--color-primary);
}
.ibp-notif-item.is-read .ibp-notif-item__dot { background: transparent; }
.ibp-notif-item__body { min-width: 0; }
.ibp-notif-item__title { font-size: 13px; font-weight: 600; color: var(--color-text); }
.ibp-notif-item.is-read .ibp-notif-item__title { font-weight: 500; color: var(--color-text-muted); }
.ibp-notif-item__message { margin-top: 2px; font-size: 12.5px; color: var(--color-text-muted); line-height: 1.4; }
.ibp-notif-item__time { margin-top: 4px; font-size: 11px; color: var(--color-text-muted); }
.ibp-notif-item--error .ibp-notif-item__dot { background: var(--color-error); }
.ibp-notif-item--warning .ibp-notif-item__dot { background: var(--color-warning); }
.ibp-notif-item--success .ibp-notif-item__dot { background: var(--color-success); }


/* NGX dispatch: retain legible columns and allow result messages to wrap. */
.ibp-table-scroll table.ibp-ngx-report { min-width: 1320px; table-layout: fixed; }
table.grw-table.ibp-ngx-report td { white-space: normal; overflow-wrap: normal; word-break: normal; }
table.grw-table.ibp-ngx-report td:first-child,
table.grw-table.ibp-ngx-report td:nth-child(2),
table.grw-table.ibp-ngx-report td:last-child { overflow-wrap: anywhere; }
table.grw-table.ibp-ngx-report td:first-child > a { display: block; max-width: 100%; white-space: normal; }
.ibp-ngx-col-investor { width: 16%; }
.ibp-ngx-col-offer { width: 14%; }
.ibp-ngx-col-date { width: 10%; }
.ibp-ngx-col-status { width: 12%; }
.ibp-ngx-col-payment { width: 11%; }
.ibp-ngx-col-attempts { width: 6%; }
.ibp-ngx-col-result { width: 21%; }
.ibp-ngx-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 16px 0 24px; }
.ibp-ngx-metrics .grw-form-group { margin: 0; }
.ibp-ngx-metrics dd { margin: 6px 0 0; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .ibp-ngx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

/* Offer-level subscription operations: one status, one next step. */
.ibp-ops-results { color: var(--color-text-secondary); margin: 20px 0 12px; font-size: 13px; }
.ibp-ops-offer-header { gap: 20px; align-items: flex-start; }
.ibp-ops-offer-heading { min-width: 0; flex: 1; }
.ibp-ops-offer-heading h2 { margin: 0; overflow-wrap: anywhere; }
.ibp-ops-offer-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 0; }
.ibp-ops-offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
table.grw-table.ibp-ops-table { min-width: 1080px; table-layout: fixed; }
table.grw-table.ibp-ops-table--ngx { min-width: 1280px; }
.ibp-ops-col-investor { width: 250px; }
.ibp-ops-col-value { width: 150px; }
.ibp-ops-col-detail { width: 96px; }
.ibp-ops-col-progress { width: 260px; }
.ibp-ops-col-ngx { width: 145px; }
.ibp-ops-col-date { width: 118px; }
.ibp-ops-col-action { width: 110px; }
table.grw-table.ibp-ops-table td:first-child { overflow-wrap: anywhere; }
table.grw-table.ibp-ops-table td:first-child .ibp-font-mono { white-space: normal; overflow-wrap: anywhere; }
.ibp-ops-next-step { margin-top: 8px; line-height: 1.5; }
.ibp-ops-progress .grw-badge { white-space: normal; }
@media (max-width: 680px) {
  .ibp-ops-offer-header { flex-direction: column; gap: 12px; }
  .ibp-ops-offer-actions { width: 100%; }
  table.grw-table.ibp-ops-table, table.grw-table.ibp-ops-table--ngx { min-width: 0; table-layout: auto; }
  .ibp-ops-table colgroup { display: none; }
  table.grw-table.ibp-ops-table td:first-child { min-width: 0; }
  .ibp-ops-results span { display: block; margin-top: 4px; }
  .ibp-ops-progress { flex-wrap: wrap; }
  .ibp-ops-progress .ibp-ops-next-step { width: 100%; }
}

.ibp-ngx-offer-mode { margin: 10px 0 0; max-width: 70ch; color: var(--color-text-secondary); font-size: 13px; line-height: 1.6; }
table.grw-table.ibp-ngx-report--offer { min-width: 1100px; }
.ibp-ngx-report--offer col.ibp-ngx-col-investor { width: 260px; }
/* The result column shifts left when the scoped offer column is removed. */
.ibp-ngx-report--offer td:nth-child(7) { overflow-wrap: anywhere; word-break: normal; }

/* Fit operational filters to the content width, including beside the admin sidebar. */
.ibp-ops-filter { container: subscription-filters / inline-size; }
.ibp-ops-filter .ibp-sub-filter__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ibp-ops-filter .ibp-sub-filter__field { grid-column: auto; }
.ibp-ops-filter .ibp-sub-filter__field--search, .ibp-ops-filter .ibp-sub-filter__actions { grid-column: 1 / -1; }
.ibp-ops-filter .grw-card__subtitle, .ibp-ops-offer-meta, .ibp-ops-next-step { color: var(--color-text-secondary); }
.ibp-ngx-page .grw-helper, .ibp-ngx-page .ibp-cell-secondary, .ibp-ngx-page .grw-page-header__subtitle { color: var(--color-text-secondary); }
@container subscription-filters (min-width: 900px) {
  .ibp-ops-filter .ibp-sub-filter__form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ibp-ops-filter .ibp-sub-filter__field { grid-column: span 1; }
  .ibp-ops-filter .ibp-sub-filter__field--search,
  .ibp-ops-filter .ibp-sub-filter__field--offer,
  .ibp-ops-filter .ibp-sub-filter__field--attention,
  .ibp-ops-filter .ibp-sub-filter__field--stage,
  .ibp-ops-filter .ibp-sub-filter__actions { grid-column: span 2; }
}
@media (max-width: 680px) {
  .ibp-ops-filter .ibp-sub-filter__form { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 680px) {
  .ibp-table-card table.grw-table.ibp-ops-table td[data-card-role="header"] { display: block; text-align: left; }
  .ibp-ops-table td[data-card-role="header"] .ibp-cell-secondary { margin-top: 4px; }
  .ibp-ops-progress .ibp-ops-next-step { text-align: left; }
}

.ibp-ops-table .ibp-cell-secondary { color: var(--color-text-secondary); }

/* Readable report filters and subscription tables. */
.ibp-friendly-reports { container-type: inline-size; container-name: subscription-filters; }
.ibp-report-table td { overflow-wrap: anywhere; }
.ibp-report-table .ibp-ops-progress { text-align: left; min-width: 190px; }
.ibp-report-table .ibp-cell-secondary { color: var(--color-text-secondary); white-space: normal; }
@media (max-width: 680px) {
 .ibp-report-table td[data-card-role="header"] { display: block; }
 .ibp-report-table .ibp-ops-progress { min-width: 0; }
}

/* Profile update comparisons and review controls. */
.ibp-profile-updates .grw-card__subtitle, .ibp-profile-review-help { color: var(--color-text-secondary); }
.ibp-profile-update-header { gap: 16px; align-items: flex-start; }
.ibp-profile-update-header > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ibp-profile-update-header h2 { display: inline; margin: 0; }
.ibp-profile-updates .ibp-field-review__diff { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 12px; }
.ibp-profile-updates .ibp-field-review__diff > div { min-width: 0; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ibp-profile-value-label { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); }
.ibp-profile-review-help { max-width: 75ch; margin: 0 0 16px; line-height: 1.6; }
.ibp-profile-updates .ibp-field-review__reason[hidden] { display: none; }
.ibp-profile-updates .ibp-field-review__reason .grw-label { display: block; margin-bottom: 8px; }
@media (max-width: 680px) {
 .ibp-profile-update-header, .ibp-profile-updates .ibp-field-review__header { flex-direction: column; align-items: flex-start; gap: 12px; }
 .ibp-profile-updates .ibp-field-review__diff { grid-template-columns: 1fr; gap: 14px; }
 .ibp-profile-updates .ibp-filter-form { flex-direction: column; align-items: stretch; }
}

.ibp-profile-updates .ibp-profile-update-header .grw-card__subtitle { display: block; margin-top: 8px; }
.ibp-profile-updates .ibp-row-actions { justify-content: flex-start; gap: 12px; }
.ibp-profile-updates .ibp-field-review__row { padding-block: 20px; }
.ibp-profile-updates .ibp-field-review__diff { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 960px; gap: 32px; }
.ibp-profile-review-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--color-border); }
.ibp-profile-review-summary { margin: 0 0 6px; font-weight: 600; }
.ibp-profile-review-footer .ibp-profile-review-help { margin-bottom: 0; }
.ibp-profile-review-footer .grw-btn { flex-shrink: 0; }
.ibp-profile-review-history { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: 13px; line-height: 1.6; }
@media (max-width: 680px) {
 .ibp-profile-updates .ibp-field-review__diff { grid-template-columns: 1fr; gap: 16px; }
 .ibp-profile-review-footer { flex-direction: column; align-items: stretch; gap: 16px; }
}

.ibp-profile-detail-list { margin-top: 16px; max-width: 960px; }
.ibp-profile-detail-row { padding: 12px 16px; border-top: 1px solid var(--color-border); }
.ibp-profile-detail-row--changed { background: var(--color-surface-alt); }
.ibp-profile-detail-heading { display: flex; gap: 12px; align-items: center; }
.ibp-profile-detail-state { font-size: 12px; color: var(--color-text-secondary); }
.ibp-profile-detail-row--changed .ibp-profile-detail-state { font-weight: 600; }
.ibp-profile-updates .ibp-profile-detail-row .ibp-field-review__diff { padding-bottom: 0; }

/* Profile review workspace: compact comparisons, clear section decisions. */
.ibp-profile-workspace { max-width: 1180px; margin-inline: auto; }
.ibp-profile-results, .ibp-profile-request-meta, .ibp-profile-group-help { color: var(--color-text-secondary); font-size: 13px; line-height: 1.5; }
.ibp-profile-results { margin: 0 0 16px; }
.ibp-profile-request-meta { display: block; margin-top: 4px; }
.ibp-profile-workspace .ibp-profile-update-header { padding: 24px; }
.ibp-profile-workspace .ibp-profile-update-header h2 { font-size: 18px; }
.ibp-profile-workspace .ibp-collapsible__body { padding: 0 24px 24px; }
.ibp-profile-investor-note { padding: 16px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.ibp-profile-investor-note p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--color-text-secondary); }
.ibp-profile-review-toolbar { display: flex; gap: 24px; justify-content: space-between; align-items: center; padding-block: 20px 8px; }
.ibp-profile-review-toolbar p { margin: 0; max-width: 52ch; font-size: 14px; line-height: 1.5; }
.ibp-profile-review-toolbar .ibp-row-actions { flex-shrink: 0; gap: 4px; }
.ibp-profile-group-help { margin: 0 0 20px; }
.ibp-profile-section-heading { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.ibp-profile-section-heading h3 { margin: 0; font-size: 15px; }
.ibp-profile-section-heading > span { font-size: 12px; color: var(--color-text-secondary); }
.ibp-profile-workspace .ibp-field-review__header { margin-bottom: 14px; }
.ibp-profile-reject-control { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 8px; cursor: pointer; font-size: 13px; }
.ibp-profile-reject-control:has(input:checked) {
  background: rgba(180, 35, 24, 0.08);
  border-color: var(--color-error);
  color: var(--color-error);
}
.ibp-profile-reject-control:has(input:checked) .ibp-checkbox { accent-color: var(--color-error); }
.ibp-field-review__row--rejected .ibp-profile-comparison__changed { background: rgba(180, 35, 24, 0.07); }
[data-theme="dark"] .ibp-profile-reject-control:has(input:checked) {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.68);
  color: #FCA5A5;
}
[data-theme="dark"] .ibp-profile-reject-control:has(input:checked) .ibp-checkbox { accent-color: #DC2626; }
[data-theme="dark"] .ibp-field-review__row--rejected .ibp-profile-comparison__changed { background: rgba(248, 113, 113, 0.13); }
.ibp-profile-comparison { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.ibp-profile-comparison__label { width: 24%; }
.ibp-profile-comparison th, .ibp-profile-comparison td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border-subtle); overflow-wrap: anywhere; white-space: pre-wrap; }
.ibp-profile-comparison thead th { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); background: var(--color-surface-alt); border-bottom-color: var(--color-border); }
.ibp-profile-comparison tbody th { font-weight: 500; }
.ibp-profile-comparison__changed { background: rgba(22, 128, 60, 0.08); }
[data-theme="dark"] .ibp-profile-comparison__changed {
  background: rgba(74, 222, 128, 0.10);
  color: var(--color-text);
}
.ibp-profile-requested { font-weight: 600; }
.ibp-profile-comparison__disclosure { display: flex; align-items: center; padding: 8px 12px 0; }
.ibp-profile-unchanged-panel { margin: 8px 12px 0; border-top: 1px solid var(--color-border-subtle); }
.ibp-profile-unchanged-list { margin: 0; }
.ibp-profile-unchanged-list__item { display: grid; grid-template-columns: minmax(140px, 24%) minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-border-subtle); }
.ibp-profile-unchanged-list__item:last-child { border-bottom: 0; }
.ibp-profile-unchanged-list dt { color: var(--color-text-secondary); font-size: 13px; font-weight: 500; }
.ibp-profile-unchanged-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.ibp-profile-workspace .ibp-profile-review-footer { background: var(--color-surface-alt); padding: 20px; border-radius: 10px; }
.ibp-profile-workspace .ibp-field-review__reason { margin-top: 16px; }
@media (max-width: 900px) {
 .ibp-profile-review-toolbar { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 680px) {
 .ibp-profile-workspace .ibp-profile-update-header { padding: 20px; }
 .ibp-profile-workspace .ibp-collapsible__body { padding-inline: 20px; }
 .ibp-profile-comparison, .ibp-profile-comparison tbody { display: block; }
 .ibp-profile-comparison colgroup, .ibp-profile-comparison thead { display: none; }
 .ibp-profile-comparison tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--color-border-subtle); padding: 12px 0; gap: 8px 16px; }
 .ibp-profile-comparison th, .ibp-profile-comparison td { display: block; padding: 0; border: 0; }
 .ibp-profile-comparison tbody th { grid-column: 1 / -1; font-weight: 600; }
 .ibp-profile-comparison td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--color-text-secondary); margin-bottom: 4px; }
 .ibp-profile-unchanged-list__item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
 .ibp-profile-workspace .ibp-profile-review-footer { padding: 16px; }
}

.ibp-profile-comparison th, .ibp-profile-comparison td { white-space: normal; }
.ibp-profile-comparison td > span { white-space: pre-wrap; }

/* Optional guidance; preserve validation and transaction alerts independently. */
.ibp-page-tip [hidden] { display: none !important; }
.ibp-page-tip__restore { margin-bottom: 12px; }
.ibp-page-tip .ibp-tip { border-left-width: 1px; margin-bottom: 20px; }
.ibp-page-tip .ibp-status-banner__body { color: var(--color-text-secondary); line-height: 1.6; }
.ibp-page-tip .ibp-tip__close { min-width: 36px; min-height: 36px; }
@media (max-width: 680px) { .ibp-page-tip .ibp-tip { padding-right: 52px; } }

/* Dashboard work takes priority; retain readable amounts on narrow screens. */
.ibp-dashboard-actions { list-style: none; padding: 0; margin: 0; }
.ibp-dashboard-action { display: flex; align-items: center; gap: 20px; padding: 16px 0; overflow-wrap: anywhere; }
.ibp-dashboard-action + .ibp-dashboard-action { border-top: 1px solid var(--color-border); }
.ibp-dashboard-action > div:first-child { flex: 1; min-width: 0; }
.ibp-dashboard-action__amount { display: grid; gap: 4px; text-align: right; font-variant-numeric: tabular-nums; }
.ibp-dashboard-kpis--compact .grw-kpi { padding: 20px; }
@media (max-width: 600px) {
  .ibp-dashboard-action { flex-direction: column; align-items: stretch; gap: 12px; }
  .ibp-dashboard-action__amount { text-align: left; }
  .ibp-dashboard-action .grw-btn { min-height: 44px; }
  .ibp-dashboard-kpis--compact .grw-kpi { text-align: left; padding: 16px 20px; }
}

.ibp-skip-link { position: fixed; top: 8px; left: 8px; z-index: 10000; padding: 12px 16px; background: var(--color-surface, #fff); color: var(--color-text, #20352b); border: 2px solid currentColor; border-radius: 6px; transform: translateY(-160%); }
.ibp-skip-link:focus { transform: translateY(0); }

/* Portal refinement: restrained surfaces, field recovery and task-focused mobile controls. */
.grw-main { background-image: none; }
.grw-table__amount, .ibp-text-right, .ibp-totp-key, .grw-kpi__value { font-variant-numeric: tabular-nums; }
.grw-main :is(input,select,textarea) { caret-color: var(--color-primary, #006527); }
::selection { background: #c7e9d2; color: #14221a; }
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline: 2px solid var(--button-focus, #006527); outline-offset: 3px; }
.grw-table-wrap:focus-visible { outline-offset: -3px; }
.validation-summary-errors a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
#ibp-confirm-msg { white-space: pre-line; overflow-wrap: anywhere; }
.ibp-draft-status { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.ibp-inline-form { display: inline; }
.ibp-profile-change-section > summary { cursor: pointer; font-weight: 600; list-style-position: inside; }
.ibp-profile-change-section:not([open]) { margin-bottom: 12px; }
.ibp-mobile-filter-toggle { display: none; }
.ibp-table-sort-note { margin: 8px 16px; }
.grw-modal { max-height: calc(100dvh - 32px); overflow-y: auto; }
.grw-table :is(td,th) { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .ibp-mobile-filter-toggle { display: inline-flex; margin: 12px 16px; min-height: 44px; }
  .grw-main :is(input,select,textarea) { font-size: 16px; }
  .grw-modal { max-height: calc(100dvh - 16px - env(safe-area-inset-bottom)); }
  .grw-modal__footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .grw-modal__footer .grw-btn, .ibp-row-actions .grw-btn, .grw-sidebar__close { min-height: 44px; }
  .ibp-table-card .grw-table td.grw-table__amount,
  .ibp-table-card .grw-table td[data-label="Amount payable"],
  .ibp-table-card .grw-table td[data-label="Amount"],
  .ibp-table-card .grw-table td[data-label="Payable"] { display: flex !important; white-space: normal; }
  .ibp-profile-change-section summary { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .grw-overlay,.grw-modal,.grw-sidebar,.grw-btn,.ibp-toast { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

#validation-policy-settings .ibp-bypass-control { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
#validation-policy-settings .ibp-bypass-control__info { width: 100%; min-width: 0; }
.ibp-policy-reason .grw-label { display: block; margin-bottom: 8px; }
.ibp-policy-reason textarea { display: block; width: 100%; min-height: 96px; resize: vertical; }
.ibp-proof-history { padding-left: 20px; overflow-wrap: anywhere; }

/* Personal operator controls use the existing form and disclosure vocabulary. */
.ibp-workspace-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border-subtle); }
.ibp-workspace-tools[hidden], .ibp-workspace-tools [hidden] { display: none; }
.ibp-workspace-panel { min-width: 0; flex: 1 1 320px; }
.ibp-workspace-panel > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.ibp-workspace-panel__body { padding-top: 12px; }
.ibp-workspace-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 12px 0; }
.ibp-workspace-row .grw-form-group { flex: 1 1 220px; margin: 0; }
.ibp-column-options { border: 0; padding: 0; margin: 16px 0; }
.ibp-column-options > div { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ibp-column-option { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.ibp-column-option input { accent-color: var(--color-primary); width: 16px; height: 16px; }
.ibp-workspace-status { flex: 1 0 100%; margin: 0; overflow-wrap: anywhere; }
.ibp-workspace-status:empty { display: none; }
.ibp-workspace-tools .grw-helper, .ibp-workspace-tools .grw-label, .ibp-review-navigation .grw-helper { color: var(--color-text-secondary); }
.ibp-workspace-tools .grw-btn--ghost { color: var(--color-text) !important; }
.ibp-workspace-status--error { color: var(--color-error) !important; }
[data-theme="dark"] .ibp-workspace-status--error { color: #fda29b !important; }
[data-theme="dark"] body[data-workspace-account] .grw-main { background-image: none; }
.ibp-review-navigation { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding: 16px 0; margin-bottom: 16px; border-bottom: 1px solid var(--color-border-subtle); }
.ibp-review-navigation__queue { color: var(--color-text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ibp-review-navigation .grw-helper { margin: 8px 0 0; }
.ibp-review-navigation__actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (min-width: 681px) {
  table[data-workspace-table] .ibp-user-hidden-column { display: none !important; }
  table[data-workspace-table].ibp-table-personal-columns { table-layout: auto; min-width: 0; }
  table[data-workspace-table].ibp-table-compact :is(th,td) { padding-top: 8px; padding-bottom: 8px; }
}
@media (max-width: 680px) {
  .ibp-workspace-panel { flex-basis: 100%; }
  .ibp-workspace-panel > summary, .ibp-column-option { min-height: 44px; }
  .ibp-workspace-row .grw-btn, .ibp-review-navigation .grw-btn { min-height: 44px; }
  .ibp-review-navigation__actions { width: 100%; }
  .ibp-review-navigation__actions > * { flex: 1; }
}
@media print {
  .ibp-workspace-tools, .ibp-review-navigation { display: none; }
  table[data-workspace-table] :is(th,td).ibp-user-hidden-column { display: table-cell !important; }
  table[data-workspace-table] col.ibp-user-hidden-column { display: table-column !important; }
}

/* Evidence stays adjacent to the existing funding review controls. */
.ibp-proof-preview { margin-block: 1rem; }
.ibp-proof-preview > p { margin-block: .75rem; }
.ibp-proof-preview iframe { width: 100%; height: min(65vh, 640px); min-height: 280px; border: 1px solid var(--ibp-border, #d1d5db); border-radius: 8px; background: #fff; }
.ibp-proof-preview img { display: block; max-width: 100%; max-height: 640px; height: auto; margin-inline: auto; }
.ibp-proof-preview img[hidden] { display: none; }
@media (max-width: 640px) { .ibp-proof-preview iframe { height: 55vh; min-height: 240px; } }

.ibp-proof-preview > .ibp-text-muted { color: #52635a; }

/* Compact report jobs: keep status/action visible and disclose saved scope. */
.ibp-report-export p { margin-block: .65rem; }
.ibp-report-export__meta, .ibp-report-export .ibp-kv-grid dt { color: #52635a; overflow-wrap: anywhere; }
[data-theme="dark"] .ibp-report-export__meta, [data-theme="dark"] .ibp-report-export .ibp-kv-grid dt { color: #b7c8be; }
.ibp-report-export .ibp-kv-grid dd { overflow-wrap: anywhere; min-width: 0; }

/* Reports: reserve the header for context, with full-width export tools below. */
.ibp-reports-header { align-items: flex-start; gap: 24px; }
.ibp-reports-header .grw-page-header__left { flex: 1 1 auto; min-width: 0; }
.ibp-reports-header .grw-page-header__right { flex: 0 0 auto; }
.ibp-reports-header .grw-page-header__subtitle { max-width: 65ch; }
.ibp-reports-export-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; margin-block: 8px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.ibp-reports-export-actions .ibp-export-form { margin: 0; flex: 0 1 auto; }
.ibp-reports-export-actions .grw-select { width: auto; min-width: 204px; }
.ibp-reports-export-help { flex: 1 0 100%; margin: 0; color: var(--color-text-secondary); line-height: 1.6; }
@media (max-width: 640px) {
  .ibp-reports-export-actions .ibp-export-form { width: 100%; }
  .ibp-reports-export-actions .grw-btn, .ibp-reports-export-actions .grw-select, .ibp-reports-export-actions .grw-input-wrap { width: 100%; }
}

/* Shared motion: feedback and context, with stable data and page surfaces. */
:root {
  --transition-fast: 180ms ease;
  --transition-base: 250ms cubic-bezier(0.32, 0.72, 0, 1);
  --transition-smooth: 300ms cubic-bezier(0.32, 0.72, 0, 1);
}
.offer-card:hover { transform: none; }
.grw-overlay { transition: opacity var(--transition-base); }
.grw-modal { transform: translateY(8px); transition: transform var(--transition-base); }
.grw-overlay.is-open .grw-modal { transform: none; }
.ibp-wizard-step.is-error .ibp-wizard-step__bubble::before, .ibp-notice-badge__dot { animation: none; }
.ibp-wizard-pane.has-error { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .grw-modal, .grw-overlay.is-open .grw-modal, .grw-btn:active { transform: none; }
  .od-tab-panel, .ibp-wizard-pane.has-error { animation: none; }
}

/* Subtle branded depth behind workspaces; data remains on stable surfaces. */
.grw-main, .grw-auth-form { background-image: radial-gradient(ellipse 85% 400px at 90% 0, rgba(0,101,39,0.055), transparent 70%); background-repeat: no-repeat; }
[data-theme="dark"] .grw-main, [data-theme="dark"] .grw-auth-form { background-image: radial-gradient(ellipse 85% 400px at 90% 0, rgba(132,202,35,0.045), transparent 70%); }
.ibp-auth-decor { display: block; }
.ibp-auth-orb { position: absolute; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(132,202,35,0.10), transparent 70%); }
.ibp-auth-orb--1 { top: -100px; right: -100px; }
.ibp-auth-orb--2 { bottom: 10%; left: -160px; opacity: 0.6; }
@keyframes ibp-auth-ambient { 0%,100% { transform: translate(0,0); } 50% { transform: translate(12px,-12px); } }
@media (prefers-reduced-motion: no-preference) {
 .ibp-auth-orb--1 { animation: ibp-auth-ambient 26s ease-in-out infinite; }
 .ibp-auth-orb--2 { animation: ibp-auth-ambient 32s ease-in-out infinite reverse; }
}
.is-motion-paused .ibp-auth-orb { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ibp-auth-orb { animation: none; } }

/* One measured rhythm for loading and spatial transitions. */
.grw-spinner, .grw-btn.is-loading::after, .ibp-btn--loading::after,
.ibp-page-loader__spinner, .ibp-pay-spinner { animation-duration: 1.2s; animation-timing-function: linear; }
.grw-skeleton { animation-duration: 2.4s; }
.grw-modal { transition: transform var(--transition-smooth); }
.grw-sidebar { transition: transform var(--transition-smooth); }
.ibp-session-toast { transition: opacity var(--transition-base), transform var(--transition-base); }
.od-tab-panel { animation-duration: 250ms; animation-timing-function: ease-out; }
@media (prefers-reduced-motion: reduce) {
 .grw-spinner, .grw-btn.is-loading::after, .ibp-btn--loading::after,
 .ibp-page-loader__spinner, .ibp-pay-spinner { animation-duration: 1.8s !important; }
 .grw-skeleton { animation: none !important; }
}

/* Button-like controls share focus, target sizing and deliberate disabled states. */
:where(.ibp-icon-btn, .grw-modal__close, .grw-topbar__action-btn, .grw-input-icon--btn, .grw-pagination__btn, .ibp-tplb-ctrl-btn, button.grw-input-icon, .ibp-repeater-remove, .ibp-repeater-card__toggle, .ibp-tip__close, .grw-topbar__toggle, .grw-sidebar__close, .ibp-tplb-toggle-btn, .ibp-notif-dropdown__mark-all, .od-tab-btn, .ql-toolbar button):focus-visible { outline: 2px solid var(--button-focus); outline-offset: 3px; }
:where(.ibp-icon-btn, .grw-modal__close, .grw-topbar__action-btn, .grw-input-icon--btn, .grw-pagination__btn, .ibp-tplb-ctrl-btn, button.grw-input-icon, .ibp-repeater-remove, .ibp-repeater-card__toggle, .ibp-tip__close, .grw-topbar__toggle, .grw-sidebar__close, .ibp-tplb-toggle-btn, .ibp-notif-dropdown__mark-all, .od-tab-btn, .ql-toolbar button):disabled { opacity: 1; color: var(--color-text-secondary); background: var(--color-surface-alt); cursor: not-allowed; transform: none; }
.grw-btn.is-loading:has(.grw-btn__busy)::after { content: none; }
.grw-btn.is-loading .grw-btn__busy { opacity: 1; }
@media (pointer: coarse), (max-width: 768px) {
 :where(.ibp-icon-btn, .grw-modal__close, .grw-topbar__action-btn, .grw-input-icon--btn, .grw-pagination__btn, .ibp-tplb-ctrl-btn, button.grw-input-icon, .ibp-repeater-remove, .ibp-repeater-card__toggle, .ibp-tip__close, .grw-topbar__toggle, .grw-sidebar__close, .ibp-tplb-toggle-btn, .ibp-notif-dropdown__mark-all, .od-tab-btn, .ql-toolbar button) { min-width: 44px; min-height: 44px; }
}
@media (max-width: 640px) {
 .grw-modal__footer { flex-wrap: wrap; gap: 8px; }
 .grw-modal__footer > .grw-btn { flex: 1 1 140px; }
 .ibp-wizard-nav { flex-wrap: wrap; }
 .ibp-wizard-nav > .grw-btn { flex: 0 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
 .grw-btn:hover, .grw-btn:active, .grw-btn:hover svg { transform: none !important; }
 .grw-btn__busy::before, .grw-btn.is-loading::after { animation: none !important; }
}

/* Shared state also serves sidebar and notification controls without changing their shape. */
.is-loading:has(> .grw-btn__busy) { display: inline-grid; grid-template-areas: "label"; }
.is-loading > .grw-btn__text { grid-area: label; visibility: hidden; }
.is-loading > .grw-btn__busy { grid-area: label; }
@media (prefers-reduced-motion: reduce) { .grw-btn__busy::before { animation: none !important; } }

/* FAQ management keeps reorder and row actions compact at every breakpoint. */
.ibp-faq-management__order { flex-wrap: nowrap; width: auto; }
.ibp-faq-management__actions { flex-wrap: nowrap; justify-content: flex-end; width: auto; }
.ibp-faq-management .ibp-row-actions .grw-btn { flex: 0 0 auto; white-space: nowrap; }
.ibp-faq-management__actions > .grw-btn--danger-quiet { margin-inline-start: var(--sp-2); }

/* Admin subscription tables: readable spacing and deliberate wrapping. */
.ibp-admin-subscription-grid .ibp-table-scroll { padding: 8px 12px 12px; }
.ibp-admin-subscription-grid table.grw-table { min-width: 600px; }
.ibp-admin-subscription-grid table.grw-table th,
.ibp-admin-subscription-grid table.grw-table td {
  padding: 14px 16px;
  vertical-align: top;
  line-height: 1.55;
  word-break: normal;
  overflow-wrap: normal;
}
.ibp-admin-subscription-grid table.grw-table th { white-space: normal; }
.ibp-admin-subscription-grid table.grw-table td.ibp-font-mono { overflow-wrap: anywhere; min-width: 160px; max-width: 280px; }
.ibp-admin-subscription-grid table.grw-table td.ibp-text-right { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ibp-admin-subscription-grid table.grw-table .grw-badge { white-space: normal; }
@media (min-width: 681px) {
  table.grw-table.ibp-ops-table { min-width: 1320px; }
  table.grw-table.ibp-ops-table--ngx { min-width: 1500px; }
  table.grw-table.ibp-ops-table th,
  table.grw-table.ibp-ops-table td { padding: 16px 20px; vertical-align: top; line-height: 1.55; }
  table.grw-table.ibp-ops-table th { white-space: normal; overflow-wrap: normal; word-break: normal; }
  .ibp-ops-table .ibp-ops-col-investor { width: 280px; }
  .ibp-ops-table .ibp-ops-col-value { width: 190px; }
  .ibp-ops-table .ibp-ops-col-detail { width: 120px; }
  .ibp-ops-table .ibp-ops-col-progress { width: 280px; }
  .ibp-ops-table .ibp-ops-col-ngx { width: 170px; }
  .ibp-ops-table .ibp-ops-col-date { width: 145px; }
  .ibp-ops-table .ibp-ops-col-action { width: 150px; }
  table.grw-table.ibp-ops-table td[data-label="Value"] .ibp-cell-primary { white-space: nowrap; }
  table.grw-table.ibp-ops-table td[data-label="Investor"] .ibp-cell-primary { overflow-wrap: normal; }
  table.grw-table.ibp-ops-table td[data-label="Investor"] .ibp-cell-secondary { overflow-wrap: anywhere; white-space: normal; }
  table.grw-table.ibp-ops-table td[data-label="Status / next step"] { overflow-wrap: normal; }
  table.grw-table.ibp-ops-table td[data-workspace-column="broker"],
  table.grw-table.ibp-ops-table td[data-workspace-column="chn"],
  table.grw-table.ibp-ops-table td[data-workspace-column="cscs"] { white-space: normal; overflow-wrap: anywhere; }
  table.grw-table.ibp-ops-table .ibp-row-actions { flex-wrap: wrap; gap: 8px; }
  table.grw-table.ibp-ops-table .ibp-row-actions .grw-btn { white-space: normal; }
}
@media (max-width: 680px) {
  .ibp-admin-subscription-grid .ibp-table-scroll { padding-inline: 4px; }
  .ibp-admin-subscription-grid table.grw-table th,
  .ibp-admin-subscription-grid table.grw-table td { padding: 12px; }
}

/* Subscription row actions use consistent, labelled icon buttons. */
.ibp-subscription-actions { flex-direction: column; align-items: stretch; gap: 8px; }
.ibp-subscription-actions > .grw-btn,
.ibp-subscription-actions > form,
.ibp-subscription-actions > form > .grw-btn { width: 100%; }
.ibp-subscription-actions .grw-btn,
.ibp-admin-subscription-grid .ibp-row-actions .grw-btn { gap: 8px; justify-content: center; min-height: 34px; }
.ibp-subscription-actions .grw-btn svg,
.ibp-admin-subscription-grid .ibp-row-actions .grw-btn svg { flex-shrink: 0; }
@media (max-width: 680px) {
  .ibp-subscription-actions { flex-direction: row; flex-wrap: wrap; }
  .ibp-subscription-actions > .grw-btn,
  .ibp-subscription-actions > form { width: auto; flex: 1 1 140px; }
}
