/*
 * Section 15 — front-end portal stylesheet (extended in 15-continued).
 *
 * All rules scoped to .gbcm-portal so the host theme is unaffected.
 * Colour, radius, density, and typography values come from CSS
 * custom properties emitted on the wrapper element by
 * PortalShortcode, which reads them from BrandingSettings. The host
 * theme cannot override these because the variables are declared on
 * the wrapper, not on :root.
 *
 * UX inspiration: FC Platform — left vertical nav, header with brand
 * + signed-in user, central card surface, thin footer with support
 * contact. Deliberately not modelled on PayCentral.
 */

.gbcm-portal {
	/* Fallbacks if the inline custom properties are stripped. */
	--gbcm-color-primary: #0a3d62;
	--gbcm-color-secondary: #1e6091;
	--gbcm-color-accent: #f5a623;
	--gbcm-color-button: #0a3d62;
	--gbcm-color-text: #1f2933;
	--gbcm-color-bg: #f4f6f8;
	--gbcm-color-sidebar-bg: #ffffff;
	--gbcm-color-surface: #ffffff;
	--gbcm-radius: 6px;
	--gbcm-density-pad: 16px 20px;

	display: grid;
	grid-template-rows: auto 1fr auto;
	min-height: 70vh;
	background: var(--gbcm-color-bg);
	color: var(--gbcm-color-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	/* Section 15.5 — outer shell stays square; the branding
	 * radius variable is preserved for internal cards, panels,
	 * buttons, and badges below. Header/footer/body inherit the
	 * outer shape (overflow: hidden prevents internal radii from
	 * bleeding past the shell). */
	border-radius: 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.gbcm-portal h1, .gbcm-portal h2, .gbcm-portal h3, .gbcm-portal h4 {
	color: var(--gbcm-color-primary);
}

.gbcm-portal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: var(--gbcm-color-primary);
	color: #fff;
}

.gbcm-portal__brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.gbcm-portal__logo {
	height: 32px;
	width: auto;
	max-width: 200px;
	object-fit: contain;
}

.gbcm-portal__brand-text {
	font-weight: 600;
	font-size: 16px;
	letter-spacing: 0.01em;
}

.gbcm-portal__title {
	opacity: 0.85;
	font-size: 14px;
	margin-left: 8px;
}

.gbcm-portal__user {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
}

.gbcm-portal__signout {
	color: #fff;
	text-decoration: underline;
}

.gbcm-portal__body {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 0;
	min-height: 360px;
}

.gbcm-portal__sidebar {
	background: var(--gbcm-color-sidebar-bg);
	border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.gbcm-portal__nav ul {
	list-style: none;
	margin: 0;
	padding: 12px 0;
}

.gbcm-portal__nav li {
	margin: 0;
}

.gbcm-portal__nav a {
	display: block;
	padding: 10px 18px;
	color: var(--gbcm-color-text);
	text-decoration: none;
	border-left: 3px solid transparent;
}

.gbcm-portal__nav a:hover {
	background: rgba(0, 0, 0, 0.04);
}

.gbcm-portal__nav li.is-active a {
	border-left-color: var(--gbcm-color-accent);
	background: rgba(0, 0, 0, 0.04);
	font-weight: 600;
}

.gbcm-portal__nav li.is-disabled a {
	opacity: 0.45;
	cursor: not-allowed;
}

.gbcm-portal__main {
	padding: 20px;
}

.gbcm-portal__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

/* Section 17.8-I - 2-column variant for the simplified dashboard.
   Keeps the two surviving tiles on each row evenly sized at typical
   desktop widths instead of letting auto-fit stretch a lone card to
   full width. Collapses to a single column under the existing
   720px responsive breakpoint via the body media query below. */
.gbcm-portal__grid--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 720px) {
	.gbcm-portal__grid--two {
		grid-template-columns: 1fr;
	}
}

.gbcm-card {
	background: var(--gbcm-color-surface);
	border-radius: var(--gbcm-radius);
	padding: var(--gbcm-density-pad);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.gbcm-card + .gbcm-card {
	margin-top: 16px;
}

.gbcm-card h2 {
	margin: 0 0 8px;
	font-size: 18px;
	color: var(--gbcm-color-primary);
}

.gbcm-card h3 {
	margin: 0 0 8px;
	font-size: 15px;
	color: var(--gbcm-color-secondary);
}

.gbcm-card--warn {
	border-left: 4px solid var(--gbcm-color-accent);
}

.gbcm-card--ok {
	border-left: 4px solid #2f8a3f;
}

.gbcm-card--err {
	border-left: 4px solid #c0392b;
}

.gbcm-portal__note {
	margin-top: 12px;
	padding: 10px 12px;
	background: rgba(0, 0, 0, 0.03);
	border-radius: var(--gbcm-radius);
	font-size: 13px;
	color: rgba(31, 41, 51, 0.85);
}

.gbcm-button {
	display: inline-block;
	padding: 8px 16px;
	background: var(--gbcm-color-button);
	color: #fff;
	text-decoration: none;
	border-radius: var(--gbcm-radius);
	font-weight: 500;
	border: 0;
	cursor: pointer;
}

.gbcm-button:hover {
	background: var(--gbcm-color-accent);
	color: var(--gbcm-color-text);
}

.gbcm-button--ghost {
	background: transparent;
	color: var(--gbcm-color-primary);
	border: 1px solid var(--gbcm-color-primary);
}

.gbcm-kv {
	display: grid;
	grid-template-columns: minmax(140px, 1fr) 2fr;
	gap: 4px 12px;
	font-size: 13px;
	margin: 8px 0;
}

.gbcm-kv dt {
	color: rgba(31, 41, 51, 0.65);
	font-weight: 500;
}

.gbcm-kv dd {
	margin: 0;
	color: var(--gbcm-color-text);
}

.gbcm-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--gbcm-color-text);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.gbcm-badge--ok    { background: #d4edda; color: #155724; }
.gbcm-badge--warn  { background: #fff3cd; color: #856404; }
.gbcm-badge--err   { background: #f8d7da; color: #721c24; }
.gbcm-badge--info  { background: #d1ecf1; color: #0c5460; }

.gbcm-portal__placeholder {
	color: rgba(31, 41, 51, 0.55);
	font-style: italic;
	padding: 20px;
	text-align: center;
}

.gbcm-portal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 20px;
	background: var(--gbcm-color-surface);
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 12px;
	color: rgba(31, 41, 51, 0.7);
}

@media (max-width: 720px) {
	.gbcm-portal__body {
		grid-template-columns: 1fr;
	}
	.gbcm-portal__sidebar {
		border-right: none;
		border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	}
}

/* ===========================================================
   Section 16.1a — active profile selector + balance card +
   profile card grid + flash notices.
   =========================================================== */

.gbcm-portal__active-profile {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1 1 auto;
	min-width: 0;
	margin: 0 12px;
}

.gbcm-portal__active-profile-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}

.gbcm-portal__active-profile-meta--empty {
	color: rgba(31, 41, 51, 0.55);
	font-style: italic;
}

.gbcm-portal__active-profile-label {
	font-size: 12px;
	color: rgba(31, 41, 51, 0.65);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.gbcm-portal__active-profile-name {
	font-weight: 600;
	color: var(--gbcm-color-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 200px;
}

.gbcm-portal__active-profile-form select {
	min-width: 220px;
	max-width: 320px;
	padding: 6px 28px 6px 10px;
	border-radius: var(--gbcm-radius);
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: var(--gbcm-color-surface);
	font-size: 13px;
	color: var(--gbcm-color-text);
}

.gbcm-portal__flash {
	margin: 8px 16px;
	padding: 10px 14px;
	border-radius: var(--gbcm-radius);
	font-size: 13px;
}

/* Section 17.8-I - flash banners rendered inside the main content
   column (logged-in flow + signed-out / no-access flows). They sit
   flush with the column padding instead of stretching across the
   sidebar+main grid, which produced an edge-to-edge strip directly
   under the blue portal header. role="status" is still set on the
   element for accessibility; this rule only changes spacing. */
.gbcm-portal__flash--inline {
	margin: 0 0 16px 0;
}

.gbcm-portal__flash--ok    { background: #d4edda; color: #155724; }
.gbcm-portal__flash--warn  { background: #fff3cd; color: #856404; }
.gbcm-portal__flash--err   { background: #f8d7da; color: #721c24; }
.gbcm-portal__flash--info  { background: #d1ecf1; color: #0c5460; }

.gbcm-portal__balance {
	font-size: 20px;
	font-weight: 600;
	color: var(--gbcm-color-text);
}

.gbcm-portal__balance-when {
	font-size: 12px;
	color: rgba(31, 41, 51, 0.65);
	margin-top: 2px;
}

.gbcm-portal__refresh-balance {
	margin-top: 12px;
}

.gbcm-portal__hint {
	color: rgba(31, 41, 51, 0.7);
	font-size: 13px;
	margin-bottom: 12px;
}

.gbcm-portal__profiles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin-top: 12px;
}

.gbcm-card--profile {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	background: var(--gbcm-color-surface);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--gbcm-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.gbcm-card--profile:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.gbcm-card--profile.is-active {
	border-color: rgba(40, 167, 69, 0.55);
	box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.55) inset, 0 4px 14px rgba(40, 167, 69, 0.08);
}

.gbcm-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.gbcm-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--gbcm-color-text);
}

.gbcm-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	flex-shrink: 0;
}

.gbcm-card__actions {
	display: flex;
	gap: 8px;
	margin-top: 4px;
}

.gbcm-kv--compact {
	display: grid;
	grid-template-columns: max-content 1fr;
	column-gap: 12px;
	row-gap: 4px;
	font-size: 13px;
	margin: 0;
}

.gbcm-kv--compact dt {
	color: rgba(31, 41, 51, 0.65);
}

.gbcm-button[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
}

@media (max-width: 720px) {
	.gbcm-portal__active-profile {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
	.gbcm-portal__active-profile-form select {
		width: 100%;
	}
}

/* Section 16.2a — issue-virtual form grouping + UAT summary. */
.gbcm-form__group {
	border: 1px solid rgba(31, 41, 51, 0.12);
	border-radius: 8px;
	padding: 14px 16px 6px;
	margin: 0 0 16px;
}
.gbcm-form__group legend {
	padding: 0 6px;
	font-weight: 600;
	color: rgba(31, 41, 51, 0.85);
}
.gbcm-form__hint {
	font-size: 13px;
	color: rgba(31, 41, 51, 0.65);
	margin: 4px 0 12px;
}
.gbcm-form__hint--warn {
	color: #8a4b00;
}
.gbcm-uat-summary {
	margin-top: 16px;
}
.gbcm-uat-summary > summary {
	cursor: pointer;
	font-weight: 600;
}
.gbcm-uat-summary code {
	font-size: 12.5px;
	background: rgba(31, 41, 51, 0.06);
	padding: 1px 4px;
	border-radius: 3px;
}

/* =====================================================================
 * Section 16.3 — Front-end portal UX polish.
 *
 * Goal: lift the portal from "raw form / table" feel to a polished
 * operational system. No new framework, no theme breakage; everything
 * scoped to .gbcm-portal so host theme/Elementor/Blocksy are unaffected.
 *
 * Layered on top of the existing styles. Where these rules duplicate
 * an earlier rule, the cascade keeps both — the more specific
 * 16.3 rule wins.
 * ===================================================================== */

/* --- Header polish ------------------------------------------------- */
.gbcm-portal__header {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.gbcm-portal__active-profile {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	padding: 8px 12px;
	gap: 10px;
}
.gbcm-portal__active-profile select,
.gbcm-portal__active-profile-form select {
	background: #fff;
	color: var(--gbcm-color-text);
	border: 1px solid rgba(31, 41, 51, 0.18);
	border-radius: 6px;
	padding: 6px 8px;
	min-width: 180px;
	font-size: 14px;
}
.gbcm-portal__active-profile select:focus,
.gbcm-portal__active-profile-form select:focus {
	outline: 2px solid var(--gbcm-color-accent);
	outline-offset: 1px;
}

/* --- Sidebar polish ------------------------------------------------ */
.gbcm-portal__sidebar {
	background: var(--gbcm-color-sidebar-bg);
	border-right: 1px solid rgba(31, 41, 51, 0.08);
}
.gbcm-portal__nav a,
.gbcm-portal__nav button.gbcm-portal__nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-radius: 6px;
	color: rgba(31, 41, 51, 0.78);
	font-weight: 500;
	transition: background 0.12s ease, color 0.12s ease;
}
.gbcm-portal__nav a:hover,
.gbcm-portal__nav button.gbcm-portal__nav-link:hover {
	background: rgba(10, 61, 98, 0.06);
	color: var(--gbcm-color-primary);
}
.gbcm-portal__nav a.is-active,
.gbcm-portal__nav button.gbcm-portal__nav-link.is-active,
.gbcm-portal__nav a[aria-current="page"] {
	background: rgba(10, 61, 98, 0.10);
	color: var(--gbcm-color-primary);
	font-weight: 600;
}
.gbcm-portal__nav a:focus-visible,
.gbcm-portal__nav button.gbcm-portal__nav-link:focus-visible {
	outline: 2px solid var(--gbcm-color-accent);
	outline-offset: 2px;
}

/* --- Main content shell ------------------------------------------- */
.gbcm-portal__main {
	padding: 20px;
	max-width: 1180px;
	margin: 0 auto;
	width: 100%;
}
.gbcm-portal__page-title {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 16px;
}
.gbcm-portal__page-title h1,
.gbcm-portal__page-title h2 {
	margin: 0;
}
.gbcm-portal__page-meta {
	color: rgba(31, 41, 51, 0.55);
	font-size: 13px;
}

/* --- Card polish --------------------------------------------------- */
.gbcm-portal .gbcm-card,
.gbcm-portal section.gbcm-card {
	background: var(--gbcm-color-surface);
	border: 1px solid rgba(31, 41, 51, 0.08);
	border-radius: 10px;
	padding: 18px 20px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.gbcm-portal .gbcm-card + .gbcm-card { margin-top: 12px; }
.gbcm-portal .gbcm-card h2 { font-size: 16px; margin: 0 0 12px; }
.gbcm-portal .gbcm-card h3 { font-size: 15px; margin: 0 0 8px; }
.gbcm-portal .gbcm-card h4 { font-size: 14px; margin: 0 0 6px; }
.gbcm-portal .gbcm-card--info {
	background: rgba(10, 61, 98, 0.04);
	border-color: rgba(10, 61, 98, 0.18);
}
.gbcm-portal .gbcm-card--ok {
	background: rgba(40, 167, 69, 0.05);
	border-color: rgba(40, 167, 69, 0.30);
}
.gbcm-portal .gbcm-card--warn {
	background: rgba(245, 166, 35, 0.06);
	border-color: rgba(245, 166, 35, 0.40);
}
.gbcm-portal .gbcm-card--danger {
	background: rgba(214, 31, 38, 0.05);
	border-color: rgba(214, 31, 38, 0.32);
}

/* --- Buttons ------------------------------------------------------- */
.gbcm-portal .gbcm-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #fff;
	color: var(--gbcm-color-primary);
	border: 1px solid rgba(10, 61, 98, 0.22);
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.gbcm-portal .gbcm-button:hover { background: rgba(10, 61, 98, 0.06); }
.gbcm-portal .gbcm-button:focus-visible {
	outline: 2px solid var(--gbcm-color-accent);
	outline-offset: 2px;
}
.gbcm-portal .gbcm-button--primary {
	background: var(--gbcm-color-button);
	color: #fff;
	border-color: var(--gbcm-color-button);
}
.gbcm-portal .gbcm-button--primary:hover {
	background: var(--gbcm-color-secondary);
	border-color: var(--gbcm-color-secondary);
	color: #fff;
}
.gbcm-portal .gbcm-button--danger {
	background: #d61f26;
	color: #fff;
	border-color: #b51920;
}
.gbcm-portal .gbcm-button--danger:hover { background: #b51920; }
.gbcm-portal .gbcm-button--small {
	padding: 4px 10px;
	font-size: 13px;
}

/* --- Badges -------------------------------------------------------- */
.gbcm-portal .gbcm-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: rgba(31, 41, 51, 0.08);
	color: rgba(31, 41, 51, 0.78);
}
.gbcm-portal .gbcm-badge--info {
	background: rgba(10, 61, 98, 0.10);
	color: var(--gbcm-color-primary);
}
.gbcm-portal .gbcm-badge--ok {
	background: rgba(40, 167, 69, 0.12);
	color: #1c6e39;
}
.gbcm-portal .gbcm-badge--warn {
	background: rgba(245, 166, 35, 0.16);
	color: #8a4b00;
}
.gbcm-portal .gbcm-badge--danger {
	background: rgba(214, 31, 38, 0.12);
	color: #9c1219;
}

/* --- Tables -------------------------------------------------------- */
.gbcm-portal table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.gbcm-portal table thead th {
	text-align: left;
	font-weight: 600;
	color: rgba(31, 41, 51, 0.65);
	padding: 10px 12px;
	border-bottom: 1px solid rgba(31, 41, 51, 0.10);
	background: rgba(31, 41, 51, 0.03);
}
.gbcm-portal table tbody td {
	padding: 10px 12px;
	border-bottom: 1px solid rgba(31, 41, 51, 0.06);
}
.gbcm-portal table tbody tr:hover td { background: rgba(10, 61, 98, 0.025); }

/* --- Forms --------------------------------------------------------- */
.gbcm-portal .gbcm-form__row {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	column-gap: 16px;
	row-gap: 4px;
	align-items: baseline;
	margin: 0 0 12px;
}
.gbcm-portal .gbcm-form__row > label {
	font-weight: 600;
	color: rgba(31, 41, 51, 0.85);
}
.gbcm-portal .gbcm-form__row > input[type="text"],
.gbcm-portal .gbcm-form__row > input[type="number"],
.gbcm-portal .gbcm-form__row > input[type="email"],
.gbcm-portal .gbcm-form__row > input[type="tel"],
.gbcm-portal .gbcm-form__row > select,
.gbcm-portal .gbcm-form__row > textarea {
	width: 100%;
	max-width: 420px;
	padding: 8px 10px;
	border: 1px solid rgba(31, 41, 51, 0.20);
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
}
.gbcm-portal .gbcm-form__row input:focus,
.gbcm-portal .gbcm-form__row select:focus,
.gbcm-portal .gbcm-form__row textarea:focus {
	outline: 2px solid var(--gbcm-color-accent);
	outline-offset: 1px;
	border-color: var(--gbcm-color-secondary);
}
.gbcm-portal .gbcm-form__row > small {
	grid-column: 2;
	color: rgba(31, 41, 51, 0.55);
	font-size: 12.5px;
}
.gbcm-portal .gbcm-form__row .gbcm-form__radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 500;
	color: rgba(31, 41, 51, 0.85);
	margin-right: 12px;
}
.gbcm-portal .gbcm-form__actions {
	margin-top: 8px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* Compact amount field — Section 16.3 PART D — keep loadAmount input small. */
.gbcm-portal .gbcm-form__row > input[name="amount_rands"] {
	max-width: 200px;
	font-variant-numeric: tabular-nums;
}

/* Two-column recipient block on desktop. */
.gbcm-portal .gbcm-form__group--recipient {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 0 24px;
}
.gbcm-portal .gbcm-form__group--recipient legend { grid-column: 1 / -1; }
.gbcm-portal .gbcm-form__group--recipient .gbcm-form__row {
	grid-template-columns: 140px minmax(0, 1fr);
}

/* --- Empty states -------------------------------------------------- */
.gbcm-portal .gbcm-empty {
	background: var(--gbcm-color-surface);
	border: 1px dashed rgba(31, 41, 51, 0.20);
	border-radius: 10px;
	padding: 28px 24px;
	text-align: center;
}
.gbcm-portal .gbcm-empty h3 { margin: 0 0 6px; }
.gbcm-portal .gbcm-empty p { margin: 0 0 12px; color: rgba(31, 41, 51, 0.65); }
.gbcm-portal .gbcm-empty__actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
}

/* --- Definition list polish (used everywhere) --------------------- */
.gbcm-portal .gbcm-kv {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	column-gap: 16px;
	row-gap: 6px;
	margin: 0;
}
.gbcm-portal .gbcm-kv dt {
	color: rgba(31, 41, 51, 0.55);
	font-weight: 500;
}
.gbcm-portal .gbcm-kv dd {
	margin: 0;
	color: var(--gbcm-color-text);
}

/* --- Responsive ---------------------------------------------------- */
@media (max-width: 900px) {
	.gbcm-portal__layout {
		grid-template-columns: 1fr;
	}
	.gbcm-portal__sidebar {
		border-right: none;
		border-bottom: 1px solid rgba(31, 41, 51, 0.08);
	}
	.gbcm-portal .gbcm-form__row {
		grid-template-columns: 1fr;
	}
	.gbcm-portal .gbcm-form__row > small { grid-column: 1; }
	.gbcm-portal .gbcm-form__group--recipient {
		grid-template-columns: 1fr;
	}
}
@media (max-width: 600px) {
	.gbcm-portal__header {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}
	.gbcm-portal__main { padding: 14px; }
	.gbcm-portal .gbcm-card { padding: 14px 16px; }
}

/* --- Section 16.3 operational status card -------------------------- */
.gbcm-portal .gbcm-status-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px;
	align-items: flex-start;
}
.gbcm-portal .gbcm-status-card__icon {
	width: 36px; height: 36px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
	background: rgba(245, 166, 35, 0.18);
	color: #8a4b00;
}
.gbcm-portal .gbcm-status-card__icon--ok    { background: rgba(40, 167, 69, 0.16);  color: #1c6e39; }
.gbcm-portal .gbcm-status-card__icon--info  { background: rgba(10, 61, 98, 0.10);   color: var(--gbcm-color-primary); }
.gbcm-portal .gbcm-status-card__icon--warn  { background: rgba(245, 166, 35, 0.18); color: #8a4b00; }
.gbcm-portal .gbcm-status-card__icon--danger{ background: rgba(214, 31, 38, 0.14);  color: #9c1219; }

.gbcm-portal .gbcm-status-card__body p { margin: 0 0 6px; }
.gbcm-portal .gbcm-status-card__body small {
	color: rgba(31, 41, 51, 0.55);
	font-size: 12.5px;
}

/* --- Quick-actions card row --------------------------------------- */
.gbcm-portal .gbcm-quick-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.gbcm-portal .gbcm-quick-actions a.gbcm-button { font-weight: 500; }

/* --- Issue-virtual confirm summary -------------------------------- */
.gbcm-portal .gbcm-issue-confirm__summary {
	background: rgba(31, 41, 51, 0.03);
	border-radius: 8px;
	padding: 14px 16px;
}
.gbcm-portal .gbcm-issue-confirm__warning {
	background: rgba(245, 166, 35, 0.08);
	border-left: 3px solid #f5a623;
	padding: 10px 14px;
	margin: 12px 0;
}

/* --- Accessibility: focus-visible everywhere ---------------------- */
.gbcm-portal button:focus-visible,
.gbcm-portal a:focus-visible,
.gbcm-portal input:focus-visible,
.gbcm-portal select:focus-visible,
.gbcm-portal textarea:focus-visible {
	outline: 2px solid var(--gbcm-color-accent);
	outline-offset: 2px;
}

/* =====================================================================
 * Section 16.3 round 2 — Editorial operational design layer.
 *
 * Aesthetic: refined operational / industrial-editorial financial.
 * Think Linear × Stripe × Bloomberg Terminal — confident editorial
 * typography (Fraunces serif display + Manrope sans body + JetBrains
 * Mono tabular numerals), warm-neutral surfaces over the existing
 * brand palette, asymmetric panel hierarchy, restrained motion,
 * monospaced numerics for every amount and identifier the operator
 * reads. Brand variables (--gbcm-color-primary etc.) are still
 * respected.
 *
 * This layer LAYERS on top of earlier rules. Where it duplicates an
 * earlier selector the cascade wins for this round.
 * ===================================================================== */

.gbcm-portal {
	/* --- Editorial design tokens --- */
	--gbcm-font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
	--gbcm-font-body:    'Manrope', 'Helvetica Neue', Arial, sans-serif;
	--gbcm-font-mono:    'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

	/* Warm-neutral surface palette — sits ON TOP of brand colour vars. */
	--gbcm-tone-surface:    #fafaf6;
	--gbcm-tone-surface-2:  #f3f1ea;
	--gbcm-tone-line:       rgba(31, 27, 22, 0.10);
	--gbcm-tone-line-soft:  rgba(31, 27, 22, 0.06);
	--gbcm-tone-text:       #1a1814;
	--gbcm-tone-text-mute:  rgba(26, 24, 20, 0.62);
	--gbcm-tone-accent:     #c87b1f;       /* warm ochre — sharp accent */
	--gbcm-tone-positive:   #1f6b3a;
	--gbcm-tone-warning:    #a05a00;
	--gbcm-tone-danger:     #9c1a22;

	/* Type scale — modest, editorial. */
	--gbcm-type-step--2:   12px;
	--gbcm-type-step--1:   13.5px;
	--gbcm-type-step-0:    15px;
	--gbcm-type-step-1:    17px;
	--gbcm-type-step-2:    21px;
	--gbcm-type-step-3:    27px;
	--gbcm-type-step-4:    34px;
	--gbcm-type-step-5:    44px;

	/* Spacing scale. */
	--gbcm-space-1: 4px;
	--gbcm-space-2: 8px;
	--gbcm-space-3: 12px;
	--gbcm-space-4: 16px;
	--gbcm-space-5: 20px;
	--gbcm-space-6: 28px;
	--gbcm-space-7: 40px;
	--gbcm-space-8: 56px;

	/* Apply body font + warmer surface backdrop. */
	font-family: var(--gbcm-font-body);
	color: var(--gbcm-tone-text);
	background: var(--gbcm-tone-surface);
	font-size: var(--gbcm-type-step-0);
	line-height: 1.55;
	font-feature-settings: 'ss01', 'cv11';
}

/* --- Display typography ------------------------------------------- */
.gbcm-portal h1,
.gbcm-portal h2,
.gbcm-portal h3,
.gbcm-portal h4 {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	letter-spacing: -0.01em;
	color: var(--gbcm-tone-text);
}
.gbcm-portal h1 { font-size: var(--gbcm-type-step-4); line-height: 1.1; }
.gbcm-portal h2 { font-size: var(--gbcm-type-step-2); line-height: 1.2; }
.gbcm-portal h3 { font-size: var(--gbcm-type-step-1); line-height: 1.25; }
.gbcm-portal h4 { font-size: var(--gbcm-type-step-0); line-height: 1.3; font-weight: 600; }

/* Eyebrow label above section headings. */
.gbcm-portal__eyebrow {
	display: inline-block;
	font-family: var(--gbcm-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gbcm-tone-text-mute);
	margin: 0 0 var(--gbcm-space-2);
	padding: 0;
}

/* --- Mono numerics anywhere they matter --------------------------- */
.gbcm-portal code,
.gbcm-portal pre,
.gbcm-portal .gbcm-mono,
.gbcm-portal .gbcm-kv code,
.gbcm-portal table.gbcm-table td:has(code),
.gbcm-portal .gbcm-uat-summary code {
	font-family: var(--gbcm-font-mono);
	font-feature-settings: 'tnum';
	font-variant-numeric: tabular-nums;
	font-size: 12.5px;
	background: var(--gbcm-tone-surface-2);
	color: var(--gbcm-tone-text);
	padding: 1px 5px;
	border-radius: 3px;
}
/* Money / amount / cents values (operator scans these all day). */
.gbcm-portal .gbcm-amount,
.gbcm-portal dd:has(> code),
.gbcm-portal td.gbcm-cell--num,
.gbcm-portal td:nth-of-type(n+3) {
	font-variant-numeric: tabular-nums;
	font-feature-settings: 'tnum';
}

/* --- Editorial card surfaces -------------------------------------- */
.gbcm-portal .gbcm-card {
	background: var(--gbcm-tone-surface);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 12px;
	padding: var(--gbcm-space-5) var(--gbcm-space-6);
	box-shadow: 0 1px 1px rgba(31, 27, 22, 0.02), 0 8px 24px -16px rgba(31, 27, 22, 0.10);
	position: relative;
	transition: box-shadow 0.20s ease, transform 0.18s ease;
}
.gbcm-portal .gbcm-card:hover {
	box-shadow: 0 1px 1px rgba(31, 27, 22, 0.04), 0 12px 32px -18px rgba(31, 27, 22, 0.16);
}
/* A 2px accent line on the top edge of "primary" cards (active
 * profile, operational status, quick actions) — quietly distinctive. */
.gbcm-portal .gbcm-card--primary,
.gbcm-portal .gbcm-card--accent { position: relative; }
.gbcm-portal .gbcm-card--primary::before,
.gbcm-portal .gbcm-card--accent::before {
	content: '';
	position: absolute;
	top: -1px; left: var(--gbcm-space-5); right: var(--gbcm-space-5);
	height: 2px;
	background: var(--gbcm-tone-accent);
	border-radius: 2px;
}
.gbcm-portal .gbcm-card--info {
	background: linear-gradient(180deg, rgba(10, 61, 98, 0.04) 0%, var(--gbcm-tone-surface) 100%);
	border-color: rgba(10, 61, 98, 0.18);
}
.gbcm-portal .gbcm-card--ok {
	background: linear-gradient(180deg, rgba(31, 107, 58, 0.06) 0%, var(--gbcm-tone-surface) 100%);
	border-color: rgba(31, 107, 58, 0.30);
}
.gbcm-portal .gbcm-card--warn {
	background: linear-gradient(180deg, rgba(160, 90, 0, 0.06) 0%, var(--gbcm-tone-surface) 100%);
	border-color: rgba(160, 90, 0, 0.32);
}
.gbcm-portal .gbcm-card--danger {
	background: linear-gradient(180deg, rgba(156, 26, 34, 0.05) 0%, var(--gbcm-tone-surface) 100%);
	border-color: rgba(156, 26, 34, 0.32);
}

/* --- Header polish ------------------------------------------------- */
.gbcm-portal__header {
	background: var(--gbcm-color-primary);
	color: #fff;
	padding: var(--gbcm-space-4) var(--gbcm-space-6);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gbcm-portal__brand-text {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-1);
	letter-spacing: -0.01em;
}
.gbcm-portal__active-profile {
	display: flex;
	align-items: center;
	gap: var(--gbcm-space-3);
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	padding: 6px 12px;
}
.gbcm-portal__active-profile select,
.gbcm-portal__active-profile-form select {
	background: #fff;
	color: var(--gbcm-tone-text);
	border: 1px solid rgba(31, 27, 22, 0.16);
	border-radius: 6px;
	padding: 6px 10px;
	font-family: var(--gbcm-font-body);
	font-size: 13.5px;
	min-width: 200px;
}

/* --- Sidebar nav: 2px left bar on active item --------------------- */
.gbcm-portal__sidebar {
	background: var(--gbcm-tone-surface);
	border-right: 1px solid var(--gbcm-tone-line);
	padding: var(--gbcm-space-5) 0;
}
.gbcm-portal__nav a,
.gbcm-portal__nav button.gbcm-portal__nav-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px var(--gbcm-space-5);
	margin: 0 var(--gbcm-space-3);
	border-radius: 0;
	font-family: var(--gbcm-font-body);
	font-weight: 500;
	font-size: 14px;
	color: var(--gbcm-tone-text-mute);
	background: transparent;
	transition: color 0.12s ease;
}
.gbcm-portal__nav a:hover,
.gbcm-portal__nav button.gbcm-portal__nav-link:hover {
	color: var(--gbcm-tone-text);
	background: var(--gbcm-tone-line-soft);
}
.gbcm-portal__nav a.is-active,
.gbcm-portal__nav button.gbcm-portal__nav-link.is-active,
.gbcm-portal__nav a[aria-current="page"] {
	color: var(--gbcm-tone-text);
	font-weight: 600;
	background: transparent;
}
.gbcm-portal__nav a.is-active::before,
.gbcm-portal__nav button.gbcm-portal__nav-link.is-active::before,
.gbcm-portal__nav a[aria-current="page"]::before {
	content: '';
	position: absolute;
	left: 0; top: 6px; bottom: 6px;
	width: 2px;
	background: var(--gbcm-tone-accent);
	border-radius: 2px;
}

/* --- Buttons: confident, square, animated chevron ----------------- */
.gbcm-portal .gbcm-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	background: #fff;
	color: var(--gbcm-color-primary);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 6px;
	font-family: var(--gbcm-font-body);
	font-weight: 600;
	font-size: 13.5px;
	letter-spacing: 0.005em;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.18s ease;
}
.gbcm-portal .gbcm-button:hover {
	background: var(--gbcm-tone-surface-2);
	border-color: rgba(31, 27, 22, 0.20);
}
.gbcm-portal .gbcm-button:active { transform: translateY(1px); }
.gbcm-portal .gbcm-button--primary {
	background: var(--gbcm-color-primary);
	color: #fff;
	border-color: var(--gbcm-color-primary);
}
.gbcm-portal .gbcm-button--primary:hover {
	background: #052a45;
	border-color: #052a45;
}
.gbcm-portal .gbcm-button--primary::after {
	content: '→';
	margin-left: 2px;
	transition: transform 0.20s ease;
}
.gbcm-portal .gbcm-button--primary:hover::after { transform: translateX(2px); }

/* --- Badges: editorial-financial chips ---------------------------- */
.gbcm-portal .gbcm-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 4px;
	font-family: var(--gbcm-font-mono);
	font-size: 10.5px;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	font-weight: 500;
	background: rgba(31, 27, 22, 0.06);
	color: var(--gbcm-tone-text);
	border: 1px solid var(--gbcm-tone-line-soft);
}
.gbcm-portal .gbcm-badge--info {
	background: rgba(10, 61, 98, 0.08);
	color: var(--gbcm-color-primary);
	border-color: rgba(10, 61, 98, 0.16);
}
.gbcm-portal .gbcm-badge--ok {
	background: rgba(31, 107, 58, 0.08);
	color: var(--gbcm-tone-positive);
	border-color: rgba(31, 107, 58, 0.20);
}
.gbcm-portal .gbcm-badge--warn {
	background: rgba(160, 90, 0, 0.10);
	color: var(--gbcm-tone-warning);
	border-color: rgba(160, 90, 0, 0.22);
}
.gbcm-portal .gbcm-badge--danger {
	background: rgba(156, 26, 34, 0.08);
	color: var(--gbcm-tone-danger);
	border-color: rgba(156, 26, 34, 0.22);
}

/* --- Tables: editorial financial ---------------------------------- */
.gbcm-portal table {
	border-collapse: collapse;
	width: 100%;
	font-size: var(--gbcm-type-step-0);
}
.gbcm-portal table thead th {
	font-family: var(--gbcm-font-mono);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gbcm-tone-text-mute);
	padding: 12px var(--gbcm-space-3);
	border-bottom: 1px solid var(--gbcm-tone-line);
	background: transparent;
}
.gbcm-portal table tbody td {
	padding: 14px var(--gbcm-space-3);
	border-bottom: 1px solid var(--gbcm-tone-line-soft);
	font-variant-numeric: tabular-nums;
}
.gbcm-portal table tbody tr:last-child td { border-bottom: none; }
.gbcm-portal table tbody tr:hover td { background: var(--gbcm-tone-line-soft); }

/* --- Forms: editorial spacing + monospace numerics ---------------- */
.gbcm-portal .gbcm-form__group {
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 10px;
	padding: var(--gbcm-space-4) var(--gbcm-space-5) 6px;
	margin: 0 0 var(--gbcm-space-4);
	background: var(--gbcm-tone-surface);
}
.gbcm-portal .gbcm-form__group legend {
	font-family: var(--gbcm-font-mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--gbcm-tone-text-mute);
	font-weight: 500;
	padding: 0 8px;
}
.gbcm-portal .gbcm-form__row > label {
	font-family: var(--gbcm-font-body);
	font-weight: 600;
	color: var(--gbcm-tone-text);
}
.gbcm-portal .gbcm-form__row input[type="text"],
.gbcm-portal .gbcm-form__row input[type="number"],
.gbcm-portal .gbcm-form__row input[type="email"],
.gbcm-portal .gbcm-form__row input[type="tel"],
.gbcm-portal .gbcm-form__row select,
.gbcm-portal .gbcm-form__row textarea {
	font-family: var(--gbcm-font-body);
	border: 1px solid var(--gbcm-tone-line);
	background: #fff;
	color: var(--gbcm-tone-text);
}
.gbcm-portal .gbcm-form__row input[name="amount_rands"],
.gbcm-portal .gbcm-form__row input[name="three_d_secure_code"],
.gbcm-portal .gbcm-form__row input[name="id_number"],
.gbcm-portal .gbcm-form__row input[name="cellphone"] {
	font-family: var(--gbcm-font-mono);
	font-feature-settings: 'tnum';
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}
.gbcm-portal .gbcm-form__row input:focus,
.gbcm-portal .gbcm-form__row select:focus,
.gbcm-portal .gbcm-form__row textarea:focus {
	border-color: var(--gbcm-tone-accent);
	outline: 2px solid rgba(200, 123, 31, 0.22);
	outline-offset: 1px;
}

/* --- Editorial empty states --------------------------------------- */
.gbcm-portal .gbcm-empty {
	background: transparent;
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 12px;
	padding: var(--gbcm-space-7) var(--gbcm-space-6);
	text-align: center;
	position: relative;
}
.gbcm-portal .gbcm-empty h3 {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-2);
	margin: 0 0 var(--gbcm-space-2);
}
.gbcm-portal .gbcm-empty p {
	color: var(--gbcm-tone-text-mute);
	max-width: 56ch;
	margin: 0 auto var(--gbcm-space-3);
}
.gbcm-portal .gbcm-empty p small {
	font-size: 12.5px;
	color: var(--gbcm-tone-text-mute);
}
.gbcm-portal .gbcm-empty__rule {
	display: block;
	width: 56px;
	height: 1px;
	background: var(--gbcm-tone-accent);
	margin: 0 auto var(--gbcm-space-5);
	opacity: 0.7;
}
.gbcm-portal .gbcm-empty__actions {
	display: inline-flex;
	gap: var(--gbcm-space-2);
	flex-wrap: wrap;
	justify-content: center;
	margin-top: var(--gbcm-space-3);
}

/* --- Operational status card: a real "headline + body" card ------- */
.gbcm-portal .gbcm-status-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--gbcm-space-4);
	align-items: flex-start;
}
.gbcm-portal .gbcm-status-card__icon {
	width: 40px; height: 40px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--gbcm-font-display);
	font-style: italic;
	font-size: 18px;
	flex-shrink: 0;
	background: rgba(160, 90, 0, 0.16);
	color: var(--gbcm-tone-warning);
	border: 1px solid rgba(160, 90, 0, 0.30);
}
.gbcm-portal .gbcm-status-card__icon--ok    { background: rgba(31, 107, 58, 0.10); color: var(--gbcm-tone-positive); border-color: rgba(31, 107, 58, 0.28); }
.gbcm-portal .gbcm-status-card__icon--info  { background: rgba(10, 61, 98, 0.08);  color: var(--gbcm-color-primary);  border-color: rgba(10, 61, 98, 0.20); }
.gbcm-portal .gbcm-status-card__icon--warn  { background: rgba(160, 90, 0, 0.16);  color: var(--gbcm-tone-warning);   border-color: rgba(160, 90, 0, 0.30); }
.gbcm-portal .gbcm-status-card__icon--danger{ background: rgba(156, 26, 34, 0.10); color: var(--gbcm-tone-danger);    border-color: rgba(156, 26, 34, 0.30); }
.gbcm-portal .gbcm-status-card__body p { margin: 0 0 6px; }
.gbcm-portal .gbcm-status-card__body small { color: var(--gbcm-tone-text-mute); font-size: 12.5px; }

