/**
 * Leader administration (TSK-21121): the Users tab, the bulk bar and the
 * confirmation dialog. Loaded on top of group-leader-dashboard.css and built
 * from the same --scorm-* variables. Layout and wording follow
 * docs/specs/2026-10-09-leader-admin-users-reports-prototype.html.
 *
 * Naming: .gld-users-* belongs to the Users tab, .gld-modal / .gld-scrim to the
 * dialog, the rest (.gld-field, .gld-pill, .gld-chip, .gld-state, .gld-meter,
 * .gld-meta, .gld-confirm, .gld-panel) are shared building blocks for the
 * views added later.
 */

.scorm-leader-dashboard [hidden],
.gld-modal[hidden],
[data-gld-dialog][hidden] { display: none !important; }

.gld-meta { color: var(--scorm-muted-text-color, #64748b); font-size: 13px; }
.gld-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.gld-field {
	padding: 8px 10px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 8px;
	background: var(--scorm-surface-color, #fff);
	color: inherit;
	font: inherit;
	font-size: 14px;
	max-width: 100%;
}
.gld-btn-quiet {
	background: none;
	border: 1px solid transparent;
	color: var(--scorm-muted-text-color, #64748b);
	padding: 6px 10px;
}
.gld-btn-quiet:hover { color: var(--scorm-heading-color, #1e293b); border-color: var(--scorm-border-color, #d4d4d8); }
.gld-linkish {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-align: left;
	font: inherit;
	font-weight: 600;
	color: var(--scorm-heading-color, #1e293b);
}
.gld-linkish:hover { color: var(--scorm-primary-color, #3b82f6); text-decoration: underline; }
.scorm-leader-dashboard .gld-users-table td.gld-col-open { cursor: pointer; }
.gld-linkish-static { font-weight: 600; color: var(--scorm-heading-color, #1e293b); }
.gld-panel {
	background: var(--scorm-surface-color, #fff);
	border: 1px solid var(--scorm-border-color, #e4e4e7);
	border-radius: 12px;
}
.gld-scroll { overflow-x: auto; }

/* Toolbar and filters */
.gld-users-view { padding-bottom: 120px; }
.gld-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.gld-filter {
	padding: 5px 12px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 999px;
	background: var(--scorm-surface-color, #fff);
	color: inherit;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}
.gld-filter[aria-pressed="true"] {
	background: var(--scorm-heading-color, #1e293b);
	border-color: var(--scorm-heading-color, #1e293b);
	color: var(--scorm-surface-color, #fff);
}

/* Table
 * Shared by the Users tab, the course roster (both .gld-users-table) and the Reports
 * preview (.gld-reports-table). Themes style bare table, th, td and a elements with grid
 * borders, margins and underlines, so every side is reset explicitly here and the
 * selectors outrank typical theme rules such as ".entry-content table td". */
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) {
	width: 100%;
	min-width: 640px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-spacing: 0;
	background: transparent;
	box-shadow: none;
	color: var(--scorm-text-color, #3f3f46);
	font-size: 14px;
	line-height: 1.4;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) thead,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tbody,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tr,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tr:nth-child(n),
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) th,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td {
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) th,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--scorm-border-color, #e2e8f0);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	transition: background-color 0.12s ease;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) thead th {
	padding: 10px 16px;
	background: var(--scorm-surface-muted-color, #f8fafc);
	color: var(--scorm-muted-text-color, #64748b);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tbody tr:last-child td { border-bottom: 0; }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tbody tr:hover td:not([colspan]) { background: var(--scorm-surface-muted-color, #f8fafc); }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tbody tr.is-selected td:not([colspan]) { background: #e6eefb; }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) tbody tr.is-selected:hover td:not([colspan]) { background: #dbe7f8; }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td.gld-meta {
	padding: 28px 16px;
	color: var(--scorm-muted-text-color, #64748b);
	text-align: center;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-col-check {
	box-sizing: border-box;
	width: 44px;
	padding-left: 16px;
	padding-right: 0;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-col-check input[type="checkbox"] {
	display: block;
	margin: 0;
	accent-color: var(--scorm-primary-color, #2f6fb3);
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td.gld-num { color: var(--scorm-text-color, #3f3f46); }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table)[aria-busy="true"] tbody { opacity: 0.6; }

/* Name and e-mail: the name is a button (Users) or a link (Reports, roster) */
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish:visited,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish-static {
	display: inline-block;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: none;
	box-shadow: none;
	color: var(--scorm-heading-color, #1e293b);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: normal;
	text-align: left;
	text-decoration: none;
	text-transform: none;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish { cursor: pointer; transition: color 0.12s ease; }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish:hover,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish:focus {
	background: none;
	box-shadow: none;
	color: var(--scorm-primary-color, #2f6fb3);
	text-decoration: none;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td > div.gld-meta {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.35;
	min-width: 160px;
	overflow-wrap: break-word;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish:focus-visible,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) input[type="checkbox"]:focus-visible,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill button:focus-visible,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill-add:focus-visible {
	outline: 2px solid var(--scorm-primary-color, #2f6fb3);
	outline-offset: 2px;
}
/* A sortable column header (#728, and the Reports table): the whole label is the button; the arrow follows aria-sort. */
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) thead th .gld-sort {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: none;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) thead th .gld-sort:hover,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) thead th[aria-sort] .gld-sort {
	background: none;
	color: var(--scorm-heading-color, #1e293b);
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) thead th .gld-sort:focus-visible {
	outline: 2px solid var(--scorm-primary-color, #2f6fb3);
	outline-offset: 2px;
}
:is(.gld-users-table, .gld-reports-table) .gld-sort-icon {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	opacity: 0.35;
}
:is(.gld-users-table, .gld-reports-table) th[aria-sort] .gld-sort-icon { opacity: 1; }
:is(.gld-users-table, .gld-reports-table) th[aria-sort="ascending"] .gld-sort-icon {
	border-top: 0;
	border-bottom: 5px solid currentColor;
}
/* A short extension value (a phone or card number) stays on one line instead of breaking at every space. */
.scorm-leader-dashboard .gld-panel table.gld-reports-table td.gld-rep-short { white-space: nowrap; }

/* Active time (#772): H:MM:SS on one line, and a round marker when it is under the expected minimum. */
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td.gld-active-time { white-space: nowrap; }
.gld-active-under {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fffaeb;
	color: #b54708;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	vertical-align: middle;
	cursor: help;
}
.scorm-leader-dashboard .screen-reader-text:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gld-invite-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.gld-invite-actions .gld-btn { padding: 3px 8px; font-size: 13px; }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-invite-actions .gld-btn,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-confirm .gld-btn {
	box-shadow: none;
	letter-spacing: normal;
	text-transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) th,
	.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) td,
	.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-linkish { transition: none; }
}

/* Chips
 * Group chips in the tables: .gld-chip (read-only), .gld-pill (with a remove button) and
 * .gld-pill-add (the dashed add chip and the menu choices). Same look in every table. */
.gld-chipset { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gld-chip-menu { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--scorm-border-color, #e2e8f0); }
/* Outside the tables (the Reports filter summary) a chip keeps the plain pill look. */
.gld-chip {
	display: inline-flex;
	align-items: center;
	padding: 1px 9px;
	border-radius: 999px;
	background: var(--scorm-surface-muted-color, #f1f3f6);
	font-size: 13px;
	white-space: nowrap;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-chipset { max-width: 360px; }
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-chip,
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill {
	box-sizing: border-box;
	max-width: 200px;
	margin: 0;
	border: 0;
	border-radius: 6px;
	background: #f1f5f9;
	color: #334155;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-chip {
	display: inline-block;
	padding: 2px 8px;
	overflow: hidden;
	text-overflow: ellipsis;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px 3px 2px 8px;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill > span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill button {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: none;
	box-shadow: none;
	color: #64748b;
	font: inherit;
	font-size: 15px;
	line-height: 1;
	text-transform: none;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill button:hover {
	background: #e2e8f0;
	color: var(--scorm-heading-color, #1e293b);
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill-add {
	display: inline-block;
	box-sizing: border-box;
	max-width: 200px;
	margin: 0;
	padding: 1px 8px;
	overflow: hidden;
	border: 1px dashed #cbd5e1;
	border-radius: 6px;
	background: none;
	box-shadow: none;
	color: var(--scorm-muted-text-color, #64748b);
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	text-overflow: ellipsis;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-panel table:is(.gld-users-table, .gld-reports-table) .gld-pill-add:hover {
	background: none;
	border-color: var(--scorm-primary-color, #2f6fb3);
	color: var(--scorm-primary-color, #2f6fb3);
}

/* Status badges and progress */
.gld-state {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.gld-state-done { background: #ecfdf3; color: #067647; }
.gld-state-started { background: #eff6ff; color: #1d4ed8; }
.gld-state-none { background: #f1f5f9; color: #475569; }
.gld-state-inv { background: #fffaeb; color: #b54708; }
.gld-meter { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.gld-meter i { flex: 0 0 96px; display: block; width: 96px; height: 6px; border-radius: 999px; background: var(--scorm-border-color, #e2e8f0); overflow: hidden; }
.gld-meter b { display: block; height: 100%; background: var(--scorm-primary-color, #2f6fb3); border-radius: 999px; }
.gld-meter span { flex: 0 0 44px; font-size: 13px; line-height: 1; font-variant-numeric: tabular-nums; text-align: right; }

/* Inline confirmation */
.gld-confirm {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #fdf1d8;
	color: #7a4d05;
	font-size: 14px;
}
.gld-confirm > div { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pager */
.gld-users-groupnote { margin: 4px 0 12px; }
.gld-users-pager { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.gld-users-pager .gld-meta { margin-right: auto; }

/* Bulk bar. It sits above a theme's fixed footer or cookie bar but below the dialogs and drawers.
   A site with its own bar at the bottom lifts it with --gld-bulk-bottom. */
.gld-users-bulk {
	position: fixed;
	left: 50%;
	bottom: var(--gld-bulk-bottom, 16px);
	transform: translateX(-50%);
	z-index: 100010;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
	align-items: center;
	width: max-content;
	max-width: calc(100vw - 24px);
	padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
	border-radius: 14px;
	background: var(--scorm-heading-color, #1b2433);
	color: #fff;
	font-size: 14px;
	box-shadow: 0 10px 30px rgba(10, 20, 40, 0.3);
}
.gld-users-bulk strong { font-variant-numeric: tabular-nums; }
/* The attribute selector outranks a theme's own `.gld-btn-outline` / select rules, which would paint the
   buttons in the bar's own colour or stretch the select to full width. */
.gld-users-bulk[data-gld-users-bulk] .gld-field,
.gld-users-bulk[data-gld-users-bulk] .gld-btn {
	width: auto;
	max-width: 100%;
	min-height: 0;
	margin: 0;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}
.gld-users-bulk[data-gld-users-bulk] .gld-field { max-width: 16rem; border-radius: 8px; }
.gld-users-bulk[data-gld-users-bulk] [hidden] { display: none; }
.gld-users-bulk .gld-field option { color: #1b2433; }
.gld-users-bulk[data-gld-users-bulk] .gld-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: #fff; }
.gld-users-bulk[data-gld-users-bulk] .gld-btn:disabled { opacity: 0.5; }
.gld-users-bulk-note { flex-basis: 100%; font-size: 13px; }
/* Room under the table, so the bar never covers the last rows or the pager. */
.gld-users-view:has(.gld-users-bulk:not([hidden])) { padding-bottom: calc(96px + var(--gld-bulk-bottom, 16px)); }

/* Overlays (toast, dialog, drawers) sit above the theme header and the WP admin bar
   (z-index 99999), so a sticky or tall header never hides their top. */
/* Toast */
.gld-users-toast {
	position: fixed;
	left: 50%;
	top: 16px;
	transform: translateX(-50%);
	z-index: 100030;
	width: max-content;
	max-width: calc(100vw - 32px);
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--scorm-heading-color, #1b2433);
	color: #fff;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(10, 20, 40, 0.25);
}

/* Dialog */
.gld-scrim { position: fixed; inset: 0; z-index: 100024; background: rgba(15, 22, 35, 0.4); }
.gld-modal {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 100025;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 480px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	padding: 22px 24px;
	border: 1px solid var(--scorm-border-color, #e4e4e7);
	border-radius: 14px;
	background: var(--scorm-surface-color, #fff);
	box-shadow: 0 20px 50px rgba(10, 20, 40, 0.3);
}
.gld-modal p,
.gld-modal ul { margin: 0; }
.gld-modal ul { padding-left: 20px; }
.gld-modal-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--scorm-heading-color, #1e293b); }
.gld-modal-body { display: flex; flex-direction: column; gap: 12px; }
.gld-modal-error { margin: 0; padding: 10px 12px; border-radius: 8px; background: #fde8e8; color: #9b1c1c; font-size: 14px; }
.gld-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gld-mailopt { display: flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }

.gld-users-view :focus-visible,
.gld-modal :focus-visible { outline: 2px solid var(--scorm-primary-color, #3b82f6); }

@media (max-width: 640px) {
	.gld-users-bulk { border-radius: 12px; }
}

/* Person panel (a drawer from the right) */
.gld-drawer-scrim { position: fixed; inset: 0; z-index: 100020; background: rgba(15, 22, 35, 0.4); }
.gld-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 100021;
	display: flex;
	flex-direction: column;
	gap: 18px;
	width: 440px;
	max-width: 100vw;
	padding: calc(20px + env(safe-area-inset-top, 0px)) 22px calc(24px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
	border-left: 1px solid var(--scorm-border-color, #e4e4e7);
	background: var(--scorm-surface-color, #fff);
}
.gld-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.gld-drawer-title { margin: 0; font-size: 20px; font-weight: 800; color: var(--scorm-heading-color, #1e293b); }
.gld-drawer-body { display: flex; flex-direction: column; gap: 18px; }
.gld-drawer-section { display: flex; flex-direction: column; gap: 8px; }
.gld-drawer-section h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--scorm-heading-color, #1e293b); }
.gld-grow-list { display: flex; flex-direction: column; }
.gld-grow-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid var(--scorm-border-color, #e4e4e7);
}
/* A sub-group sits under its parent's label; the parent row carries the expand toggle. */
.gld-grow-item.is-sub { padding-left: 30px; }
.gld-grow-toggle {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	min-height: 0;
	border-radius: 4px;
	background: transparent;
	box-shadow: none;
	color: var(--scorm-muted-text-color, #64748b);
	line-height: 1;
	cursor: pointer;
}
button.gld-grow-toggle::before {
	content: '';
	width: 6px;
	height: 6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.15s;
}
button.gld-grow-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
button.gld-grow-toggle:hover { background: rgba(47, 111, 179, 0.1); }
.gld-grow-subs[hidden] { display: none; }
.gld-grow-item label { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.gld-crow {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid var(--scorm-border-color, #e4e4e7);
}
.gld-crow > div { min-width: 0; }
.gld-crow-title { font-weight: 600; }
.gld-crow-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.gld-crow-actions .gld-btn { padding: 3px 10px; font-size: 13px; text-decoration: none; }
.gld-pfields { margin-top: 8px; }
.gld-pfields-list { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; font-size: 13px; }
.gld-pfields-list dt { color: var(--scorm-muted-text-color, #64748b); }
.gld-pfields-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.gld-pfields-list dd.gld-pfield-ok { color: #15803d; font-weight: 600; }
.gld-pnote { margin-top: 8px; padding: 8px 10px; border: 1px solid #b45309; border-radius: 6px; background: #fffbeb; font-size: 13px; }
.gld-pmeta-warning { color: #b45309; }
.gld-drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gld-drawer :focus-visible { outline: 2px solid var(--scorm-primary-color, #3b82f6); }

/* Course roster */
.gld-course-roster-link { color: inherit; text-decoration: none; }
.gld-course-roster-link:hover { color: var(--scorm-primary-color, #3b82f6); text-decoration: underline; }
.gld-course-preview { display: inline-block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--scorm-primary-color, #3b82f6); text-decoration: none; }
.gld-course-preview:hover { text-decoration: underline; }
.gld-roster-title { margin: 0 0 12px; font-size: 17px; font-weight: 800; color: var(--scorm-heading-color, #1e293b); }
.gld-roster-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.gld-stat { flex: 1 1 150px; padding: 14px 18px; }
.gld-stat strong {
	display: block;
	font-size: 26px;
	font-weight: 900;
	line-height: 1.2;
	color: var(--scorm-heading-color, #1e293b);
	font-variant-numeric: tabular-nums;
}
.gld-roster-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.gld-roster-spacer { flex: 1 1 auto; }
.gld-roster-table { min-width: 560px; }
.gld-roster-view :focus-visible { outline: 2px solid var(--scorm-primary-color, #3b82f6); }

/* Compose panel (a drawer above the person panel, or inline in a group page tab) */
.gld-mail-scrim { z-index: 100022; }
.gld-mail { z-index: 100023; }
.gld-mail-inline .gld-mail-form { max-width: 640px; }
.gld-mail [hidden],
.gld-mail-inline [hidden] { display: none !important; }
.gld-mail .gld-field,
.gld-mail-inline .gld-mail-form .gld-field { width: 100%; box-sizing: border-box; }
.gld-mail textarea.gld-field,
.gld-mail-inline textarea.gld-field { resize: vertical; line-height: 1.5; }
.gld-mail-preview {
	padding: 14px 16px;
	border-radius: 10px;
	background: var(--scorm-surface-muted-color, #f1f3f6);
	font-size: 14px;
	white-space: pre-wrap;
}
.gld-mail :focus-visible,
.gld-mail-inline :focus-visible { outline: 2px solid var(--scorm-primary-color, #3b82f6); }

/* Reports tab (TSK-21121) */
.gld-reports-view { padding-bottom: 48px; }
.gld-reports-read { margin-bottom: 10px; }
.gld-reports-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.gld-reports-chart { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gld-reports-chart h3 { margin: 0; font-size: 16px; }
.gld-reports-canvas { position: relative; height: 180px; margin-top: 8px; }
.gld-reports-hbars { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.gld-reports-hbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 90px 64px;
	gap: 10px;
	align-items: center;
	background: none;
	border: none;
	padding: 5px 6px;
	margin-inline: -6px;
	border-radius: 6px;
	cursor: pointer;
	text-align: left;
	font: inherit;
	font-size: 14px;
	color: inherit;
}
.gld-reports-hbar:hover { background: var(--scorm-background-color, #f4f4f5); }
.gld-reports-hl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gld-reports-hbar i { display: block; height: 8px; border-radius: 4px; background: var(--scorm-background-color, #f4f4f5); overflow: hidden; }
.gld-reports-hbar b { display: block; height: 100%; background: var(--scorm-primary-color, #2f6fb3); border-radius: 4px; }
.scorm-leader-dashboard .gld-reports-hs { grid-column: 1 / -1; font-size: 12px; text-align: right; }
.gld-reports-hv { font-size: 13px; color: var(--scorm-muted-text-color, #64748b); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Groups tab: tree of rows (top-level groups, sub-groups indented under them) */
.gld-tree { display: flex; flex-direction: column; gap: 12px; }
.gld-tree-node {
	background: var(--scorm-surface-color, #fff);
	border: 1px solid var(--scorm-border-color, #e4e4e7);
	border-radius: 12px;
	transition: border-color 0.2s, box-shadow 0.2s;
}
/* Hovering a top-level row outlines the whole box, like the group cards on the overview. */
.gld-tree-node:has(> .gld-tree-row:hover),
.gld-tree-node:has(> .gld-tree-row :focus-visible) {
	border-color: var(--scorm-primary-color, #3b82f6);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--scorm-primary-color, #3b82f6);
}
.gld-tree-row[hidden],
.gld-tree-children[hidden] { display: none; }
.gld-tree-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 14px 16px; }
.gld-tree-toggle,
.gld-tree-toggle-gap { flex: 0 0 30px; width: 30px; }
.gld-tree-toggle { padding: 4px 0; justify-content: center; }
.gld-tree-toggle svg { transition: transform 0.15s; }
.gld-tree-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.gld-tree-row .gld-card {
	flex: 1 1 320px;
	min-width: 0;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	background: transparent;
	border: 0;
	border-radius: 8px;
	box-shadow: none;
	transform: none;
	overflow: visible;
}
.gld-tree-row .gld-card:hover { box-shadow: none; transform: none; }
/* The tree node already draws the single hover frame (.gld-tree-node:has(> .gld-tree-row:hover)),
   so the inner link must never paint its own. A host theme that styles `.gld-card:hover`
   with a border/box-shadow, e.g. `body .scorm-leader-dashboard .gld-card:hover` (0,3,1), beats
   the (0,3,0) reset above and draws a second, rounded frame inside the first. This rule
   is (0,4,0) and wins either way. Keyboard focus is untouched: :focus-visible keeps its
   outline from `.gld-tree-row :focus-visible`. */
.scorm-leader-dashboard .gld-tree-row > a.gld-card:hover,
.scorm-leader-dashboard .gld-tree-row > a.gld-card:focus:not(:focus-visible) {
	border-color: transparent;
	box-shadow: none;
	transform: none;
}
.gld-tree-row .gld-card:hover h3 { color: var(--scorm-primary-color, #3b82f6); text-decoration: underline; }
.gld-tree-row > a.gld-card,
.entry-content .gld-tree-row > a.gld-card { text-decoration: none; }
.gld-tree-name { flex: 1 1 200px; min-width: 0; }
.gld-tree-name h3 { margin: 0; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.gld-tree-stats { display: flex; flex-wrap: wrap; gap: 6px; font-variant-numeric: tabular-nums; }
.gld-tree-stats .gld-mini-stat { flex: 0 0 auto; min-width: 88px; padding: 8px 12px; }
.gld-tree-stats .gld-mini-value { font-size: 17px; font-weight: 700; }
.gld-tree-stats .gld-mini-label { font-size: 12px; letter-spacing: 0.04em; margin-top: 2px; }
/* Completion data in green: finished learners, and progress once most of the group is through. */
.gld-tree-stats .gld-mini-stat-green { background: #ecfdf3; border-color: #bbf7d0; }
.gld-tree-stats .gld-mini-stat-green .gld-mini-value { color: #047857; }
.gld-tree-row .gld-bar { flex: 0 0 100%; height: 8px; border-radius: 4px; }
.gld-tree-row .gld-bar-fill { border-radius: 4px; }
.gld-tree-count { white-space: nowrap; }
.gld-tree-open { text-decoration: none; }
.gld-tree-children { margin: 0 16px 14px 30px; padding-left: 16px; border-left: 2px solid var(--scorm-border-color, #e4e4e7); }
.gld-tree-label {
	margin: 0;
	padding: 2px 16px 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--scorm-muted-text-color, #64748b);
}
.gld-tree-children .gld-tree-row { border-top: 1px solid var(--scorm-border-color, #e4e4e7); padding-block: 10px; }
.gld-tree-children .gld-tree-row { transition: background-color 0.15s, box-shadow 0.15s; }
.gld-tree-children .gld-tree-row:hover { background: var(--scorm-surface-muted-color, #fafafa); box-shadow: inset 0 0 0 1px var(--scorm-primary-color, #3b82f6); border-radius: 8px; }
.gld-tree-children .gld-tree-name h3 { font-size: 15px; font-weight: 600; }
.gld-tree-row :focus-visible,
.gld-rename-form :focus-visible,
.gld-detail-header .gld-rename:focus-visible { outline: 2px solid var(--scorm-primary-color, #3b82f6); outline-offset: 2px; }

/* Inline rename (tree row and group page header) */
.gld-rename-form { flex: 1 1 280px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.gld-rename-input { flex: 1 1 200px; min-width: 0; font-weight: 800; font-size: 17px; }
.gld-rename-error { flex-basis: 100%; color: #b91c1c; font-size: 13px; }
.gld-rename-error:empty { display: none; }
.gld-detail-header h2 .gld-rename { vertical-align: middle; margin-left: 6px; }

/* New group: toolbar above the tree, status message, form fields */
.gld-tree-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.gld-tree-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.gld-tree-notice { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #e7f6ec; color: #14532d; font-size: 14px; }
.gld-drawer .gld-field { width: 100%; box-sizing: border-box; }
.gld-drawer .gld-rename-error { color: #b91c1c; font-size: 13px; }
.gld-drawer .gld-rename-error:empty { display: none; }

/* Add participants / add to several groups (TSK-21282) */
.gld-users-view .gld-hero--actions {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 16px;
}
.gld-steps {
	display: flex;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--scorm-muted-text-color, #64748b);
}
.gld-steps li { display: flex; align-items: center; gap: 6px; }
.gld-steps b {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	font-size: 12px;
}
.gld-steps li[aria-current="step"] { color: var(--scorm-heading-color, #1e293b); font-weight: 700; }
.gld-steps li[aria-current="step"] b { background: var(--scorm-primary-color, #3b82f6); border-color: var(--scorm-primary-color, #3b82f6); color: #fff; }
.gld-steps li.is-done b { background: var(--scorm-heading-color, #1e293b); border-color: var(--scorm-heading-color, #1e293b); color: #fff; }
.gld-field-row { display: flex; flex-direction: column; gap: 6px; }
.gld-field-row label { font-weight: 600; font-size: 14px; }
.gld-addtext { width: 100%; box-sizing: border-box; resize: vertical; }
.gld-addcount { align-self: center; margin-right: auto; }
.gld-addwho { display: flex; flex-direction: column; gap: 6px; }
.gld-addwho__warn { color: #9b1c1c; font-size: 14px; }
.gld-addgroups { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.gld-addgroups legend { padding: 0; }
.gld-addgroup {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 4px 10px;
	padding: 10px 12px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 10px;
	cursor: pointer;
}
.gld-addgroup.is-short { border-color: #b45309; background: #fffbeb; }
.gld-addgroup.is-disabled { opacity: 0.6; cursor: not-allowed; }
.gld-addgroup__text { display: flex; flex-direction: column; min-width: 0; }
.gld-addgroup__left { font-size: 13px; color: var(--scorm-muted-text-color, #64748b); }
.gld-addgroup__warn { grid-column: 1 / -1; color: #92400e; font-size: 13px; }
.gld-addplan { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
.gld-addplan li { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; }
.gld-addplan li.is-short .gld-addgroup__warn { grid-column: auto; }

/* Language badges and the sharpened person panel (TSK-21369) */
.gld-lang-badges { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.gld-lang-badge { display: inline-block; padding: 0 6px; border: 1px solid #cbd5e1; border-radius: 4px; background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 600; line-height: 18px; letter-spacing: 0.03em; }
.gld-lang-badge.is-current { border-color: var(--scorm-primary-color, #3b82f6); color: var(--scorm-primary-color, #3b82f6); }
.gld-pgroups { display: flex; flex-direction: column; gap: 12px; }
.gld-pgroup { padding: 8px 0; border-top: 1px solid #e2e8f0; }
.gld-pgroup:first-child { border-top: none; }
.gld-pgroup.is-sub { padding-left: 16px; }
.gld-pgroup-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gld-padd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.gld-pgroup-account { margin: 2px 0 6px; }
.gld-pgroup-courses > summary { cursor: pointer; padding: 4px 0; color: #475569; font-size: 13px; }
.gld-addgroups__title { margin: 12px 0 4px; font-weight: 600; }
.gld-addgroups__account { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 8px; }
.gld-addgroups__modules { margin-top: 12px; }
.gld-addgroups__modules > summary { cursor: pointer; color: #475569; margin-bottom: 6px; }

/* ── Global filter bar (TSK-21590) ─────────────────────────────────────
   One bar under the view tabs of Users, Courses and Reports. Scoped to
   .scorm-leader-dashboard and built from the --scorm-* variables, so the
   dark profile and theme palettes (Astra, Kadence) reach it; the fallbacks
   are the light values. Status is always a word, never colour alone. */
.scorm-leader-dashboard .gld-gf { margin: 0 0 20px; }
.scorm-leader-dashboard .gld-gf-search { margin-bottom: 10px; }
.scorm-leader-dashboard .gld-gf-box {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 0;
	padding: 2px 14px;
	min-height: 46px;
	background: var(--scorm-surface-color, #fff);
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 10px;
	color: var(--scorm-text-color, #3f3f46);
}
.scorm-leader-dashboard .gld-gf-box:focus-within {
	border-color: var(--scorm-primary-color, #2f6fb3);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 18%, transparent);
}
.scorm-leader-dashboard .gld-gf-glass { flex: 0 0 auto; color: var(--scorm-muted-text-color, #64748b); }
.scorm-leader-dashboard .gld-gf-input {
	flex: 1 1 220px;
	min-width: 0;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 15px;
	outline: 0;
}
.scorm-leader-dashboard .gld-gf-input::placeholder { color: var(--scorm-muted-text-color, #64748b); opacity: 1; }
.scorm-leader-dashboard .gld-gf-hint { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 4px 0; font-size: 12px; }
.scorm-leader-dashboard .gld-kbd {
	display: inline-block;
	padding: 1px 6px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-bottom-width: 2px;
	border-radius: 5px;
	background: var(--scorm-surface-muted-color, #f8fafc);
	color: var(--scorm-muted-text-color, #64748b);
	font: inherit;
	font-size: 11px;
	line-height: 1.5;
}
.scorm-leader-dashboard .gld-gf-preview {
	display: flex;
	flex: 1 0 100%;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0 0 8px;
}
.scorm-leader-dashboard .gld-gf-preview:empty { display: none; }
.scorm-leader-dashboard .gld-gf-chip {
	padding: 2px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 12%, var(--scorm-surface-color, #fff));
	color: var(--scorm-heading-color, #1e293b);
	font-size: 13px;
}

.scorm-leader-dashboard .gld-gf-note { color: var(--scorm-muted-text-color, #64748b); font-size: 13px; }
.scorm-leader-dashboard .gld-gf-choices { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.scorm-leader-dashboard .gld-gf-choice {
	padding: 2px 10px;
	border: 1px solid var(--scorm-primary-color, #2f6fb3);
	border-radius: 999px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-primary-color, #2f6fb3);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-gf-choice:hover,
.scorm-leader-dashboard .gld-gf-choice:focus-visible { background: color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 12%, var(--scorm-surface-color, #fff)); }

.scorm-leader-dashboard .gld-gf-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scorm-leader-dashboard .gld-gf-wrap { position: relative; display: inline-block; }
.scorm-leader-dashboard .gld-gf-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 4px 12px;
	border: 1px dashed var(--scorm-border-color, #cbd5e1);
	border-radius: 999px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-muted-text-color, #64748b);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	text-decoration: none;
}
.scorm-leader-dashboard .gld-gf-pill:hover { color: var(--scorm-heading-color, #1e293b); border-color: var(--scorm-primary-color, #2f6fb3); }
.scorm-leader-dashboard .gld-gf-pill--on,
.scorm-leader-dashboard .gld-gf-pill--on:hover {
	border-style: solid;
	border-color: var(--scorm-primary-color, #2f6fb3);
	background: color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 10%, var(--scorm-surface-color, #fff));
	color: var(--scorm-heading-color, #1e293b);
}
.scorm-leader-dashboard .gld-gf-pill:focus-visible,
.scorm-leader-dashboard .gld-gf-opt:focus-visible,
.scorm-leader-dashboard .gld-gf-x:focus-visible,
.scorm-leader-dashboard .gld-gf-reset:focus-visible {
	outline: 2px solid var(--scorm-primary-color, #2f6fb3);
	outline-offset: 2px;
}
/* A block theme outlines every focused element in the content (`:where(.wp-site-blocks :focus)`), in the
   text colour and also after a mouse click, and a menu moves focus to its first option when it opens. Only
   keyboard focus gets a ring in the filter bar. In a scrolling option list a ring outside the button is cut
   off at the sides, so the option's ring sits inside it. */
.scorm-leader-dashboard .gld-gf :focus:not(:focus-visible) { outline: none; }
.scorm-leader-dashboard .gld-gf-opt:focus-visible { outline-offset: -2px; }
.scorm-leader-dashboard .gld-gf-v { font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scorm-leader-dashboard .gld-gf-pill--text { gap: 8px; cursor: default; }
.scorm-leader-dashboard .gld-gf-x {
	padding: 0 2px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-gf-total { margin: 10px 0 0; }

.scorm-leader-dashboard .gld-gf-pop {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	left: 0;
	box-sizing: border-box;
	width: 260px;
	max-width: calc(100vw - 48px);
	padding: 8px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 12px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-text-color, #3f3f46);
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.scorm-leader-dashboard .gld-gf-pop--wide { width: 320px; }
.scorm-leader-dashboard .gld-gf-pop--period { width: 300px; }
.scorm-leader-dashboard .gld-gf-list { max-height: 280px; overflow-y: auto; margin: 0 0 8px; }
.scorm-leader-dashboard .gld-gf-opt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 7px 10px;
	border: 0;
	border-radius: 8px;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	box-shadow: none;
}
.scorm-leader-dashboard .gld-gf-opt:hover { background: var(--scorm-surface-muted-color, #f1f3f6); }
.scorm-leader-dashboard .gld-gf-opt.is-on { font-weight: 600; color: var(--scorm-heading-color, #1e293b); }
.scorm-leader-dashboard .gld-gf-opt--child { padding-left: 28px; }
.scorm-leader-dashboard .gld-gf-opt-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.scorm-leader-dashboard .gld-gf-n { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.scorm-leader-dashboard .gld-gf-box-check {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border: 1.5px solid var(--scorm-border-color, #94a3b8);
	border-radius: 4px;
	background: var(--scorm-surface-color, #fff);
}
.scorm-leader-dashboard .gld-gf-opt.is-on .gld-gf-box-check {
	border-color: var(--scorm-primary-color, #2f6fb3);
	background: var(--scorm-primary-color, #2f6fb3)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
		center / 12px no-repeat;
}
/* A single choice is a radio list, so the chosen one is marked by a tick and a bold word, not by colour alone. */
.scorm-leader-dashboard :is([data-gf-pop="status"], .gld-gf-presets) .gld-gf-opt-label::before {
	content: "";
	display: inline-block;
	width: 14px;
	color: var(--scorm-primary-color, #2f6fb3);
}
.scorm-leader-dashboard :is([data-gf-pop="status"], .gld-gf-presets) .gld-gf-opt.is-on .gld-gf-opt-label::before { content: "✓"; }
.scorm-leader-dashboard .gld-gf-range { display: grid; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--scorm-border-color, #e4e4e7); }
.scorm-leader-dashboard .gld-gf-field { display: grid; gap: 4px; font-size: 13px; color: var(--scorm-muted-text-color, #64748b); }
.scorm-leader-dashboard .gld-gf-field :is(input, select) {
	padding: 6px 8px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 8px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-text-color, #3f3f46);
	font: inherit;
	font-size: 14px;
}
.scorm-leader-dashboard .gld-gf-error { margin: 0; color: var(--scorm-failed-color, #b42318); font-size: 13px; }
.scorm-leader-dashboard .gld-gf-empty { margin: 4px 10px 8px; }
.scorm-leader-dashboard .gld-gf-done { width: 100%; justify-content: center; }
.scorm-leader-dashboard .gld-gf-user-search { margin-bottom: 8px; }

/* A short label a site module puts after a person's name in the Users list. */
.scorm-leader-dashboard .gld-user-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--scorm-surface-muted-color, #f1f3f6);
	color: var(--scorm-muted-text-color, #64748b);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	vertical-align: middle;
}

/* Counts on the view tabs. */
.scorm-leader-dashboard .gld-viewnav-count {
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--scorm-surface-muted-color, #f1f3f6);
	color: var(--scorm-muted-text-color, #64748b);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}

/* The old per-view filters stay in the markup (their scripts still read them) but the one bar replaces them. */
.scorm-leader-dashboard .gld-users-global [data-gld-legacy],
.scorm-leader-dashboard .gld-users-global .gld-search-box,
.scorm-leader-dashboard.gld-users-global [data-gld-legacy],
.scorm-leader-dashboard.gld-users-global .gld-search-box,
.scorm-leader-dashboard.gld-groups-global [data-gld-legacy],
.scorm-leader-dashboard .gld-reports-legacy .gld-search-box,
.scorm-leader-dashboard .gld-reports-legacy .gld-status-filters,
.scorm-leader-dashboard .gld-reports-legacy .gld-group-filter:not([data-gld-reports-extra-key]) { display: none !important; }

/* The Groups tab keeps its own search and filters, so they take the look of the global bar: same field, same pills. */
.scorm-leader-dashboard .gld-search { margin-bottom: 20px; }
.scorm-leader-dashboard .gld-search .gld-search-field {
	padding: 2px 14px;
	min-height: 46px;
	height: auto;
	border-color: var(--scorm-border-color, #d4d4d8);
	color: var(--scorm-text-color, #3f3f46);
}
.scorm-leader-dashboard .gld-search .gld-search-field:focus-within {
	border-color: var(--scorm-primary-color, #2f6fb3);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 18%, transparent);
}
.scorm-leader-dashboard .gld-search .gld-search-icon { color: var(--scorm-muted-text-color, #64748b); }
.scorm-leader-dashboard .gld-search .gld-search-input { height: 44px; }
.scorm-leader-dashboard .gld-search .gld-search-filters { justify-content: flex-start; gap: 8px; }
.scorm-leader-dashboard .gld-search .gld-status-filters { gap: 8px; }
.scorm-leader-dashboard .gld-search :is(.gld-filter-chip, .gld-filter-button) {
	min-height: 34px;
	height: auto;
	padding: 4px 12px;
	border: 1px dashed var(--scorm-border-color, #cbd5e1);
	border-radius: 999px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-muted-text-color, #64748b);
	font-size: 14px;
	line-height: 1.2;
}
.scorm-leader-dashboard .gld-search :is(.gld-filter-chip, .gld-filter-button):hover {
	border-color: var(--scorm-primary-color, #2f6fb3);
	color: var(--scorm-heading-color, #1e293b);
}
.scorm-leader-dashboard .gld-search :is(.gld-filter-chip.is-active, .gld-filter-chip[aria-pressed="true"], .gld-filter-button.is-active) {
	border-style: solid;
	border-color: var(--scorm-primary-color, #2f6fb3);
	background: color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 10%, var(--scorm-surface-color, #fff));
	color: var(--scorm-heading-color, #1e293b);
}
.scorm-leader-dashboard .gld-search .gld-filter-button-label { color: inherit; }
.scorm-leader-dashboard .gld-search :is(.gld-filter-chip, .gld-filter-button):focus-visible {
	outline: 2px solid var(--scorm-primary-color, #2f6fb3);
	outline-offset: 2px;
}
.scorm-leader-dashboard .gld-search .gld-search-hint { font-size: 12px; }

@media (max-width: 640px) {
	.scorm-leader-dashboard .gld-gf-pop,
	.scorm-leader-dashboard .gld-gf-pop--wide,
	.scorm-leader-dashboard .gld-gf-pop--period { position: fixed; top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-width: none; }
	.scorm-leader-dashboard .gld-gf-hint { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
	.scorm-leader-dashboard .gld-gf-pill,
	.scorm-leader-dashboard .gld-gf-box { transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s; }
}

/* «Counts when» and «Account» in the Status menu (issues #783, #781) */
.scorm-leader-dashboard .gld-gf-section { margin: 8px 0 0; padding: 8px 0 0; border: 0; border-top: 1px solid var(--scorm-border-color, #e4e4e7); min-width: 0; }
.scorm-leader-dashboard .gld-gf-heading { display: block; margin: 0 0 4px; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--scorm-muted-text-color, #64748b); }
.scorm-leader-dashboard .gld-gf-radio { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.scorm-leader-dashboard .gld-gf-radio:hover { background: var(--scorm-surface-muted-color, #f1f3f6); }
.scorm-leader-dashboard .gld-gf-radio span:not(.gld-gf-n) { flex: 1 1 auto; min-width: 0; }
.scorm-leader-dashboard .gld-gf-radio input { flex: 0 0 auto; margin: 0 6px 0 0; accent-color: var(--scorm-primary-color, #2f6fb3); }
.scorm-leader-dashboard .gld-gf-scope:disabled { opacity: 0.55; }
.scorm-leader-dashboard .gld-gf-scope .gld-gf-note { margin: 4px 10px 0; }
.scorm-leader-dashboard .gld-summary-note { margin: -12px 0 20px; }

/* Narrow screens (issue #786): nothing in the leader administration may make the page wider than the viewport.
 * The tab strip scrolls inside itself, the filter bar wraps, menus and tables stay inside the screen. */
.scorm-leader-dashboard { max-width: 100%; }
.scorm-leader-dashboard .gld-viewnav { max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.scorm-leader-dashboard .gld-viewnav > * { flex: 0 0 auto; }
.scorm-leader-dashboard .gld-gf,
.scorm-leader-dashboard .gld-gf-row,
.scorm-leader-dashboard .gld-gf-pills,
.scorm-leader-dashboard .gld-gf-search,
.scorm-leader-dashboard .gld-gf-box { max-width: 100%; min-width: 0; box-sizing: border-box; }
.scorm-leader-dashboard .gld-gf-pills { flex-wrap: wrap; }
.scorm-leader-dashboard .gld-gf-pill { max-width: 100%; }
.scorm-leader-dashboard .gld-gf-v { max-width: min(220px, 60vw); }
.scorm-leader-dashboard .gld-gf-preview { flex-wrap: wrap; min-width: 0; max-width: 100%; }
.scorm-leader-dashboard .gld-gf-pop,
.scorm-leader-dashboard .gld-gf-pop--wide,
.scorm-leader-dashboard .gld-gf-pop--period { max-width: calc(100vw - 32px); }
.scorm-leader-dashboard .gld-panel { max-width: 100%; min-width: 0; }
.scorm-leader-dashboard .gld-panel:has(> table) { overflow-x: auto; }
.scorm-leader-dashboard :is(.gld-users-table, .gld-reports-table) :is(td, th) { overflow-wrap: break-word; }
.scorm-leader-dashboard .gld-hero,
.scorm-leader-dashboard .gld-summary,
.scorm-leader-dashboard .gld-roster-toolbar { max-width: 100%; min-width: 0; }
@media (max-width: 640px) {
	.scorm-leader-dashboard .gld-gf-pop,
	.scorm-leader-dashboard .gld-gf-pop--wide,
	.scorm-leader-dashboard .gld-gf-pop--period { max-width: calc(100vw - 24px); }
	.scorm-leader-dashboard .gld-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.scorm-leader-dashboard .gld-roster-toolbar { flex-wrap: wrap; }
	.scorm-leader-dashboard .gld-summary-note { margin-top: -8px; }
}

/* Groups under the global filter bar: the figures of the filter on each row, the sort, the context rows. */
.scorm-leader-dashboard .gld-gr-sort { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scorm-leader-dashboard .gld-gr-tag {
	display: none;
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: 999px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	color: var(--scorm-muted-text-color, #64748b);
	font-size: 12px;
	vertical-align: middle;
}
.scorm-leader-dashboard .gld-gr-contextcard { flex: 1 1 320px; min-width: 0; }
.scorm-leader-dashboard .gld-gr-contextname { margin: 0; display: inline; font-size: 17px; font-weight: 600; color: var(--scorm-muted-text-color, #64748b); overflow-wrap: anywhere; }
.scorm-leader-dashboard .gld-gr-contextcard .gld-gr-tag { display: inline-block; }
.scorm-leader-dashboard .gld-tree-row.is-context .gld-gr-tag { display: inline-block; }
.scorm-leader-dashboard .gld-tree-row.is-context :is(.gld-gr-prog, .gld-gr-remind, .gld-tree-open, .gld-card-meta) { display: none; }
.scorm-leader-dashboard .gld-tree-row.is-context .gld-tree-name h3 { color: var(--scorm-muted-text-color, #64748b); font-weight: 600; }
.scorm-leader-dashboard .gld-gr-subnote { margin: 0; padding: 0 16px 10px 46px; }
.scorm-leader-dashboard .gld-gr-in { margin-left: 6px; }
.scorm-leader-dashboard .gld-gr-prog { flex: 1 1 260px; min-width: 0; max-width: 100%; }
.scorm-leader-dashboard .gld-gr-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--scorm-surface-muted-color, #eceff3); }
.scorm-leader-dashboard .gld-gr-bar i { display: block; height: 100%; }
.scorm-leader-dashboard .gld-gr-seg-c { background: #16a34a; }
.scorm-leader-dashboard .gld-gr-seg-p { background: var(--scorm-primary-color, #2f6fb3); }
.scorm-leader-dashboard .gld-gr-seg-n { background: #cbd5e1; }
.scorm-leader-dashboard .gld-gr-rate { margin-top: 4px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--scorm-heading-color, #1e293b); }
.scorm-leader-dashboard .gld-gr-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; }
.scorm-leader-dashboard .gld-gr-remind { white-space: nowrap; }
/* Groups view: one card per top-level group, its sub-groups as plain rows inside it (variant C, TSK-21718). */
/* A size container counts as 0 wide in a shrink-to-fit parent, so the list takes the full width explicitly. */
.scorm-leader-dashboard .gld-gc-list { gap: 16px; width: 100%; box-sizing: border-box; container: gld-gc-list / inline-size; }
.scorm-leader-dashboard .gld-gc { overflow: visible; }
.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-top { flex-wrap: nowrap; gap: 18px; padding: 20px 20px 18px; }
.scorm-leader-dashboard .gld-gc-ring {
	--gld-gc-v: 0;
	flex: 0 0 64px;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: conic-gradient(#16a34a calc(var(--gld-gc-v) * 1%), #e5e7eb 0);
}
.scorm-leader-dashboard .gld-gc-ring > span {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-heading-color, #1e293b);
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.scorm-leader-dashboard .gld-gc-ring.is-empty > span { color: var(--scorm-muted-text-color, #64748b); font-weight: 500; }
.scorm-leader-dashboard .gld-gc-top > a.gld-card { flex: 1 1 auto; min-width: 8ch; }
.scorm-leader-dashboard .gld-gc-top .gld-tree-name { flex: 1 1 auto; display: block; }
.scorm-leader-dashboard .gld-gc-top .gld-tree-name h3 { display: inline; margin: 0; font-size: 18px; font-weight: 600; color: var(--scorm-heading-color, #1e293b); overflow-wrap: break-word; }
.scorm-leader-dashboard .gld-gc .gld-gr-in,
.scorm-leader-dashboard .gld-gc-meta { display: block; margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--scorm-muted-text-color, #64748b); font-variant-numeric: tabular-nums; }
.scorm-leader-dashboard .gld-gc .gld-gr-in { margin: 1px 0 0; }
.scorm-leader-dashboard .gld-gc-act { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.scorm-leader-dashboard .gld-gc-act .gld-btn { white-space: nowrap; text-decoration: none; }
.scorm-leader-dashboard .gld-gc-top a.gld-gr-remind { font-size: inherit; color: inherit; text-decoration: none; }
.scorm-leader-dashboard .gld-gc-top.is-context :is(.gld-gc-ring > span, .gld-gc-act) { visibility: hidden; }
.scorm-leader-dashboard .gld-gc-top.is-context .gld-gc-ring { background: var(--scorm-surface-muted-color, #f1f3f6); }
.scorm-leader-dashboard .gld-gc-top.is-context .gld-gc-act { display: none; }

/* The ⋯ menu of a card head or a sub-group row. */
.scorm-leader-dashboard .gld-gc-menu { position: relative; }
.scorm-leader-dashboard .gld-gc-dots {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	color: var(--scorm-muted-text-color, #64748b);
	list-style: none;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-gc-dots::-webkit-details-marker { display: none; }
.scorm-leader-dashboard .gld-gc-dots:hover,
.scorm-leader-dashboard .gld-gc-menu[open] > .gld-gc-dots { background: var(--scorm-surface-muted-color, #f1f3f6); color: var(--scorm-heading-color, #1e293b); }
.scorm-leader-dashboard .gld-gc-dots:focus-visible { outline: 2px solid var(--scorm-primary-color, #2f6fb3); outline-offset: 2px; }
.scorm-leader-dashboard .gld-gc-pop {
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 20;
	display: flex;
	flex-direction: column;
	min-width: 160px;
	padding: 6px;
	border: 1px solid var(--scorm-border-color, #e4e4e7);
	border-radius: 10px;
	background: var(--scorm-surface-color, #fff);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.scorm-leader-dashboard .gld-gc-item {
	display: block;
	padding: 8px 10px;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--scorm-heading-color, #1e293b);
	font: inherit;
	font-size: 14px;
	text-align: left;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-gc-item:hover,
.scorm-leader-dashboard .gld-gc-item:focus-visible { background: var(--scorm-surface-muted-color, #f1f3f6); }
.scorm-leader-dashboard a.gld-gc-item.gld-gr-remind { font-size: 14px; text-decoration: none; }

/* Sub-group rows: name, people and courses, completed, %, ⋯. */
.scorm-leader-dashboard .gld-gc-kids { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--scorm-border-color, #eef0f3); }
.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-kid {
	flex-wrap: nowrap;
	gap: 16px;
	padding: 9px 20px 9px 102px;
	border-top: 0;
	border-bottom: 1px solid var(--scorm-border-color, #eef0f3);
	border-radius: 0;
	font-size: 14px;
}
.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-kid:hover { background: var(--scorm-surface-muted-color, #fafafa); box-shadow: none; border-radius: 0; }
.scorm-leader-dashboard .gld-gc-kid > a.gld-card { flex: 1 1 auto; min-width: 8ch; padding: 0; }
.scorm-leader-dashboard .gld-gc-kid > a.gld-card h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--scorm-heading-color, #1e293b); overflow-wrap: break-word; }
.scorm-leader-dashboard .gld-gc-kid .gld-gc-m { flex: 0 0 150px; color: var(--scorm-muted-text-color, #64748b); font-size: 13px; font-variant-numeric: tabular-nums; }
.scorm-leader-dashboard .gld-gc-kid .gld-gc-done { flex-basis: 120px; }
.scorm-leader-dashboard .gld-gc-kid .gld-gc-pct { flex: 0 0 44px; text-align: right; color: var(--scorm-heading-color, #1e293b); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scorm-leader-dashboard .gld-gc-kid .gld-gc-act { flex: 0 0 32px; justify-content: flex-end; }
.scorm-leader-dashboard .gld-gc-kid:has(.gld-rename-form) > :not(.gld-rename-form) { display: none; }
.scorm-leader-dashboard .gld-gc-top:has(.gld-rename-form) .gld-gc-act { display: none; }
.scorm-leader-dashboard .gld-tree:not(.is-searching) .gld-gc-kids:not(.is-expanded) > .gld-gc-kid.is-overflow { display: none; }
.scorm-leader-dashboard .gld-tree.is-searching .gld-gc-more { display: none; }
.scorm-leader-dashboard .gld-gc-more,
.scorm-leader-dashboard .gld-gc-addbtn {
	padding: 0;
	border: 0;
	background: none;
	color: var(--scorm-muted-text-color, #64748b);
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
}
.scorm-leader-dashboard .gld-gc-more { display: block; width: 100%; padding: 10px 20px 10px 102px; text-align: left; border-bottom: 1px solid var(--scorm-border-color, #eef0f3); color: var(--scorm-primary-color, #2f6fb3); }
.scorm-leader-dashboard .gld-gc-more[hidden] { display: none; }
.scorm-leader-dashboard .gld-gc-more:hover,
.scorm-leader-dashboard .gld-gc-addbtn:hover { color: var(--scorm-heading-color, #1e293b); text-decoration: underline; text-underline-offset: 3px; }
/* The block draws no line under its last row: the strip below it (note, «+ New sub-group») carries the line. */
.scorm-leader-dashboard .gld-gc-kids { margin-bottom: -1px; }
.scorm-leader-dashboard .gld-gc-add { padding: 10px 20px 12px 102px; border-top: 1px solid var(--scorm-border-color, #eef0f3); }
.scorm-leader-dashboard .gld-gc .gld-gr-subnote { padding: 8px 20px 10px 102px; border-top: 1px solid var(--scorm-border-color, #eef0f3); }
.scorm-leader-dashboard .gld-gc .gld-gr-subnote[hidden] { display: none; }
/* One frame per card: hovering a row inside it does not outline the whole card. */
.scorm-leader-dashboard .gld-gc:has(> .gld-tree-row:hover),
.scorm-leader-dashboard .gld-gc:has(> .gld-tree-row :focus-visible) { border-color: var(--scorm-primary-color, #2f6fb3); box-shadow: 0 0 0 1px var(--scorm-primary-color, #2f6fb3); }
.scorm-leader-dashboard .gld-gc-top > a.gld-card:hover h3 { color: var(--scorm-primary-color, #2f6fb3); text-decoration: underline; text-underline-offset: 3px; }
.scorm-leader-dashboard .gld-gc-kid > a.gld-card:hover h3 { color: var(--scorm-primary-color, #2f6fb3); text-decoration: underline; text-underline-offset: 3px; }
/* Compact card: on a narrow screen, and in a narrow theme column whatever the screen (a sidebar theme at 1280px
   leaves ~520px). The media query stays for browsers without container queries; keep the two blocks in step. */
@media (max-width: 640px) {
	.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-top { flex-wrap: wrap; gap: 10px 12px; padding: 16px; }
	.scorm-leader-dashboard .gld-gc-ring { flex-basis: 48px; width: 48px; height: 48px; }
	.scorm-leader-dashboard .gld-gc-ring > span { width: 38px; height: 38px; font-size: 12px; }
	.scorm-leader-dashboard .gld-gc-top > a.gld-card { flex: 1 1 calc(100% - 60px); }
	.scorm-leader-dashboard .gld-gc-top > .gld-gc-act { box-sizing: border-box; flex-basis: 100%; min-width: 0; flex-wrap: wrap; }
	.scorm-leader-dashboard .gld-gc-act .gld-btn { padding: 6px 12px; font-size: 13px; }
	.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-kid { padding: 10px 16px; }
	.scorm-leader-dashboard .gld-gc-kid :is(.gld-gc-m, .gld-gc-act) { display: none; }
	.scorm-leader-dashboard :is(.gld-gc-more, .gld-gc-add, .gld-gc .gld-gr-subnote) { padding-left: 16px; }
}
@container gld-gc-list (max-width: 680px) {
	.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-top { flex-wrap: wrap; gap: 10px 12px; padding: 16px; }
	.scorm-leader-dashboard .gld-gc-ring { flex-basis: 48px; width: 48px; height: 48px; }
	.scorm-leader-dashboard .gld-gc-ring > span { width: 38px; height: 38px; font-size: 12px; }
	.scorm-leader-dashboard .gld-gc-top > a.gld-card { flex: 1 1 calc(100% - 60px); }
	.scorm-leader-dashboard .gld-gc-top > .gld-gc-act { box-sizing: border-box; flex-basis: 100%; min-width: 0; flex-wrap: wrap; }
	.scorm-leader-dashboard .gld-gc-act .gld-btn { padding: 6px 12px; font-size: 13px; }
	.scorm-leader-dashboard .gld-gc .gld-tree-row.gld-gc-kid { padding: 10px 16px; }
	/* A narrow column on a wider screen keeps the row's ⋯ menu; only a phone drops it (the media query above). */
	.scorm-leader-dashboard .gld-gc-kid .gld-gc-m { display: none; }
	.scorm-leader-dashboard :is(.gld-gc-more, .gld-gc-add, .gld-gc .gld-gr-subnote) { padding-left: 16px; }
}
.scorm-leader-dashboard .gld-tree-node.is-filtered-out,
.scorm-leader-dashboard .gld-tree-row.is-filtered-out { display: none; }
.scorm-leader-dashboard .gld-gr-empty { margin: 0 0 12px; }
.scorm-leader-dashboard .gld-gr-empty[hidden] { display: none; }
@media (max-width: 640px) {
	.scorm-leader-dashboard.gld-groups-global .gld-tree,
	.scorm-leader-dashboard.gld-groups-global .gld-tree-node { max-width: 100%; min-width: 0; box-sizing: border-box; }
	.scorm-leader-dashboard.gld-groups-global .gld-tree-toolbar { align-items: flex-start; }
	.scorm-leader-dashboard.gld-groups-global .gld-tree-actions { margin-left: 0; justify-content: flex-start; }
}

/* Courses view under the global filter bar (TSK-21590): figures, remind link and the groups that carry a course. */
.scorm-leader-dashboard .gld-course-expand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 8px; }
.scorm-leader-dashboard .gld-course-empty-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.scorm-leader-dashboard .gld-course-expand-all { margin-left: auto; }
.scorm-leader-dashboard .gld-rep-desc { margin: 0 0 10px; }
.scorm-leader-dashboard .gld-course-figures {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
}
.scorm-leader-dashboard .gld-course-figures .gld-gr-prog { flex: 1 1 280px; }
.scorm-leader-dashboard .gld-course-stats { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--scorm-muted-text-color, #64748b); }
.scorm-leader-dashboard .gld-course-remind { white-space: nowrap; }
.scorm-leader-dashboard .gld-course-subrows { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--scorm-border-color, #e2e8f0); }
.scorm-leader-dashboard .gld-course-subrows[hidden] { display: none; }
.scorm-leader-dashboard .gld-course-subrow { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 4px 0; font-size: 14px; }
.scorm-leader-dashboard .gld-course-subname { font-weight: 600; overflow-wrap: anywhere; }

/* The strip under the bar. The quick views and the order links are items of the View menu (below). */
.scorm-leader-dashboard .gld-gf-carried { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 6px 0 0; }
.scorm-leader-dashboard .gld-gf-clear-carried { padding: 0 6px; min-height: 0; }

/* Users list: status badges and the progress of each person over the courses the bar leaves. */
.scorm-leader-dashboard .gld-user-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.scorm-leader-dashboard .gld-user-progress { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.scorm-leader-dashboard .gld-user-progress i { display: block; height: 6px; border-radius: 999px; background: var(--scorm-border-color, #e2e8f0); overflow: hidden; }
.scorm-leader-dashboard .gld-user-progress b { display: block; height: 100%; background: var(--scorm-primary-color, #2f6fb3); border-radius: 999px; }

/* Reports: modes, views, grouping, matrix and the download panel (TSK-21590) */
.gld-rep-modebar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin: 14px 0 10px; }
.gld-rep-fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--scorm-muted-text-color, #64748b); min-width: 0; }
.gld-rep-fld input[type="date"],
.gld-rep-field select,
.gld-rep-by select {
	min-height: 36px;
	padding: 4px 10px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 8px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-text-color, #3f3f46);
	font: inherit;
	font-size: 14px;
	font-weight: 400;
	max-width: 100%;
}
.gld-rep-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--scorm-border-color, #d4d4d8); border-radius: 8px; background: var(--scorm-surface-color, #fff); overflow: hidden; max-width: 100%; }
.gld-rep-seg button {
	min-height: 36px;
	padding: 6px 14px;
	border: 0;
	border-right: 1px solid var(--scorm-border-color, #d4d4d8);
	background: transparent;
	color: var(--scorm-text-color, #3f3f46);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}
.gld-rep-seg button:last-child { border-right: 0; }
.gld-rep-seg button:hover { background: var(--scorm-background-color, #f4f4f5); }
.gld-rep-seg button[aria-pressed="true"] { background: var(--scorm-primary-color, #2f6fb3); color: #fff; }
.gld-rep-seg button:focus-visible,
.gld-rep-fld input:focus-visible,
.gld-rep-field select:focus-visible,
.gld-rep-by select:focus-visible,
.gld-rep-check input:focus-visible { outline: 2px solid var(--scorm-primary-color, #2f6fb3); outline-offset: 1px; }
.gld-rep-def {
	margin: 0 0 14px;
	padding: 10px 12px;
	border: 1px solid var(--scorm-border-color, #e4e4e7);
	border-radius: 8px;
	background: var(--scorm-surface-muted-color, #f8fafc);
	font-size: 13px;
	color: var(--scorm-text-color, #3f3f46);
}
.gld-rep-def summary { cursor: pointer; font-weight: 600; color: var(--scorm-heading-color, #1e293b); }
.gld-rep-def p { margin: 6px 0 0; }
.gld-rep-warn { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: #fffaeb; color: #b54708; font-size: 13px; }
.gld-rep-warn[hidden] { display: none; }
.gld-rep-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
/* The download panel sits beside the preview only when the dashboard's own width leaves the table room; in a narrow
   theme container (Presis: ~1015px) it moves under the preview instead of squeezing the table's columns. */
.gld-rep-grid { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.gld-rep-main { flex: 999 1 760px; min-width: 0; }
.gld-rep-panel { flex: 1 1 300px; padding: 16px 18px; min-width: 0; }
.gld-rep-panel h3 { margin: 0 0 4px; font-size: 16px; }
.gld-rep-by { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--scorm-muted-text-color, #64748b); }
.gld-rep-field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; min-width: 0; }
.gld-rep-field > span { font-size: 12px; font-weight: 600; color: var(--scorm-muted-text-color, #64748b); }
.gld-rep-checks { display: flex; flex-direction: column; gap: 6px; }
.gld-rep-check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.gld-rep-first { padding: 8px 10px; border: 1px dashed var(--scorm-border-color, #d4d4d8); border-radius: 8px; font-size: 12.5px; overflow-wrap: anywhere; }
.gld-rep-about { margin: 0; padding: 8px 10px; border: 1px solid var(--scorm-border-color, #e4e4e7); border-radius: 8px; background: var(--scorm-surface-muted-color, #f8fafc); font-size: 12.5px; }
.gld-rep-about[hidden] { display: none; }
.gld-rep-about dt { margin-top: 6px; font-weight: 600; }
.gld-rep-about dt:first-child { margin-top: 0; }
.gld-rep-about dd { margin: 0; overflow-wrap: anywhere; }
.gld-rep-go { width: 100%; justify-content: center; margin-top: 16px; }
.gld-rep-legend { margin: 0 0 10px; }
.scorm-leader-dashboard .gld-panel table.gld-rep-matrix { width: auto; min-width: 100%; }
.scorm-leader-dashboard .gld-panel table.gld-rep-matrix th.gld-rep-mxh { min-width: 110px; text-align: center; white-space: normal; }
.scorm-leader-dashboard .gld-panel table.gld-rep-matrix td.gld-rep-mx { text-align: center; }
.gld-rep-mark-c { color: #067647; }
.gld-rep-mark-p { color: #1d4ed8; }
.gld-rep-mark-n { color: #667085; }
.scorm-leader-dashboard .gld-panel table.gld-reports-table tr.gld-rep-grp td { background: var(--scorm-surface-muted-color, #f8fafc); font-weight: 600; color: var(--scorm-heading-color, #1e293b); }
.gld-rep-sub { display: block; font-size: 12px; color: var(--scorm-muted-text-color, #64748b); }
.gld-rep-qual { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px; background: #fffaeb; color: #b54708; font-size: 11.5px; }
.gld-rep-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: 11.5px; }
@media (max-width: 480px) {
	.gld-rep-modebar { gap: 10px; }
	.gld-rep-modebar .gld-rep-fld { width: 100%; }
	.gld-rep-seg { width: 100%; }
	.gld-rep-seg button { flex: 1 1 auto; }
	.gld-rep-fld input[type="date"] { width: 100%; }
}

/* The filter bar in one row (variant C): search, «Filters», the «View» menu and the total share a line. The pills of
   «Filters» show only what is chosen until the button opens them, so the row below costs no height when nothing is. */
.scorm-leader-dashboard .gld-gf-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.scorm-leader-dashboard .gld-gf-top > .gld-gf-search { position: relative; flex: 1 1 220px; min-width: 0; margin: 0; }
.scorm-leader-dashboard .gld-gf-top .gld-gf-box { box-sizing: border-box; width: 100%; min-height: 38px; padding: 0 12px; }
.scorm-leader-dashboard .gld-gf-top .gld-gf-input { flex: 1 1 120px; height: 36px; font-size: 14px; }
/* The key hints show under the field while it has focus; aria-describedby still reads them when they are hidden. */
.scorm-leader-dashboard .gld-gf-top .gld-gf-hint {
	display: none;
	position: absolute;
	z-index: 25;
	top: calc(100% + 4px);
	left: 0;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 8px;
	background: var(--scorm-surface-color, #fff);
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.scorm-leader-dashboard .gld-gf-top .gld-gf-box:focus-within .gld-gf-hint { display: inline-flex; }
.scorm-leader-dashboard .gld-gf-top .gld-gf-total { flex: 0 1 auto; margin: 0 0 0 auto; text-align: right; }

.scorm-leader-dashboard .gld-gf-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	margin: 0;
	padding: 4px 12px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 10px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-text-color, #3f3f46);
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
}
.scorm-leader-dashboard .gld-gf-toggle:hover,
.scorm-leader-dashboard .gld-gf-toggle[aria-expanded="true"] { border-color: var(--scorm-primary-color, #2f6fb3); color: var(--scorm-heading-color, #1e293b); background: var(--scorm-surface-color, #fff); }
.scorm-leader-dashboard .gld-gf-toggle:focus-visible { outline: 2px solid var(--scorm-primary-color, #2f6fb3); outline-offset: 2px; }
.scorm-leader-dashboard .gld-gf-badge {
	min-width: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--scorm-primary-color, #2f6fb3);
	color: #fff;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	line-height: 20px;
	text-align: center;
}

/* Collapsed: a pill without a value is hidden; the row shows only when something is chosen or «Filters» is open. */
.scorm-leader-dashboard .gld-gf-row { display: none; margin-top: 10px; }
.scorm-leader-dashboard .gld-gf.has-active .gld-gf-row,
.scorm-leader-dashboard .gld-gf.is-open .gld-gf-row { display: block; }
.scorm-leader-dashboard .gld-gf:not(.is-open) .gld-gf-wrap:not(.gld-gf-wrap--on) { display: none; }
/* A group page's Reports tab: the group is fixed, shown as a pill that cannot be opened or removed. */
.scorm-leader-dashboard .gld-gf.has-locked .gld-gf-row { display: block; }
.scorm-leader-dashboard .gld-gf .gld-gf-wrap.gld-gf-wrap--locked,
.scorm-leader-dashboard .gld-gf:not(.is-open) .gld-gf-wrap.gld-gf-wrap--locked { display: inline-block; }
.scorm-leader-dashboard .gld-gf-pill--locked,
.scorm-leader-dashboard .gld-gf-pill--locked:hover { gap: 8px; cursor: default; }
/* The sort of the Reports table (TSK-21850): short, so it is never cut. */
.scorm-leader-dashboard [data-gf-sort-pill] .gld-gf-v { max-width: none; }

/* The «View» menu: quick views and the order of the list. */
.scorm-leader-dashboard .gld-gf-dd { position: relative; display: inline-block; }
.scorm-leader-dashboard .gld-gf-menu {
	position: absolute;
	z-index: 30;
	top: calc(100% + 6px);
	right: 0;
	box-sizing: border-box;
	min-width: 250px;
	max-width: calc(100vw - 32px);
	padding: 8px;
	border: 1px solid var(--scorm-border-color, #d4d4d8);
	border-radius: 12px;
	background: var(--scorm-surface-color, #fff);
	color: var(--scorm-text-color, #3f3f46);
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}
.scorm-leader-dashboard .gld-gf-menu[hidden] { display: none; }
.scorm-leader-dashboard .gld-gf-menu-h { margin: 4px 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--scorm-muted-text-color, #64748b); }
.scorm-leader-dashboard .gld-gf-menu-group { display: flex; flex-direction: column; gap: 2px; }
.scorm-leader-dashboard .gld-gf-menu-group + .gld-gf-menu-h,
.scorm-leader-dashboard .gld-gf-menu-extra:not([hidden]) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--scorm-border-color, #e4e4e7); }
.scorm-leader-dashboard .gld-gf-menu-extra[hidden] { display: none; }
.scorm-leader-dashboard .gld-gf-menu .gld-gf-quickview {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 7px 10px;
	border: 0;
	border-radius: 8px;
	background: none;
	box-shadow: none;
	color: var(--scorm-text-color, #3f3f46);
	font: inherit;
	font-size: 14px;
	line-height: 1.3;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
/* Themes underline links inside post content (`.entry-content a`, often with :not() chains); the menu's items are links that read as a list, so they keep their text colour and no line. */
.entry-content .scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview,
.entry-content .scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview:hover,
.entry-content .scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview:focus,
.entry-content .scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview:visited,
.scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview,
.scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview:hover,
.scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview:focus,
.scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview:visited { color: var(--scorm-text-color, #3f3f46); text-decoration: none; text-decoration-line: none; box-shadow: none; }
.scorm-leader-dashboard .gld-gf-menu .gld-gf-quickview:hover { background: var(--scorm-surface-muted-color, #f1f3f6); }
.scorm-leader-dashboard .gld-gf-menu .gld-gf-quickview.is-on,
.scorm-leader-dashboard .gld-gf-menu .gld-gf-quickview[aria-pressed="true"],
.scorm-leader-dashboard .gld-gf-menu a.gld-gf-quickview.is-on {
	background: color-mix(in srgb, var(--scorm-primary-color, #2f6fb3) 10%, var(--scorm-surface-color, #fff));
	color: var(--scorm-heading-color, #1e293b);
	font-weight: 600;
}
.scorm-leader-dashboard .gld-gf-menu .gld-gf-quickview.is-on .gld-meta { color: inherit; }
.scorm-leader-dashboard .gld-gf-menu .gld-gf-quickview:focus-visible { outline: 2px solid var(--scorm-primary-color, #2f6fb3); outline-offset: -2px; }

/* Name, Progress and Last login on Users are the bar's orders; the heads are links. */
.entry-content .scorm-leader-dashboard .gld-panel table.gld-users-table thead th a.gld-sort,
.entry-content .scorm-leader-dashboard .gld-panel table.gld-users-table thead th a.gld-sort:hover,
.scorm-leader-dashboard .gld-panel table.gld-users-table thead th a.gld-sort,
.scorm-leader-dashboard .gld-panel table.gld-users-table thead th a.gld-sort:hover,
.scorm-leader-dashboard .gld-panel table.gld-users-table thead th a.gld-sort:focus,
.scorm-leader-dashboard .gld-panel table.gld-users-table thead th a.gld-sort:visited { text-decoration: none; text-decoration-line: none; box-shadow: none; color: inherit; }

/* The tabs and «Add participants» share a row under the page heading. */
.scorm-leader-dashboard .gld-hero--compact { margin: 0 0 24px; }
.scorm-leader-dashboard .gld-hero--compact + .gld-viewnav,
.scorm-leader-dashboard .gld-hero--compact + .gld-viewnav-row { margin-top: 0; }
.scorm-leader-dashboard .gld-viewnav-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 16px;
	border-bottom: 1px solid var(--scorm-border-color, #e4e4e7);
}
.scorm-leader-dashboard .gld-viewnav-row > .gld-viewnav { flex: 1 1 auto; min-width: 0; margin: 0; border-bottom: 0; flex-wrap: nowrap; }
.scorm-leader-dashboard .gld-viewnav-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 6px; margin-left: auto; }

/* Users: the older «Not activated» / «Never logged in» buttons leave the page (the first moves into the View menu). */
.scorm-leader-dashboard.gld-users-global .gld-search-bar { display: none; }

@media (max-width: 640px) {
	.scorm-leader-dashboard .gld-gf-top .gld-gf-box:focus-within .gld-gf-hint { display: none; }
	.scorm-leader-dashboard .gld-gf-top .gld-gf-total { flex-basis: 100%; margin: 0; text-align: left; }
	.scorm-leader-dashboard .gld-gf-menu {
		position: fixed;
		top: auto;
		right: 12px;
		bottom: 12px;
		left: 12px;
		max-width: none;
		max-height: 70vh;
		overflow-y: auto;
	}
}

/* Quiz attempts (#772): quiz filter on the left, the file button on the right, the pager under the table. */
.gld-qa-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.gld-quiz-attempts > .gld-qa-toolbar, .gld-quiz-attempts > .gld-meta { padding: 16px 20px 0; }
.scorm-leader-dashboard .gld-panel table.gld-qa-table .gld-qa-day { white-space: nowrap; }
.scorm-leader-dashboard .gld-panel table.gld-qa-table thead th { white-space: normal; padding-left: 12px; padding-right: 12px; }
.scorm-leader-dashboard .gld-panel table.gld-qa-table td { padding-left: 12px; padding-right: 12px; }
.scorm-leader-dashboard .gld-panel table.gld-qa-table td.gld-qa-quiz { min-width: 140px; }
.gld-qa-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.gld-qa-filter label { font-weight: 600; }
.gld-qa-filter .gld-select { width: auto; min-width: 220px; max-width: 100%; }
.gld-qa-toolbar .gld-meta { margin: 0; }
.gld-qa-export { margin: 0; }
.gld-quiz-attempts .gld-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 20px; }