/* --- Active profile dashboard card amount display ----------------- */
.gbcm-portal .gbcm-balance-figure {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-3);
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	color: var(--gbcm-tone-text);
	line-height: 1.0;
}
.gbcm-portal .gbcm-balance-figure__currency {
	font-family: var(--gbcm-font-mono);
	font-size: 14px;
	color: var(--gbcm-tone-text-mute);
	margin-right: 4px;
	letter-spacing: 0.10em;
}

/* --- UAT request summary (Super Admin) — refined dossier ---------- */
.gbcm-portal .gbcm-uat-summary {
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 10px;
	background: var(--gbcm-tone-surface-2);
	padding: var(--gbcm-space-4) var(--gbcm-space-5);
}
.gbcm-portal .gbcm-uat-summary > summary {
	font-family: var(--gbcm-font-mono);
	font-size: 11.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gbcm-tone-text-mute);
	font-weight: 500;
}
.gbcm-portal .gbcm-uat-summary > summary:hover { color: var(--gbcm-tone-text); }
.gbcm-portal .gbcm-uat-summary code {
	background: #fff;
	border: 1px solid var(--gbcm-tone-line);
}

/* --- Page-title block (eyebrow + serif title) --------------------- */
.gbcm-portal__page-title {
	margin: 0 0 var(--gbcm-space-5);
}
.gbcm-portal__page-title h1,
.gbcm-portal__page-title h2 {
	margin: 0;
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-3);
	letter-spacing: -0.012em;
}

/* --- Confirm screen warning band: bigger, editorial --------------- */
.gbcm-portal .gbcm-issue-confirm__warning {
	background: linear-gradient(180deg, rgba(160, 90, 0, 0.10) 0%, rgba(160, 90, 0, 0.04) 100%);
	border-left: 3px solid var(--gbcm-tone-accent);
	padding: var(--gbcm-space-4) var(--gbcm-space-5);
	margin: var(--gbcm-space-4) 0;
	border-radius: 0 8px 8px 0;
	font-family: var(--gbcm-font-body);
}
.gbcm-portal .gbcm-issue-confirm__warning strong {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-1);
	display: block;
	margin-bottom: 4px;
}

/* --- Restrained motion: staggered card reveal on dashboard load --- */
@keyframes gbcm-card-rise {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}
.gbcm-portal__grid > .gbcm-card {
	animation: gbcm-card-rise 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.gbcm-portal__grid > .gbcm-card:nth-child(1) { animation-delay: 0.00s; }
.gbcm-portal__grid > .gbcm-card:nth-child(2) { animation-delay: 0.05s; }
.gbcm-portal__grid > .gbcm-card:nth-child(3) { animation-delay: 0.10s; }
.gbcm-portal__grid > .gbcm-card:nth-child(4) { animation-delay: 0.15s; }

/* Respect users who have prefers-reduced-motion. */
@media (prefers-reduced-motion: reduce) {
	.gbcm-portal__grid > .gbcm-card { animation: none !important; }
	.gbcm-portal .gbcm-button,
	.gbcm-portal .gbcm-button--primary::after { transition: none !important; }
}

/* --- Refined accessibility focus ring ----------------------------- */
.gbcm-portal :focus-visible {
	outline: 2px solid var(--gbcm-tone-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* =====================================================================
 * Section 16.4a — Refinement pass after frontend-design round 2.
 *
 * Concrete fixes from screenshot feedback:
 *   - Header text became dark-on-dark; profile chip felt cramped.
 *   - Main content was constrained to a narrow island on desktop.
 *   - Dashboard "Operations" eyebrow and h1 visually disconnected
 *     because the round-1 page-title block used baseline-aligned
 *     flex with space-between (h1 floated right).
 *   - Cards filter bar still rendered as raw stacked fields with
 *     harsh borders.
 *   - Cards / Profiles pages need actual page headers with primary
 *     CTAs, not a single h2 inside a card.
 *   - Form controls (filter inputs, selects, buttons) need a
 *     standardised height / radius / soft border / focus ring.
 *
 * Pure CSS layer; no markup change required for any of these fixes
 * except the few panel updates that landed in the same patch (Cards
 * page header, Cards filter bar wrapper, profile-aware empty state).
 *
 * Layered on top of round 1 + round 2; cascade wins for round-3
 * selectors that re-target the same rules.
 * ===================================================================== */

/* --- Wider desktop content width -------------------------------- */
.gbcm-portal__main {
	/* Round-1 capped this at 1180px which felt like a tiny island
	 * on 1440-pixel laptops. clamp() lets the portal breathe on big
	 * monitors while still keeping a comfortable line length in
	 * text-heavy panels. */
	max-width: clamp(960px, 92vw, 1440px);
	padding: var(--gbcm-space-6) clamp(20px, 4vw, 40px);
}
@media (max-width: 1100px) {
	.gbcm-portal__main { max-width: 100%; }
}

/* --- Header refinement ---------------------------------------- */
.gbcm-portal__header {
	gap: var(--gbcm-space-5);
	flex-wrap: wrap;
}
.gbcm-portal__brand {
	gap: 12px;
	color: rgba(255, 255, 255, 0.95);
}
.gbcm-portal__brand-text {
	color: rgba(255, 255, 255, 0.96);
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-2);
}
.gbcm-portal__title {
	display: block;
	font-family: var(--gbcm-font-mono);
	font-size: 10.5px;
	letter-spacing: 0.20em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.62);
	margin-top: 2px;
}

.gbcm-portal__active-profile {
	flex: 1 1 360px;
	min-width: 280px;
	max-width: 540px;
	gap: 14px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 10px;
	padding: 10px 14px;
	flex-wrap: wrap;
}
.gbcm-portal__active-profile-meta {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 6px;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
}
.gbcm-portal__active-profile-label {
	font-family: var(--gbcm-font-mono);
	font-size: 10px;
	letter-spacing: 0.20em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.66);
	display: block;
}
.gbcm-portal__active-profile-name {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-1);
	color: #fff;
	letter-spacing: -0.005em;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Badges row for the active-profile chip — sits BELOW the name. */
.gbcm-portal__active-profile .gbcm-badge {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.22);
	font-family: var(--gbcm-font-mono);
	letter-spacing: 0.10em;
	font-size: 10px;
}
.gbcm-portal__active-profile .gbcm-badge--info {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.22);
}
.gbcm-portal__active-profile .gbcm-badge--ok {
	background: rgba(105, 207, 145, 0.20);
	color: #d3f3df;
	border-color: rgba(105, 207, 145, 0.32);
}
.gbcm-portal__active-profile .gbcm-badge--warn {
	background: rgba(255, 196, 87, 0.16);
	color: #ffe1a3;
	border-color: rgba(255, 196, 87, 0.30);
}
.gbcm-portal__active-profile .gbcm-badge--err {
	background: rgba(255, 137, 137, 0.16);
	color: #ffd0d0;
	border-color: rgba(255, 137, 137, 0.30);
}

.gbcm-portal__active-profile-form select {
	background: rgba(255, 255, 255, 0.96);
	color: var(--gbcm-tone-text);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 7px;
	padding: 8px 10px;
	min-width: 220px;
	font-family: var(--gbcm-font-body);
	font-size: 13.5px;
	font-weight: 500;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.gbcm-portal__active-profile-form select:focus {
	outline: 2px solid var(--gbcm-tone-accent);
	outline-offset: 2px;
}

.gbcm-portal__user {
	display: flex;
	align-items: center;
	gap: 12px;
	color: rgba(255, 255, 255, 0.92);
}
.gbcm-portal__user-name {
	font-family: var(--gbcm-font-body);
	font-size: 13px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.92);
}
.gbcm-portal__signout {
	color: rgba(255, 255, 255, 0.72);
	font-size: 12.5px;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.22);
	padding-bottom: 1px;
}
.gbcm-portal__signout:hover {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 760px) {
	.gbcm-portal__header { flex-direction: column; align-items: stretch; }
	.gbcm-portal__active-profile { max-width: 100%; }
}

/* --- Page header (Cards, Profiles, Reports, etc.) --------------- */
.gbcm-page-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--gbcm-space-5);
	align-items: end;
	margin: 0 0 var(--gbcm-space-6);
	padding-bottom: var(--gbcm-space-4);
	border-bottom: 1px solid var(--gbcm-tone-line);
}
.gbcm-page-header__title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gbcm-page-header__title h1 {
	font-family: var(--gbcm-font-display);
	font-size: var(--gbcm-type-step-3);
	font-weight: 500;
	letter-spacing: -0.012em;
	margin: 0;
	line-height: 1.1;
}
.gbcm-page-header__lead {
	color: var(--gbcm-tone-text-mute);
	font-size: var(--gbcm-type-step-0);
	margin: 4px 0 0;
	max-width: 64ch;
}
.gbcm-page-header__lead strong {
	color: var(--gbcm-tone-text);
	font-weight: 600;
}
.gbcm-page-header__actions {
	display: inline-flex;
	gap: var(--gbcm-space-2);
	flex-wrap: wrap;
	align-self: end;
}
@media (max-width: 720px) {
	.gbcm-page-header { grid-template-columns: 1fr; }
	.gbcm-page-header__actions { justify-content: flex-start; }
}

/* --- Dashboard page-title block — left-aligned, stacked --------- */
.gbcm-portal__page-title {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	gap: 6px !important;
	margin: 0 0 var(--gbcm-space-6) !important;
	padding-bottom: var(--gbcm-space-4);
	border-bottom: 1px solid var(--gbcm-tone-line);
}
.gbcm-portal__page-title .gbcm-portal__eyebrow { margin: 0; }
.gbcm-portal__page-title h1 {
	margin: 0;
	font-family: var(--gbcm-font-display);
	font-size: var(--gbcm-type-step-3);
	font-weight: 500;
	letter-spacing: -0.012em;
	line-height: 1.1;
}

/* --- Filter bar (Cards page + future panels) -------------------- */
.gbcm-filter-bar {
	display: grid;
	grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.6fr) auto;
	gap: var(--gbcm-space-3);
	align-items: stretch;
	background: var(--gbcm-tone-surface);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 10px;
	padding: 12px;
	margin: 0 0 var(--gbcm-space-5);
}
.gbcm-filter-bar__search { display: flex; align-items: stretch; min-width: 0; }
.gbcm-filter-bar__search input[type="search"] {
	width: 100%;
	height: 38px;
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 8px;
	padding: 0 12px;
	font-family: var(--gbcm-font-body);
	font-size: 14px;
	background: #fff;
	color: var(--gbcm-tone-text);
}
.gbcm-filter-bar__search input[type="search"]::placeholder {
	color: var(--gbcm-tone-text-mute);
}
.gbcm-filter-bar__group {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--gbcm-space-2);
	min-width: 0;
}
.gbcm-filter-bar__group select {
	height: 38px;
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 8px;
	padding: 0 32px 0 10px;
	background: #fff;
	color: var(--gbcm-tone-text);
	font-family: var(--gbcm-font-body);
	font-size: 13.5px;
	cursor: pointer;
	min-width: 0;
	width: 100%;
}
.gbcm-filter-bar__actions {
	display: inline-flex;
	gap: var(--gbcm-space-2);
	align-items: stretch;
	white-space: nowrap;
}
.gbcm-filter-bar__actions .gbcm-button {
	height: 38px;
	padding: 0 16px;
}
.gbcm-filter-bar input:focus,
.gbcm-filter-bar select:focus {
	outline: 2px solid var(--gbcm-tone-accent);
	outline-offset: 1px;
	border-color: var(--gbcm-tone-accent);
}
@media (max-width: 900px) {
	.gbcm-filter-bar {
		grid-template-columns: 1fr;
	}
	.gbcm-filter-bar__group { grid-template-columns: 1fr 1fr; }
	.gbcm-filter-bar__actions { justify-content: flex-end; }
}

/* --- Standardise form controls globally inside .gbcm-portal ---- */
.gbcm-portal input[type="text"],
.gbcm-portal input[type="search"],
.gbcm-portal input[type="number"],
.gbcm-portal input[type="email"],
.gbcm-portal input[type="tel"],
.gbcm-portal input[type="date"],
.gbcm-portal select,
.gbcm-portal textarea {
	font-family: var(--gbcm-font-body);
	font-size: 14px;
	height: 38px;
	padding: 0 12px;
	background: #fff;
	color: var(--gbcm-tone-text);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 8px;
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.gbcm-portal textarea {
	height: auto;
	padding: 10px 12px;
	min-height: 88px;
	font-family: var(--gbcm-font-body);
}
.gbcm-portal input::placeholder,
.gbcm-portal textarea::placeholder {
	color: var(--gbcm-tone-text-mute);
}
.gbcm-portal input:hover,
.gbcm-portal select:hover,
.gbcm-portal textarea:hover {
	border-color: rgba(31, 27, 22, 0.18);
}
.gbcm-portal input:focus,
.gbcm-portal select:focus,
.gbcm-portal textarea:focus {
	outline: 2px solid var(--gbcm-tone-accent);
	outline-offset: 1px;
	border-color: var(--gbcm-tone-accent);
}
/* Buttons that sit next to inputs share the same vertical rhythm. */
.gbcm-portal .gbcm-filter-bar .gbcm-button,
.gbcm-portal .gbcm-page-header .gbcm-button {
	height: 38px;
	padding: 0 16px;
}

/* --- Refined empty state (Cards / Campaign Report / SMS) -------- */
.gbcm-portal .gbcm-empty {
	background: var(--gbcm-tone-surface);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 14px;
	padding: var(--gbcm-space-7) var(--gbcm-space-6);
	text-align: center;
	position: relative;
}
.gbcm-portal .gbcm-empty h3 {
	font-family: var(--gbcm-font-display);
	font-size: var(--gbcm-type-step-2);
	font-weight: 500;
	margin: 0 0 var(--gbcm-space-2);
}
.gbcm-portal .gbcm-empty > p {
	color: var(--gbcm-tone-text);
	font-size: var(--gbcm-type-step-0);
	max-width: 52ch;
	margin: 0 auto var(--gbcm-space-3);
}
.gbcm-portal .gbcm-empty .gbcm-empty__hint {
	color: var(--gbcm-tone-text-mute);
	font-size: 13px;
	max-width: 56ch;
	margin: 0 auto var(--gbcm-space-4);
}
.gbcm-portal .gbcm-empty .gbcm-empty__hint a {
	color: var(--gbcm-color-primary);
	text-decoration: none;
	border-bottom: 1px solid rgba(10, 61, 98, 0.30);
}
.gbcm-portal .gbcm-empty .gbcm-empty__hint a:hover {
	border-bottom-color: var(--gbcm-color-primary);
}
.gbcm-portal .gbcm-empty__rule {
	display: block;
	width: 48px;
	height: 1px;
	background: var(--gbcm-tone-accent);
	margin: 0 auto var(--gbcm-space-4);
	opacity: 0.65;
}
.gbcm-portal .gbcm-empty__actions {
	display: inline-flex;
	gap: var(--gbcm-space-2);
	flex-wrap: wrap;
	justify-content: center;
	margin-top: var(--gbcm-space-2);
}
/* The Cards-specific empty card sits next to the security note;
 * give it a touch more padding so the composition feels considered. */
.gbcm-portal .gbcm-empty--cards {
	padding: var(--gbcm-space-8) var(--gbcm-space-6);
}

/* --- Profiles cards: bigger, balanced -------------------------- */
.gbcm-portal__profiles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: var(--gbcm-space-4);
	margin-top: var(--gbcm-space-4);
}
.gbcm-portal .gbcm-card--profile {
	display: flex;
	flex-direction: column;
	gap: var(--gbcm-space-3);
	padding: var(--gbcm-space-5) var(--gbcm-space-5) var(--gbcm-space-4);
	border-radius: 12px;
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.gbcm-portal .gbcm-card--profile:hover {
	box-shadow: 0 12px 32px -18px rgba(31, 27, 22, 0.18);
	transform: translateY(-1px);
}
.gbcm-portal .gbcm-card--profile.is-active {
	border-color: rgba(31, 107, 58, 0.45);
	box-shadow: 0 0 0 1px rgba(31, 107, 58, 0.25) inset, 0 12px 32px -18px rgba(31, 107, 58, 0.20);
}
.gbcm-portal .gbcm-card--profile.is-active::before {
	background: var(--gbcm-tone-positive);
}
.gbcm-portal .gbcm-card__head {
	display: flex;
	align-items: flex-start;
	gap: var(--gbcm-space-2);
	justify-content: space-between;
}
.gbcm-portal .gbcm-card__title {
	font-family: var(--gbcm-font-display);
	font-weight: 500;
	font-size: var(--gbcm-type-step-1);
	letter-spacing: -0.005em;
	margin: 0;
}
.gbcm-portal .gbcm-card__badges {
	display: inline-flex;
	gap: 4px;
	flex-wrap: wrap;
	align-items: center;
}
.gbcm-portal .gbcm-card--profile .gbcm-kv,
.gbcm-portal .gbcm-card--profile .gbcm-kv--compact {
	grid-template-columns: max-content minmax(0, 1fr);
	column-gap: 12px;
	row-gap: 6px;
	font-size: 13.5px;
}
.gbcm-portal .gbcm-card--profile .gbcm-card__actions {
	margin-top: auto;
	padding-top: var(--gbcm-space-2);
	border-top: 1px dashed var(--gbcm-tone-line);
}

/* --- Confirm-screen polish (operator-side) --------------------- */
.gbcm-portal .gbcm-issue-confirm__warning strong {
	color: var(--gbcm-tone-warning);
}

/* --- Notes / disclaimers under tables -------------------------- */
.gbcm-portal .gbcm-portal__note {
	color: var(--gbcm-tone-text-mute);
	font-size: 12.5px;
	margin: var(--gbcm-space-4) 0 0;
	font-family: var(--gbcm-font-body);
}

/* --- Tighter media-query refinements -------------------------- */
@media (max-width: 1100px) {
	.gbcm-portal__main { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 600px) {
	.gbcm-portal__active-profile-meta { gap: 8px; }
	.gbcm-portal__active-profile-name { font-size: 15px; }
	.gbcm-page-header__lead { font-size: 13.5px; }
}

/* =====================================================================
 * Section 16.4b — Corrective layout pass (1.4.0).
 *
 * The previous three rounds (16.3 round 1, round 2 editorial, 16.4a)
 * stacked enough decoration to make the portal feel like an editorial
 * magazine instead of a card operations app:
 *   - Loaded Fraunces / Manrope / JetBrains Mono from Google Fonts.
 *   - Header consumed a 180-220px tall hero block.
 *   - Main content was capped at clamp(960, 92vw, 1440), still feeling
 *     like a centred island on big monitors.
 *   - Audit / Recipients / Loads pages were single placeholder cards.
 *
 * This corrective layer:
 *   - Inherits the host theme's typography (Blocksy etc.) — no
 *     external fonts.
 *   - Compact toolbar header.
 *   - Wide app-shell main area.
 *   - Refined-but-quiet table styling with soft borders.
 *   - Standard portal patterns: .gbcm-page-header, .gbcm-toolbar,
 *     .gbcm-status-grid, .gbcm-action-grid, .gbcm-table--soft,
 *     .gbcm-table-wrap, .gbcm-panel, .gbcm-list.
 *
 * Layered last so its rules win over the prior three layers.
 * ===================================================================== */

/* --- Typography: inherit from host theme ------------------------- */
.gbcm-portal {
	--gbcm-font-display: inherit;
	--gbcm-font-body:    inherit;
	--gbcm-font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-family: inherit;
	font-size: 14.5px;
	line-height: 1.5;
}
.gbcm-portal h1,
.gbcm-portal h2,
.gbcm-portal h3,
.gbcm-portal h4 {
	font-family: inherit;
	font-weight: 600;
	letter-spacing: -0.005em;
	color: inherit;
}
.gbcm-portal h1 { font-size: 22px; line-height: 1.25; }
.gbcm-portal h2 { font-size: 17px; line-height: 1.3; }
.gbcm-portal h3 { font-size: 15px; line-height: 1.35; }
.gbcm-portal h4 { font-size: 14px; line-height: 1.4; }
.gbcm-portal__eyebrow {
	font-family: inherit;
	font-size: 11px;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--gbcm-tone-text-mute);
}

/* Mono only on technical values. */
.gbcm-portal code,
.gbcm-portal pre,
.gbcm-portal .gbcm-mono,
.gbcm-portal table.gbcm-table--soft code,
.gbcm-portal table.gbcm-table--soft td:has(> code),
.gbcm-portal .gbcm-uat-summary code,
.gbcm-portal .gbcm-balance-figure {
	font-family: var(--gbcm-font-mono);
	font-feature-settings: 'tnum';
	font-variant-numeric: tabular-nums;
}

/* --- Compact toolbar-style header ------------------------------- */
.gbcm-portal__header {
	padding: 10px 20px !important;
	min-height: 56px;
	gap: 16px !important;
	flex-wrap: wrap;
	align-items: center !important;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}
.gbcm-portal__brand {
	gap: 10px !important;
	color: rgba(255, 255, 255, 0.95);
	min-width: 0;
}
.gbcm-portal__logo { height: 28px !important; }
.gbcm-portal__brand-text {
	font-family: inherit !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	color: rgba(255, 255, 255, 0.96);
	letter-spacing: -0.005em;
	white-space: nowrap;
}
.gbcm-portal__title {
	display: inline !important;
	margin-top: 0 !important;
	margin-left: 8px !important;
	font-family: inherit !important;
	font-size: 12px !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55) !important;
	border-left: 1px solid rgba(255, 255, 255, 0.18);
	padding-left: 10px;
}

/* Active profile chip — slim horizontal toolbar module. */
.gbcm-portal__active-profile {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 10px !important;
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.16) !important;
	border-radius: 8px !important;
	padding: 4px 8px 4px 10px !important;
	margin-left: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	flex: 0 1 auto !important;
}
.gbcm-portal__active-profile-meta {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 8px !important;
	flex-wrap: nowrap;
	min-width: 0;
}
.gbcm-portal__active-profile-label {
	font-family: inherit !important;
	font-size: 10.5px !important;
	letter-spacing: 0.10em !important;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.66) !important;
	white-space: nowrap;
	font-weight: 600;
}
.gbcm-portal__active-profile-name {
	font-family: inherit !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	color: #fff !important;
	letter-spacing: 0 !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 280px;
}
.gbcm-portal__active-profile .gbcm-badge {
	font-family: inherit;
	font-size: 10px;
	padding: 2px 6px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.22);
	white-space: nowrap;
}
.gbcm-portal__active-profile-form {
	display: inline-flex;
	margin: 0;
}
.gbcm-portal__active-profile-form select {
	height: 30px !important;
	padding: 0 24px 0 8px !important;
	background: rgba(255, 255, 255, 0.92);
	color: var(--gbcm-tone-text);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 6px;
	font-family: inherit;
	font-size: 12.5px;
	min-width: 200px;
}

.gbcm-portal__user {
	display: flex;
	align-items: center;
	gap: 10px;
	color: rgba(255, 255, 255, 0.92);
}
.gbcm-portal__user-name {
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
}
.gbcm-portal__signout {
	font-size: 12px;
}

@media (max-width: 900px) {
	.gbcm-portal__active-profile { margin-left: 0 !important; flex: 1 1 100%; }
	.gbcm-portal__active-profile-meta { flex-wrap: wrap !important; }
}

/* --- Wider main: app-shell layout ------------------------------- */
.gbcm-portal__main {
	max-width: none !important;
	width: 100%;
	margin: 0;
	padding: 24px clamp(20px, 3vw, 36px) 56px !important;
}
.gbcm-portal__layout {
	max-width: none !important;
}
.gbcm-portal__sidebar {
	flex-shrink: 0;
	width: 220px;
	max-width: 220px;
}

/* Help / text-heavy pages can opt back into a readable width. */
.gbcm-portal .gbcm-page--narrow {
	max-width: 760px;
}

/* --- Standard page header pattern ------------------------------- */
.gbcm-page-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 24px;
	align-items: end;
	margin: 0 0 20px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--gbcm-tone-line);
}
.gbcm-page-header__title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gbcm-page-header__title h1 {
	font-family: inherit;
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.012em;
	line-height: 1.15;
}
.gbcm-page-header__lead {
	color: var(--gbcm-tone-text-mute);
	font-size: 14px;
	margin: 4px 0 0;
	max-width: 80ch;
}
.gbcm-page-header__lead strong { color: var(--gbcm-tone-text); font-weight: 600; }
.gbcm-page-header__actions { display: inline-flex; gap: 8px; flex-wrap: wrap; align-self: end; }
@media (max-width: 720px) {
	.gbcm-page-header { grid-template-columns: 1fr; }
}

/* Override the round-3 dashboard page-title overrides too. */
.gbcm-portal__page-title {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
	gap: 4px !important;
	margin: 0 0 20px !important;
	padding-bottom: 16px !important;
	border-bottom: 1px solid var(--gbcm-tone-line) !important;
}
.gbcm-portal__page-title h1 {
	margin: 0;
	font-family: inherit !important;
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -0.012em;
	line-height: 1.15;
}

/* --- Standard panel ------------------------------------------- */
.gbcm-portal .gbcm-panel {
	background: var(--gbcm-tone-surface);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 10px;
	padding: 20px 24px;
	box-shadow: 0 1px 1px rgba(31, 27, 22, 0.02);
}
.gbcm-portal .gbcm-panel + .gbcm-panel { margin-top: 16px; }

/* --- Toolbar (Recipients, generic search) --------------------- */
.gbcm-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: stretch;
	background: var(--gbcm-tone-surface);
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 10px;
	padding: 12px;
	margin: 0 0 16px;
}
.gbcm-toolbar__search { display: flex; min-width: 0; }
.gbcm-toolbar__search input[type="search"] {
	width: 100%;
	height: 38px;
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 8px;
	padding: 0 12px;
	background: #fff;
	color: var(--gbcm-tone-text);
	font-size: 14px;
	font-family: inherit;
}
.gbcm-toolbar__actions { display: inline-flex; gap: 8px; align-items: stretch; white-space: nowrap; }
.gbcm-toolbar__actions .gbcm-button { height: 38px; padding: 0 16px; }
@media (max-width: 720px) {
	.gbcm-toolbar { grid-template-columns: 1fr; }
}

/* --- Status / action grid (Loads page) ------------------------ */
.gbcm-status-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
	margin: 0 0 20px;
}
.gbcm-action-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 12px;
}

/* --- Lists (used inside status cards) ------------------------- */
.gbcm-portal .gbcm-list {
	margin: 8px 0 14px;
	padding: 0 0 0 18px;
	color: var(--gbcm-tone-text);
	font-size: 14px;
}
.gbcm-portal .gbcm-list li {
	margin: 4px 0;
}

/* --- Refined tables (.gbcm-table--soft) + table wrap ---------- */
.gbcm-table-wrap {
	overflow-x: auto;
	margin: 0 -24px;
	padding: 0 24px;
}
.gbcm-portal table.gbcm-table,
.gbcm-portal table.gbcm-table--soft {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 13.5px;
	font-family: inherit;
	background: transparent;
}
.gbcm-portal table.gbcm-table thead th,
.gbcm-portal table.gbcm-table--soft thead th {
	font-family: inherit;
	font-weight: 600;
	font-size: 11.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gbcm-tone-text-mute);
	text-align: left;
	padding: 10px 12px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--gbcm-tone-line);
}
.gbcm-portal table.gbcm-table tbody td,
.gbcm-portal table.gbcm-table--soft tbody td {
	padding: 12px;
	border: 0;
	border-bottom: 1px solid var(--gbcm-tone-line-soft);
	vertical-align: middle;
}
.gbcm-portal table.gbcm-table tbody tr:last-child td,
.gbcm-portal table.gbcm-table--soft tbody tr:last-child td {
	border-bottom: none;
}
.gbcm-portal table.gbcm-table tbody tr:hover td,
.gbcm-portal table.gbcm-table--soft tbody tr:hover td {
	background: var(--gbcm-tone-line-soft);
}

/* --- Cards-like cards: lighter shadow, simpler border --------- */
.gbcm-portal .gbcm-card {
	border-radius: 10px;
	box-shadow: 0 1px 1px rgba(31, 27, 22, 0.03);
}
.gbcm-portal .gbcm-card h2 { font-size: 16px; }

/* Drop the round-2 staggered-rise animation so the dashboard
 * feels stable rather than theatrical on every load. */
.gbcm-portal__grid > .gbcm-card { animation: none !important; }

/* Dashboard grid uses the full content area. */
.gbcm-portal__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 16px;
}

/* --- Buttons: keep the round-1 look but inherit fonts --------- */
.gbcm-portal .gbcm-button,
.gbcm-portal .gbcm-button--primary,
.gbcm-portal .gbcm-button--ghost,
.gbcm-portal .gbcm-button--danger {
	font-family: inherit;
	letter-spacing: 0;
}
.gbcm-portal .gbcm-button--primary::after { content: none; }

/* --- Empty state: less decorated --------------------------- */
.gbcm-portal .gbcm-empty {
	padding: 40px 24px;
}
.gbcm-portal .gbcm-empty h3 {
	font-family: inherit;
	font-size: 17px;
	font-weight: 600;
	margin: 0 0 8px;
}
.gbcm-portal .gbcm-empty > p {
	font-size: 14px;
	max-width: 56ch;
}

/* --- Form controls: inherit fonts ------------------------- */
.gbcm-portal input,
.gbcm-portal select,
.gbcm-portal textarea {
	font-family: inherit;
}

/* --- Filter bar: inherit fonts -------------------------- */
.gbcm-filter-bar input[type="search"],
.gbcm-filter-bar select {
	font-family: inherit;
}

/* --- Sidebar: keep but tighten --------------------------- */
.gbcm-portal__sidebar { padding: 16px 0; }
.gbcm-portal__nav a,
.gbcm-portal__nav button.gbcm-portal__nav-link {
	font-family: inherit;
	font-size: 13.5px;
	font-weight: 500;
	padding: 8px 14px;
	margin: 0 8px;
}

/* --- Active-profile chip: ensure horizontal on desktop --- */
@media (min-width: 901px) {
	.gbcm-portal__active-profile-meta {
		grid-template-columns: none !important;
	}
}

/* --- Notes / status text uses theme font ------------------ */
.gbcm-portal .gbcm-portal__note {
	font-family: inherit;
	font-size: 12.5px;
	color: var(--gbcm-tone-text-mute);
}

/* --- Editorial accent rails on cards: keep subtler --- */
.gbcm-portal .gbcm-card--primary::before,
.gbcm-portal .gbcm-card--accent::before {
	height: 2px;
	left: 16px;
	right: 16px;
}

/* --- Page header lead inside dashboard heading ----------- */
.gbcm-portal__page-title .gbcm-portal__eyebrow { font-size: 11px; }

/* --- Issue confirm warning: tone down -------------------- */
.gbcm-portal .gbcm-issue-confirm__warning strong {
	font-family: inherit;
	font-size: 14px;
}

/* -----------------------------------------------------------
 * Section 17.6-J — operator UI polish.
 *
 * Goals (matching the brief):
 *   - Higher contrast between page background, content surface,
 *     and inner panels (cards-on-cards).
 *   - Consistent vertical rhythm between notices, buttons, and
 *     panels — no buttons sitting flush against the next block.
 *   - Compact form rows (date / amount inputs no longer stretch
 *     to full content width).
 *   - Tabs share the same visual rhythm as the rest of the
 *     portal (font stack, accent colour, focus ring).
 *
 * No gradients, no overdesigned tone — the portal stays inside
 * the Gift Bucks / Card Manager visual direction. All rules
 * are scoped under .gbcm-portal so the host theme is unaffected.
 * --------------------------------------------------------- */

.gbcm-portal {
	--gbcm-stack-xs: 6px;
	--gbcm-stack-sm: 10px;
	--gbcm-stack-md: 16px;
	--gbcm-stack-lg: 24px;
}

.gbcm-portal__main {
	padding: 18px 22px;
	background: #f8f9fb;
}

.gbcm-portal .gbcm-card {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 18px 20px;
	margin-bottom: var(--gbcm-stack-md);
	box-shadow: 0 1px 1px rgba( 15, 23, 42, 0.04 );
}

.gbcm-portal .gbcm-card .gbcm-card {
	background: #fcfcfd;
	border-color: #e5e7eb;
	box-shadow: none;
	margin-bottom: var(--gbcm-stack-md);
}

.gbcm-portal .gbcm-card .gbcm-card .gbcm-card {
	background: #f8f9fb;
}

.gbcm-portal .gbcm-card h2,
.gbcm-portal .gbcm-card h3 {
	margin-top: 0;
	margin-bottom: var(--gbcm-stack-sm);
}

.gbcm-portal .gbcm-card > * + * {
	margin-top: var(--gbcm-stack-sm);
}

.gbcm-portal .gbcm-card > p,
.gbcm-portal .gbcm-card > dl,
.gbcm-portal .gbcm-card > table {
	margin-block: var(--gbcm-stack-sm);
}

.gbcm-portal .gbcm-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gbcm-stack-sm);
	margin-block: var(--gbcm-stack-md) var(--gbcm-stack-md);
}

.gbcm-portal .gbcm-form__row {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-block: var(--gbcm-stack-sm);
	max-width: 420px;
}

.gbcm-portal .gbcm-form__row label {
	font-weight: 500;
	font-size: 13.5px;
}

.gbcm-portal .gbcm-form__actions {
	margin-top: var(--gbcm-stack-md);
	display: flex;
	flex-wrap: wrap;
	gap: var(--gbcm-stack-sm);
}

.gbcm-portal .gbcm-form input[type="text"],
.gbcm-portal .gbcm-form input[type="date"],
.gbcm-portal .gbcm-form input[type="email"],
.gbcm-portal .gbcm-form select,
.gbcm-portal .gbcm-form textarea {
	box-sizing: border-box;
	padding: 7px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
}

.gbcm-portal .gbcm-form input[type="date"],
.gbcm-portal .gbcm-form .gbcm-date-input {
	width: 220px;
	max-width: 100%;
	cursor: pointer;
}

.gbcm-portal .gbcm-form input[type="text"][inputmode="decimal"] {
	width: 200px;
	max-width: 100%;
}

.gbcm-portal .gbcm-button + .gbcm-button {
	margin-left: 0;
}

.gbcm-portal .gbcm-table {
	margin-block: var(--gbcm-stack-md);
}

.gbcm-portal .gbcm-card--info {
	background: #eef4fb;
	border-color: #b8d2eb;
}

.gbcm-portal .gbcm-card--warn {
	background: #fff7e6;
	border-color: #f1d9a8;
}

.gbcm-portal .gbcm-card--ok {
	background: #ecf7ee;
	border-color: #b6dcc1;
}

.gbcm-portal__flash {
	margin: 0 22px var(--gbcm-stack-md) 22px;
	padding: 10px 14px;
	border-radius: 4px;
}

.gbcm-portal__flash--ok {
	background: #ecf7ee;
	color: #14532d;
	border: 1px solid #b6dcc1;
}

.gbcm-portal__flash--warn {
	background: #fff7e6;
	color: #7a4f00;
	border: 1px solid #f1d9a8;
}

.gbcm-portal .gbcm-card__back {
	margin-top: var(--gbcm-stack-lg);
}

/* Tabset polish — the inline CSS in TabSet.php carries the
 * baseline rules; this block aligns the colours to the portal
 * branding variables and tightens the panel padding. */
.gbcm-portal .gbcm-tabs { border-bottom-color: #e5e7eb; }
.gbcm-portal .gbcm-tabs__link { color: var(--gbcm-color-text); }
.gbcm-portal .gbcm-tabs__link:hover { color: var(--gbcm-color-primary); background: #f1f5f9; }
.gbcm-portal .gbcm-tabs__link.is-active {
	color: var(--gbcm-color-primary);
	border-bottom-color: var(--gbcm-color-primary);
}
.gbcm-portal .gbcm-tabs__link:focus { outline-color: var(--gbcm-color-primary); }
.gbcm-portal .gbcm-tabs__panel { padding-top: var(--gbcm-stack-md); }

/* ================================================================
 * Section 17.8-AR — Cards list polish
 *
 * Scoped to .gbcm-portal so global WordPress tables / forms /
 * notices are not affected.
 * ================================================================ */

/* Filter bar — visible labels above inputs (replaces previous
 * screen-reader-only labels) and the new field wrapper structure
 * introduced when the Type filter was dropped in 17.8-AR. */
.gbcm-portal .gbcm-filter-bar__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.gbcm-portal .gbcm-filter-bar__field-label {
	font-family: var(--gbcm-font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--gbcm-tone-text-mute);
}
.gbcm-portal .gbcm-filter-bar__field--search input[type="search"] { width: 100%; }
.gbcm-portal .gbcm-filter-bar { align-items: end; }

/* Page-header hint text underneath the primary action button. */
.gbcm-portal .gbcm-page-header__action-stack {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: flex-end;
}
.gbcm-portal .gbcm-page-header__hint {
	font-size: 12px;
	color: var(--gbcm-tone-text-mute);
	line-height: 1.4;
	max-width: 28ch;
	text-align: right;
}
.gbcm-portal .gbcm-page-header__profile {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--gbcm-tone-text-mute);
}
.gbcm-portal .gbcm-page-header__profile strong {
	color: var(--gbcm-tone-text);
	font-weight: 600;
}

/* Compact notice — replaces the loud "gbcm-card gbcm-card--warn"
 * banner that previously rendered for the full-PAN admin display
 * toggle. Calmer, full-width, but still clearly a warning. */
.gbcm-portal .gbcm-notice {
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 10px;
	padding: 10px 14px;
	margin: 0 0 var(--gbcm-space-4);
	background: var(--gbcm-tone-surface);
}
.gbcm-portal .gbcm-notice--warn {
	border-color: #e0b66a;
	background: #fff8e6;
	color: #5a3d00;
}
.gbcm-portal .gbcm-notice__heading {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.45;
}
.gbcm-portal .gbcm-notice__meta {
	margin: 4px 0 0;
	font-size: 12px;
	color: rgba(90, 61, 0, 0.85);
}

/* Table wrap — horizontal scroll on narrow viewports, scoped so
 * other WP tables in admin pages are not affected. */
.gbcm-portal .gbcm-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.gbcm-portal .gbcm-table--cards { min-width: 920px; }

/* Right-aligned numeric cell (balance column). */
.gbcm-portal .gbcm-table__cell--right {
	text-align: right;
	white-space: nowrap;
}

/* Filtered no-results variant — slightly subdued vs. the
 * "no cards yet" empty-profile state. */
.gbcm-portal .gbcm-empty--filtered {
	padding: var(--gbcm-space-6) var(--gbcm-space-5);
}

/* Filter-bar grid recalibration: with the Type filter removed,
 * give the search field a touch more room. */
.gbcm-portal .gbcm-filter-bar {
	grid-template-columns: minmax(0, 2.6fr) minmax(0, 1.4fr) auto;
}
@media (max-width: 900px) {
	.gbcm-portal .gbcm-filter-bar {
		grid-template-columns: 1fr;
	}
	.gbcm-portal .gbcm-page-header__hint { text-align: left; max-width: 100%; }
	.gbcm-portal .gbcm-page-header__action-stack { align-items: flex-start; }
}

/* ============================================================
 * Section 17.8-AU — Check Authorisation/Load page polish.
 * ============================================================ */

/* The check-load table carries 8 columns — give it a sensible
 * minimum width inside .gbcm-table-wrap so it scrolls cleanly
 * rather than crushing the columns on narrow viewports. */
.gbcm-portal .gbcm-table--check-load { min-width: 1040px; }

/* Plain-language helper above the table. */
.gbcm-portal .gbcm-check-load__intro {
	margin: var(--gbcm-space-4) 0 var(--gbcm-space-2);
	color: var(--gbcm-color-text);
}
.gbcm-portal .gbcm-check-load__caveat {
	margin: 0 0 var(--gbcm-space-4);
}

/* Row action cell — compact and top-aligned so the row height is
 * driven by the data columns, never by tall stacked buttons. */
.gbcm-portal .gbcm-table__cell--actions {
	vertical-align: top;
	white-space: nowrap;
}

/* The two check actions sit side-by-side and wrap only when the
 * viewport is genuinely too narrow. */
.gbcm-portal .gbcm-row-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gbcm-space-2);
	align-items: center;
}
.gbcm-portal .gbcm-row-actions .gbcm-form,
.gbcm-portal .gbcm-row-actions .gbcm-form--inline {
	margin: 0;
}
.gbcm-portal .gbcm-row-actions .gbcm-button--small {
	white-space: nowrap;
}

/* Card-detail Manage Card Funds — pointer to the central
 * Check Authorisation/Load page. */
.gbcm-portal .gbcm-card-funds__check-link {
	margin-top: var(--gbcm-space-4);
}

/* ============================================================
 * Section 17.8-AV — Check Authorisation/Load table readability.
 * ============================================================ */

/* The base .gbcm-table rule shades any cell that contains a
 * <code> element (td:has(code)) — on a table with code in some
 * columns but not others that reads as detached column blocks.
 * For the Check Authorisation/Load table, neutralise that
 * cell-level shading and the <code> pill so every cell sits on
 * one clean surface, then apply readable row-level zebra
 * striping instead. Scoped to .gbcm-table--check-load — other
 * portal tables and all wp-admin tables are untouched. */
.gbcm-portal table.gbcm-table--check-load td:has(code) {
	background: transparent;
	padding: 12px;
	border-radius: 0;
}
.gbcm-portal table.gbcm-table--check-load td code {
	background: transparent;
	padding: 0;
	border-radius: 0;
}

/* Row-level zebra striping — whole rows, never individual
 * cells, so columns never look like separate blocks. */
.gbcm-portal table.gbcm-table--check-load tbody tr:nth-child(even) td {
	background: var(--gbcm-tone-surface-2);
}
.gbcm-portal table.gbcm-table--check-load tbody tr:hover td {
	background: var(--gbcm-tone-line-soft);
}

/* ============================================================
 * Section 17.8-AW — Statement tab signed amounts + running
 * balance. Scoped to .gbcm-table--statement so no other portal
 * or wp-admin table is affected.
 * ============================================================ */

/* Amount + Balance are numeric columns — right-align the header
 * and cells and keep tabular figures so values line up cleanly. */
.gbcm-portal table.gbcm-table--statement th.gbcm-cell--amount,
.gbcm-portal table.gbcm-table--statement td.gbcm-cell--amount {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Signed movement colours — credit positive (green), debit
 * negative (red). The neutral class keeps the default text
 * colour for an unknown movement direction. */
.gbcm-portal .gbcm-amount--credit  { color: var(--gbcm-tone-positive); }
.gbcm-portal .gbcm-amount--debit   { color: var(--gbcm-tone-danger); }
.gbcm-portal .gbcm-amount--neutral { color: inherit; }

/* Row-level zebra striping — whole rows, never single cells, so
 * the columns never read as detached blocks. */
.gbcm-portal table.gbcm-table--statement tbody tr:nth-child(even) td {
	background: var(--gbcm-tone-surface-2);
}
.gbcm-portal table.gbcm-table--statement tbody tr:hover td {
	background: var(--gbcm-tone-line-soft);
}

/* Reconciliation notice — compact, warning-toned. */
.gbcm-portal .gbcm-statement-reconcile-note {
	color: var(--gbcm-tone-warning);
}

/* ============================================================
 * Section 17.8-BH — Statement totals panel. The credit / debit /
 * net / Paymentology-balance figures moved out of the old in-
 * table <tfoot> (large empty spreadsheet cells) into this compact
 * card grid, visually separate from the transaction table.
 * Scoped to .gbcm-portal.
 * ============================================================ */
.gbcm-portal .gbcm-statement-totals {
	margin-top: 14px;
}
.gbcm-portal .gbcm-statement-totals__heading {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: rgba(31, 41, 51, 0.65);
}

/* Responsive grid — four compact cells on desktop, wrapping down
 * to one column on a narrow screen. No big empty table cells. */
.gbcm-portal .gbcm-statement-totals__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}
@media (max-width: 720px) {
	.gbcm-portal .gbcm-statement-totals__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 420px) {
	.gbcm-portal .gbcm-statement-totals__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Each cell — a quiet label above a tabular-figure value. */
.gbcm-portal .gbcm-statement-totals__item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px 12px;
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 8px;
	background: var(--gbcm-tone-surface-2);
}
.gbcm-portal .gbcm-statement-totals__label {
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: rgba(31, 41, 51, 0.55);
}
.gbcm-portal .gbcm-statement-totals__value {
	font-size: 16px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Paymentology balance — the authoritative final figure, given a
 * stronger frame so it reads as the bottom line. */
.gbcm-portal .gbcm-statement-totals__item--final {
	border-color: var(--gbcm-color-secondary);
	border-width: 2px;
	background: #fff;
}
.gbcm-portal .gbcm-statement-totals__item--final .gbcm-statement-totals__value {
	font-size: 18px;
	font-weight: 700;
}

/* ============================================================
 * Section 17.8-BB — Transfer Funds: Source + Target side by side.
 * Scoped to .gbcm-portal so no wp-admin or theme table is touched.
 * ============================================================ */

/* Source + Target sit next to each other on desktop / tablet and
 * stack on narrow screens. */
.gbcm-portal .gbcm-transfer-pair {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0 0 12px;
}
.gbcm-portal .gbcm-transfer-pair__col {
	flex: 1 1 280px;
	min-width: 0;
	margin: 0;
}

/* Soften the fieldset frame — a calm 1px line + rounded corners
 * instead of the browser-default heavy groove / dotted border. */
.gbcm-portal .gbcm-transfer-pair .gbcm-form__fieldset {
	border: 1px solid var(--gbcm-tone-line);
	border-radius: 8px;
	padding: 12px 14px;
}
.gbcm-portal .gbcm-transfer-pair .gbcm-form__fieldset legend {
	font-weight: 600;
	padding: 0 6px;
}

/* Mobile / narrow — stack Source above Target. */
@media (max-width: 640px) {
	.gbcm-portal .gbcm-transfer-pair {
		flex-direction: column;
	}
	.gbcm-portal .gbcm-transfer-pair__col {
		flex: 1 1 auto;
	}
}

/* ============================================================
 * Section 17.8-BC — Recipients detail, edit and linked cards.
 * Scoped to .gbcm-portal so no wp-admin or theme rule is touched.
 * ============================================================ */

/* Recipients list — the Actions cell keeps View / Edit / Reveal
 * on one tidy row. The Reveal control is a tiny inline <form>, so
 * it must not break the flow layout the buttons sit in. */
.gbcm-portal .gbcm-recipients__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.gbcm-portal .gbcm-recipients__reveal-form,
.gbcm-portal .gbcm-recipient-detail__reveal {
	display: inline;
	margin: 0;
}
.gbcm-portal .gbcm-recipient-detail__reveal {
	display: inline-block;
	margin-left: 8px;
}

/* The "N cards" count is a link, not a passive badge. */
.gbcm-portal .gbcm-recipients__cards-link {
	font-weight: 600;
	text-decoration: underline;
}

/* A just-revealed ID / passport value — a calm highlight so the
 * operator can see it stands apart from the masked default. */
.gbcm-portal .gbcm-recipients__revealed code {
	background: rgba(245, 197, 66, 0.18);
	padding: 2px 6px;
	border-radius: 4px;
}

/* Recipient detail — section heading with a right-aligned primary
 * action (Edit recipient / Cancel). */
.gbcm-portal .gbcm-recipient-detail__head {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 12px;
}
.gbcm-portal .gbcm-recipient-detail__head h2 {
	margin: 0;
}

/* Edit form — reuses the shared .gbcm-form__row grid; just give
 * the form a little breathing room under the heading. */
.gbcm-portal .gbcm-recipient-edit {
	margin-top: 4px;
}

/* Mobile / narrow — stack the heading + action and let the
 * Actions cell wrap naturally. */
@media (max-width: 640px) {
	.gbcm-portal .gbcm-recipient-detail__head {
		align-items: flex-start;
	}
	.gbcm-portal .gbcm-recipients__actions {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ============================================================
 * Section 17.8-BF — required / optional form field markers.
 * Scoped to .gbcm-portal so no wp-admin or theme label is
 * touched. The asterisk is decorative (aria-hidden); the word
 * carries the meaning for assistive tech.
 * ============================================================ */
.gbcm-portal .gbcm-field-flag {
	display: inline;
	margin-left: 6px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: baseline;
}
.gbcm-portal .gbcm-field-flag--req .gbcm-field-flag__star {
	color: #c0341d;
	font-weight: 700;
	margin-right: 3px;
}
.gbcm-portal .gbcm-field-flag--req .gbcm-field-flag__word {
	color: #c0341d;
}
.gbcm-portal .gbcm-field-flag--opt {
	color: rgba(31, 41, 51, 0.50);
	font-weight: 500;
}
