/* === tokens === */
:root {
	/* brand */
	--color-brand:           #ffea00;   /* devBar accent */
	--color-brand-ink:       #000000;

	/* surfaces */
	--surface-page:          #ffffff;
	--surface-sidebar:       #f5f5f5;
	--surface-sidebar-hover: #d9d9d9;
	--surface-sidebar-active:#e1e1e1;
	--surface-footer:        #f1f1f1;
	--surface-row-hover:     #d9edf7;
	--surface-header-float:  rgba(237, 237, 237, 0.9);
	--surface-disabled:      #d9d9d9;   /* same value as sidebar-hover, different meaning */

	/* text */
	--text-default:          #212529;
	--text-muted:            #a7a7a7;
	--text-muted-strong:     #8f8f8f;
	--text-muted-soft:       #b0b0b0;
	--text-caption:          #9c9c9c;
	--text-footer:           #818181;
	--text-disabled-row:     #b4b4b4;
	--text-form:             #495057;

	/* borders */
	--border-default:        #ced4da;
	--border-soft:           #dee2e6;
	--border-faint:          rgba(237, 237, 237, 0.9);

	/* state / shadow */
	--color-required:        #dc3545;
	--shadow-elevated:       0px 0px 10px 0px rgba(0, 0, 0, 0.20);
	--shadow-datepicker:     0px 0px 10px #c9c9c9;

	/* state colors — Bootstrap-ish bg + text pairs used by toasts,
	   audit-log severity rows, password validator hints, etc. */
	--state-success-bg:      #d4edda;
	--state-success-text:    #3c763d;
	--state-warning-bg:      #fff3cd;
	--state-warning-text:    #856404;
	--state-danger-bg:       #f8d7da;
	--state-danger-text:     #a94442;
	--state-danger-strong:   #721c24;
	--state-notice-bg:       #d1ecf1;
	--state-info-bg:         #fffbea;

	/* extras */
	--text-muted-bs:         #6c757d;        /* Bootstrap text-muted */
	--surface-alt-row:       #f8f9fa;        /* cards alternating-row bg */

	/* dimensions */
	--sidebar-width:         200px;
	--masthead-height:       55px;
	--radius-sm:             0.15rem;
	--radius-default:        0.25rem;

	/* typography */
	--font-size-caption:     0.8rem;
	--font-size-info:        0.8em;
	--font-size-xs-btn:      0.6rem;
}
/* === /tokens === */


/* devBar utils */
#devBar {
	background-image: linear-gradient(135deg, var(--color-brand) 25%, var(--color-brand-ink) 25%, var(--color-brand-ink) 50%, var(--color-brand) 50%, var(--color-brand) 75%, var(--color-brand-ink) 75%, var(--color-brand-ink) 100%);
	background-size: 20.00px 20.00px;
	top: 0px;
	position: fixed;
	z-index: 999999;
	width: 100%;
	height: 10px;
	line-height: 0em;
	xdisplay: none;
}

#devBar #bootstrapWindowSize div {
	background-color: var(--color-brand);
	color: var(--color-brand-ink);
	float: left;
	padding-left: 4px;
	padding-right: 4px;
	font-size: 10px;
	line-height: 10px;
	height: 10px;
}

#moreFileInfo {
	background-color: var(--color-brand-ink);
	color: var(--color-brand);
	text-transform: uppercase;
	text-decoration: none;
	padding-left: 5px;
	padding-right: 5px;
	display: inline-block;
	font-size: 10px;
	line-height: 10px;
}

#moreFileInfo a {
	font-weight: bold;
	color: var(--color-brand);
}
/* /devBar */






/* main navbar */
header nav .profile-image {
	width: 20px;
	height: 20px;
}

.navbar-brand {
	margin-right: 0px;
}
/* /main navbar */




/* footer */
footer {
	min-height: 1rem;
	text-align: center;
	font-size: 0.5rem;
	background-color: var(--surface-footer);
	color: var(--text-footer);
	margin-top: 1rem;
	padding: 4px 4px;
	text-transform: uppercase;
	-webkit-box-shadow: var(--shadow-elevated);
	-moz-box-shadow: var(--shadow-elevated);
	box-shadow: var(--shadow-elevated);
}

.footerInfo .infoTitle {
	xmargin-left: 20px;
}

.deleteButtonWrapper {
	text-align: right;
}

.voidButtonWrapper {
	text-align: right;
}

.footerInfo {
	text-align: center;
	color: var(--text-muted);
}
/* /footer */







/* sidebar */
main.wrapper {
	display: flex;
	width: 100%;
	align-items: stretch;
}

#idSearch {
	cursor: pointer;
}

#sidebar {
	min-width: var(--sidebar-width);
	max-width: var(--sidebar-width);
	min-height: 100vh;
	transition: all 0.3s;
	margin-top: -1rem;
}

#sidebar.active {
	margin-left: calc(-1 * var(--sidebar-width));
}

#sidebar .nav-link {
	margin-left: -15px;
	margin-right: -15px;
	padding-left: 31px;
	padding-right: 30px;
}

#sidebar .nav-link:hover {
	background-color: var(--surface-sidebar-hover);
}

#sidebar a.active {
	background-color: var(--surface-sidebar-active);
}

@media (max-width: 575px) {
	#sidebar {
		margin-left: calc(-1 * var(--sidebar-width));
	}
	#sidebar.active {
		margin-left: 0px;
	}
}

#sidebar {
	background-color: var(--surface-sidebar);
	padding: 20px 0px;
}
/* /sidebar */









/* here comes the general */
body {
	padding-top: var(--masthead-height); /* height of masthead */
}

main {
	padding-top: 15px;
	padding-bottom: 2rem;
}

h1 {
	xfont-weight: lighter;
	margin-top: 0px;
	font-size: 32px;
}

h1 small {
	xfont-weight: lighter;
	font-size: 45%;
	color: var(--text-muted-soft);
}


h2 {
	xfont-weight: lighter;
	margin-top: 0px;
}

p.caption {
	font-size: var(--font-size-info);
	color: var(--text-caption);
}

label + p.caption {
	margin-top: -0.5rem;
}

label + .caption {
	margin-top: -0.5rem;
}

.alert { /* the notification */
	text-align: center;
}

form label {
	font-weight: bold;
	xfont-weight: lighter;
}

form input[type="checkbox"] + label {
	font-weight: normal;
}

.caption {
	font-size: var(--font-size-caption);
	margin-bottom: 0px;
	color: var(--text-muted-strong);
}

label.required .fa-asterisk {
	color: var(--color-required);
	font-size: var(--font-size-xs-btn);
	vertical-align: text-top;
}

.searchButtonWrapper {
	text-align: right;
}

.bg-light .btn-light {
	border-color: var(--border-default);
	background-color: var(--surface-page);
}
/* /here comes the general */





/* editor */
.infoBlock {
	white-space: nowrap;
}

.infoTitle {
	color: var(--text-muted);
	display: inline;
	text-transform: uppercase;
	font-size: var(--font-size-info);
	font-weight: bold;
}

.infoTitle:after {
	content: ":";
}

.info {
	display: inline;
}

h1 small {
	color: var(--text-muted-soft);
}

.editorHeaderButtons {
	text-align: right;
	white-space: nowrap;
}

#editorHeader {
	border-bottom: 1px solid var(--border-faint);
	margin-bottom: 20px;
}

/*
#editorHeader.affix {
	background-color: rgba(237, 237, 237, 0.9);
	z-index: 1029;
	width: 100%;
	left: 0px;
	margin-left: 0px;
	padding-top: 10px;
}
*/

#editorHeader.floating {
	padding-top: 0.5rem;
	xpadding-bottom: 0.5rem;
	-webkit-box-shadow: var(--shadow-elevated);
	-moz-box-shadow: var(--shadow-elevated);
	box-shadow: var(--shadow-elevated);
}

#editorHeader.floating + .row {
	xmargin-top: 65px;
}

#editorHeader.floating {
	background-color: var(--surface-header-float);
	position: fixed;
    top: -100px;
    width: 100%;
    z-index: 1029;
    transition: top 0.5s ease 0s;
    -webkit-transition: top 0.5s ease 0s;
    -moz-transition: top 0.5s ease 0s;
    -o-transition: top 0.5s ease 0s;
}

#editorHeader {
	border-bottom: 1px solid var(--border-faint);
	margin-bottom: 20px;
}

.bootstrap-datetimepicker-widget {
	box-shadow: var(--shadow-datepicker);
}
/* /editor */










/* buttons */
.btn-outline-primary {
	background-color: var(--surface-page);
}

.btn-group-xs > .btn, .btn-xs { /* -xs doesn't exist in bs4 */
	padding: 0.3rem 0.3rem;
	font-size: var(--font-size-xs-btn);
	line-height: 0.5;
	border-radius: var(--radius-sm);
}
/* /buttons */








/* form field overrides */
.custom-select.is-valid, .form-control.is-valid, .was-validated .custom-select:valid, .was-validated .form-control:valid {
/* .custom-select.is-invalid, .form-control.is-invalid, .was-validated .custom-select:invalid, .was-validated .form-control:invalid { */
	border-color: var(--border-default);
}

.custom-select.is-valid:focus, .form-control.is-valid:focus, .was-validated .custom-select:valid:focus, .was-validated .form-control:valid:focus {
/* .custom-select.is-invalid:focus, .form-control.is-invalid:focus, .was-validated .custom-select:invalid:focus, .was-validated .form-control:invalid:focus { */
	border-color: var(--border-default);
	box-shadow: 0 0 0 0;
}

.form-control.is-valid, .was-validated .form-control:valid {
	background-image: none; /* remove checkbox from valid fields */
}
/* /form field overrides */







/* Bootstrap Toggle v2.2.2 corrections for Bootsrtap 4 */
.toggle-off {
	box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.toggle.off {
	border-color: rgba(0, 0, 0, 0.25);
}

.toggle-handle {
	background-color: white;
	border: thin rgba(0, 0, 0, 0.25) solid;
}






/* datatables */
.dt-bootstrap4 .buttonBar button {
	margin-right: 4px;
	border-color: var(--border-soft);
	background-color: var(--surface-page);
	color: var(--text-muted-bs);
	border-radius: var(--radius-default) !important;
}

table.dataTable thead th {
	white-space: nowrap;
}

table.dataTable tr.unpublished {
	color: var(--text-disabled-row);
}

table.dataTable tr.futureRow {
	font-style: italic;
}

table.dataTable .gripper {
	cursor: move;
}

table.dataTable tr.even:hover,
table.dataTable tr.odd:hover {
	background-color: var(--surface-row-hover);
	cursor: pointer;
}

table.dataTable thead .sorting:after { /* only show the sorter icons when the row is actually sorting */
	content: none;
}

.tableUtils {
	margin-top: 10px;
	font-size: 85%;
}

.nowrapDate {
	white-space: nowrap;
}

.multiselect-container>li>a>label {
	padding-left: 15px;
}

th.dt-center, td.dt-center {
	text-align: center;
}

table.dataTable td.control {
	width: 20px;
	min-width: 20px;
}

table.dataTable.dtr-column>tbody>tr>td.control:before,
table.dataTable.dtr-column>tbody>tr>th.control:before {
	box-shadow: 0px 0px 0px black;
	border: 0px;
	width: 20px;
	background-color: transparent;
	font-family: inherit;
	font-size: 2em;
	color: inherit;
	content: "▸";
}

table.dataTable.dtr-column>tbody>tr.parent td.control:before,
table.dataTable.dtr-column>tbody>tr.parent th.control:before {
	content: "▾";
	background-color: transparent;
}

/* responsive subtable should be 100% wide */
table.dataTable>tbody>tr.child ul.dtr-details {
	display: block;
}

.dataTables_wrapper .totalRecords {
	font-size: var(--font-size-info);
}

/* small screens */
@media (max-width: 767px) {
	.tableUtils {
		text-align: center;
		margin-bottom: 1em;
	}
}
/* /datatables */






/* special links */
.downloadLink {
	text-transform: uppercase;
}
/* /special links */




/* dropzone */
.dropzone {
	border: 0px;
	background-color: transparent;
	padding: 0px;
	min-height: 50px;
}

.dropzone .dz-preview,
.dropzone .dz-preview .dz-image {
	width: 100%;
	height: auto;
	margin: 0px;
	border-radius: 0px;
}

.purchaseOrder .dz-preview .dz-image {
	max-height: 500px;
	overflow-y: auto;

}

.dropzone .dz-preview .dz-image img {
	width: 100%;
}

.dropzone .dz-message {
	margin: 0px;
	padding-top: 2em;
	padding-bottom: 2em;
	border: 1px solid silver;
}

.dropzone .dz-details {
	display: none;
}

.dropzone .dz-preview .dz-error-message {
	color: white;
	left: auto;
	width: auto;
	top: 120px;
}

.dropzone .dz-preview .dz-remove {
	font-size: var(--font-size-info);
}

.dropzone .dz-preview:hover .dz-image img {
	-webkit-transform: inherit;
	-moz-transform: inherit;
	-ms-transform: inherit;
	-o-transform: inherit;
	transform: inherit;
	-webkit-filter: inherit;
	filter: inherit;
}

.dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {
	top: 50px;
}

.dropzone .dz-preview.dz-image-preview {
	background-color: transparent;
}
.select-form-control {
	display: block;
	width: 100%;
	height: calc(1.5em + .75rem + 2px);
	padding: .375rem .75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--text-form);
	background-color: var(--surface-page);
	background-clip: padding-box;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-default);
	transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
/* /dropzone */




/* === shared utilities (promoted from pages in Phase E) ===
   Class-named utilities that appeared identically in 3+ pages get hoisted
   here so they apply globally and the page namespaces stay smaller.

   NOT promoted, even though they appear in 3+ pages:
   - `.text-wrap` (classification, content-management, content-management-bingo)
     collides with Bootstrap 4's own `.text-wrap` utility class.
   - `header, footer { display: none !important; }` (sign-in, password-reset,
     password-reset-request, both announcer-scripts) — promoting unprefixed
     would hide the global chrome on every page in the app.
   - `.dropzone .dz-details { display: block }` + `.dropzone .dz-preview /
     .dz-image { height: 120px }` (events-images-editor, events-attachments-
     editor, events-schedule-editor, common-broadcast-compose-email) — these
     override the base `.dropzone` rules above. Promoting globally would
     break every other dropzone in the app. */
.selectedRow {
	font-weight: bold;
}
.deleterIconCell {
	cursor: pointer;
}
.cloneSource {
	display: none;
}
.noRecords {
	text-align: center;
	padding: 10px;
	color: silver;
	border-top: 1px solid silver;
}
/* === /shared utilities === */


/* === pages === */
/* Per-page styles extracted from inline <style> blocks. Each block is
   namespaced by the body class set via $wrapper->bodyClass on its page. */


/* C1 — Phase C1: low-risk standalone pages */

/* page-account-credentials — from account/credentials/index.php */
body.page-account-credentials .passwordMeter .progress {
	height: 4px;
	margin-top: -10px;
}

/* page-account-password-reset — from account/password-reset/index.php */
body.page-account-password-reset header,
body.page-account-password-reset footer {
    display: none !important;
}
body.page-account-password-reset .has-error .form-control {
    border-color: var(--state-danger-text);
}
body.page-account-password-reset .has-error .form-control:focus {
    box-shadow: 0 0 0 0.2rem #a9444266;
}
body.page-account-password-reset .has-success .form-control {
    border-color: var(--state-success-text);
}
body.page-account-password-reset .has-success .form-control:focus {
    box-shadow: 0 0 0 0.2rem #3c763d66;
}
body.page-account-password-reset .text-red {
    color: var(--state-danger-text);
}
body.page-account-password-reset .has-error span {
    font-size: .85rem
}
body.page-account-password-reset .pw-rules {
    list-style: none;
    padding: 0;
    margin: .5rem 0 0;
    font-size: .85rem;
}
body.page-account-password-reset .pw-rules li {
    padding: 2px 0;
    color: #888;
    transition: color .15s;
}
body.page-account-password-reset .pw-rules li .fa {
    width: 16px;
    text-align: center;
    margin-right: 4px;
}
body.page-account-password-reset .pw-rule-pass {
    color: var(--state-success-text) !important;
}
body.page-account-password-reset .pw-rule-pass .fa { color: var(--state-success-text); }
body.page-account-password-reset .pw-rule-fail {
    color: var(--state-danger-text) !important;
}
body.page-account-password-reset .pw-rule-fail .fa { color: var(--state-danger-text); }

/* page-account-password-reset-request — from account/password-reset/request/index.php */
body.page-account-password-reset-request header,
body.page-account-password-reset-request footer {
	display: none !important;
}

/* page-account-sign-in — from account/sign-in/index.php */
body.page-account-sign-in header,
body.page-account-sign-in footer {
	display: none !important;
}
body.page-account-sign-in body {
	xbackground-color: #f9f9f9;
}

/* page-admin-audit-logs — from admin/audit-logs/index.php */
body.page-admin-audit-logs .auditTile {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 15px;
    background: #fff;
    transition: box-shadow 0.15s;
}
body.page-admin-audit-logs .auditTile:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }
body.page-admin-audit-logs .auditTile.disabled { background: var(--surface-alt-row); opacity: 0.6; }
body.page-admin-audit-logs .auditTile .tileCount { font-size: 2.5em; font-weight: 300; color: #343a40; }
body.page-admin-audit-logs .auditTile .tileLabel { color: var(--text-muted-bs); font-size: 0.9em; text-transform: uppercase; letter-spacing: 0.05em; }
body.page-admin-audit-logs .auditTile .tileDomain { font-size: 1.4em; margin-bottom: 10px; text-transform: capitalize; }
body.page-admin-audit-logs .auditTile a { color: inherit; text-decoration: none; display: block; }

/* page-admin-audit-logs-view — from admin/audit-logs/view.php */
body.page-admin-audit-logs-view .auditTabs .nav-link { text-transform: capitalize; }
body.page-admin-audit-logs-view .auditTabs .nav-link.disabled { color: #999 !important; cursor: not-allowed; }
body.page-admin-audit-logs-view td.severity-warning  { background-color: var(--state-warning-bg); }
body.page-admin-audit-logs-view td.severity-critical { background-color: var(--state-danger-bg); }
body.page-admin-audit-logs-view td.severity-notice   { background-color: var(--state-notice-bg); }
body.page-admin-audit-logs-view td.correlation-cell  { font-family: monospace; font-size: 0.85em; }
body.page-admin-audit-logs-view td.correlation-cell a { text-decoration: none; }

/* SC-1961 — cross-surface badge. The Events tab UNIONs in admin rows
   whose metaJson.eventID is set (staff grants/revokes etc.), and the
   Admin tab also shows those same rows natively. Without a marker
   operators see them in both places and read it as a duplicate-bug.
   The badge makes the cross-surface intentional. */
body.page-admin-audit-logs-view .auditSourceBadge {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--state-warning-bg);
    color: var(--state-warning-text);
    vertical-align: middle;
}
body.page-admin-audit-logs-view tr.auditCrossSurfaceRow { background-color: var(--state-info-bg) !important; }

/* SC-1961 — DataTables child-row (inline detail) styling.
   The control column is column 0. Clicking toggles a child row that
   fetches detail-fragment.php for that auditID. Matches BDPA pattern. */
body.page-admin-audit-logs-view td.auditExpandControl { cursor: pointer; text-align: center; width: 30px; user-select: none; }
body.page-admin-audit-logs-view td.auditExpandControl:before { content: "+"; font-weight: bold; color: #0d6efd; }
body.page-admin-audit-logs-view tr.shown td.auditExpandControl:before { content: "\2212"; }
body.page-admin-audit-logs-view tr.auditChildRow > td { background: var(--surface-alt-row); padding: 12px 18px; }
body.page-admin-audit-logs-view tr.auditChildRow .auditDetail--fragment dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 20px; margin-bottom: 8px; }
body.page-admin-audit-logs-view tr.auditChildRow .auditDetail--fragment dt { font-weight: 600; color: #555; }
body.page-admin-audit-logs-view tr.auditChildRow .auditDetail--fragment dd { margin: 0; word-break: break-word; }
body.page-admin-audit-logs-view tr.auditChildRow .auditDetail--fragment .sectionHeader { margin-top: 14px; margin-bottom: 6px; font-weight: 600; font-size: 1em; border-bottom: 1px solid #dee2e6; padding-bottom: 3px; }
body.page-admin-audit-logs-view tr.auditChildRow .diffTable td,
body.page-admin-audit-logs-view tr.auditChildRow .diffTable th { vertical-align: top; padding: 4px 8px; }
body.page-admin-audit-logs-view tr.auditChildRow .diffTable .fieldName { font-family: monospace; font-weight: 600; }
body.page-admin-audit-logs-view tr.auditChildRow .diffTable .oldValue { color: var(--state-danger-strong); background: var(--state-danger-bg); }
body.page-admin-audit-logs-view tr.auditChildRow .diffTable .newValue { color: #155724; background: var(--state-success-bg); }
body.page-admin-audit-logs-view tr.auditChildRow pre.jsonBlock { background: #ffffff; border: 1px solid #e1e4e8; border-radius: 4px; padding: 8px; font-size: 0.8em; max-height: 300px; overflow: auto; }
body.page-admin-audit-logs-view tr.auditChildRow .auditLoading { color: var(--text-muted-bs); font-style: italic; }

/* page-admin-merge — from admin/merge/index.php */
body.page-admin-merge .card-header {
	cursor: pointer;
}

/* page-classification — from classification/index.php */
body.page-classification .text-wrap{
    white-space:normal;
     word-wrap:break-word;
}
body.page-classification .width-200 {
    width:205px;
}
body.page-classification .custom-width {
    width: 7%;
}

/* page-content-management-bingo — from content-management/bingo/index.php */
body.page-content-management-bingo .text-wrap{
    white-space:normal;
     word-wrap:break-word;
}
body.page-content-management-bingo .width-200 {
    width:305px;
}

/* page-content-management-crud-list — from content-management/crud/list/index.php */
body.page-content-management-crud-list .actionButtons {
    width: 100px;
    display: inline-flex;
}

/* page-content-management — from content-management/index.php */
body.page-content-management .text-wrap{
    white-space:normal;
     word-wrap:break-word;
}
body.page-content-management .width-200 {
    width:305px;
}

/* page-index — from womp/index.php
   NOTE: index.php exits with header('Location: /events/') on line 3,
   so the body class never fires. Style block was deleted as dead code;
   no rules are extracted here. */

/* page-news-editor — from news/editor.php */
body.page-news-editor .note-editing-area img {
    max-width: 100%;
}
body.page-news-editor .extraUtilButton {
    margin-right: 50px;
}

/* C2 — Phase C2: editor pages */

/* page-people-editor — from people/editor.php */
body.page-people-editor h2.tableHeading {
    font-size: 1.1em;
    margin-bottom: 0px;
    margin-top: 0px;
    padding: 10px;
    background-color: #c4c4c4;
    -webkit-border-top-left-radius: 4px;
    -webkit-border-top-right-radius: 4px;
    -moz-border-radius-topleft: 4px;
    -moz-border-radius-topright: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    text-transform: uppercase;
    color: #f9f9f9;
}
body.page-people-editor h2.tableHeading .btn-group {
    text-transform: none;
}
body.page-people-editor .dataTables_scroll {
    margin-bottom: 6px;
}
body.page-people-editor .tableUtils {
    display: none;
}
body.page-people-editor table.dataTable {
    margin-top: 0px !important;
}
body.page-people-editor .invoiceSubtable {
    width: 100%;
}
body.page-people-editor .invoiceSubtable th {
    text-transform: uppercase;
    font-size: 0.8em;
    color: #a5a5a5;
}
body.page-people-editor .invoiceSubtable .invoiceID {
    width: 15%;
}
body.page-people-editor .invoiceSubtable .amount,
body.page-people-editor .invoiceSubtable .balance {
    width: 20%;
    text-align: right;
}
body.page-people-editor .deceased {
    top: -3px;
    position: relative;
}
body.page-people-editor .footerUtils .form-group {
    margin-bottom: 0px;
}

/* page-units-editor — from units/editor.php */
body.page-units-editor td.date {
    white-space: nowrap;
}

/* page-units-productions-editor — from units/productions/editor.php;
   `.cloneSource` and `.noRecords` promoted to shared utilities */
body.page-units-productions-editor td.gripper {
    width: 10px;
    color: #aaaaaa;
    vertical-align: middle;
    cursor: move;
    padding-left: 0px;
    padding-right: 0px;
}
body.page-units-productions-editor .unitProductionPeople th {
    text-transform: uppercase;
    color: #aaaaaa;
    font-size: 0.8em;
}

/* page-units-purchase-order-editor — from units/purchase-order/editor.php
   The original inline block applied a PDF override conditionally via PHP.
   We keep the override in CSS and gate it with the `.has-pdf` body class
   that the page sets when the uploaded file is a PDF. */
body.page-units-purchase-order-editor .dropzone .dz-remove {
    color: #fff;
    background-color: var(--color-required);
    border-color: var(--color-required);
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    cursor: pointer;
    display: inline-block !important;
}
body.page-units-purchase-order-editor .dz-image {
    padding: .05rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    max-width: 100%;
    width: auto;
    margin-bottom: 5px !important;
}
body.page-units-purchase-order-editor.has-pdf .dz-image {
    padding: 0;
    background-color: #fff;
    border: 0 !important;
    max-width: 100%;
    width: auto;
    margin: 0 !important;
}
body.page-units-purchase-order-editor .dz-file-preview,
body.page-units-purchase-order-editor .dz-image-preview {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

/* page-units-invoices-print — from units/invoices/print.php
   This is a print template that does not use the Wrapper class. The page
   sets <body class="page-units-invoices-print"> directly. */
body.page-units-invoices-print {
    background-color: white;
    font-size: 0.8em;
    color: black;
}
body.page-units-invoices-print .header {
    padding-top: 20px;
    padding-bottom: 1em;
    padding-left: 50px;
    padding-right: 50px;
}
body.page-units-invoices-print .body {
    padding-left: 50px;
    padding-right: 50px;
}
body.page-units-invoices-print .logo {
    width: 130px;
    float: right;
}
body.page-units-invoices-print .logo img {
    width: 130px;
}
body.page-units-invoices-print .date {
    margin-bottom: 2em;
    font-size: 0.8em;
}
body.page-units-invoices-print .memberStatementHeader {
    text-transform: uppercase;
    text-align: center;
    border-top: 1px solid silver;
    border-bottom: 1px solid silver;
    padding: 3px;
    margin-bottom: 1em;
    font-size: 0.9em;
    font-weight: bold;
}
body.page-units-invoices-print .payOnline {
    font-size: 1.2em;
    margin-bottom: 1em;
}
body.page-units-invoices-print .footer {
    text-align: center;
    font-size: 0.8em;
}
body.page-units-invoices-print .pageBreak {
    page-break-after: always;
}
body.page-units-invoices-print .statement table tr td {
    border-bottom: 1px dashed silver;
}
body.page-units-invoices-print .statement table tr td.noGoods {
    border-bottom: 0px;
    font-size: 0.8em;
}
body.page-units-invoices-print .name {
    font-weight: bold;
    font-size: 1.6em;
}
body.page-units-invoices-print .address {
    padding-top: 80px;
    padding-bottom: 50px;
}
body.page-units-invoices-print .none {
    padding: 100px;
    text-align: center;
}
body.page-units-invoices-print .clear {
    clear: both;
}
body.page-units-invoices-print th {
    white-space: nowrap;
}
body.page-units-invoices-print .invoiceDate {
    white-space: nowrap;
}
body.page-units-invoices-print .amount,
body.page-units-invoices-print .balance,
body.page-units-invoices-print .amountToPay {
    text-align: right;
}
body.page-units-invoices-print .amountToPay {
    display: none;
}

/* page-classification-editor — from classification/editor.php;
   `.cloneSource` and `.noRecords` promoted to shared utilities */
body.page-classification-editor .select2-selection__rendered {
    max-height: 150px;
    overflow-x: auto;
}
body.page-classification-editor .select2-container .select2-selection--multiple .select2-selection__rendered {
    overflow: auto;
}

/* page-marketing-modals-editor — from marketing-modals/editor.php */
body.page-marketing-modals-editor #actionButtonColorPicker {
    position: relative;
    width: 64px;
    min-width: 64px;
    height: 38px;
}
body.page-marketing-modals-editor #actionButtonColorPicker .colorpicker-value {
    position: absolute;
    inset: 0;
    opacity: 0.01;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
}
body.page-marketing-modals-editor #actionButtonColorPreview {
    width: 64px;
    height: 38px;
    padding: 2px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.page-marketing-modals-editor #actionButtonColorPreview i {
    display: inline-block;
    width: 100%;
    height: 100%;
    border-radius: .2rem;
}

/* page-events — from events/index.php */
body.page-events #calendar {
    width: 100%;
}
body.page-events #calendar tr.calHeader th {
    text-align: center;
    height: auto;
    font-size: 0.8em;
    text-transform: uppercase;
    padding: 2px;
    border: 1px solid #d1d1d1;
    background-color: #f8f8f8;
    font-weight: normal;
}
body.page-events #calendar td {
    border: 1px solid #d1d1d1;
    padding: 4px;
    width: 14%;
    height: 90px;
    vertical-align: top;
}
body.page-events #calendar td.today {
    background-color: #fef3d3;
}
body.page-events #calendar td .unpublished a,
body.page-events .name.unpublished a {
    color: #9f9f9f;
}
body.page-events .addEventIcon {
    display: inline-block;
    margin-left: 5px;
    cursor: pointer;
}
body.page-events .event {
    margin-bottom: 1em;
    line-height: normal;
}
body.page-events .performance {
    font-weight: bold;
}
body.page-events .location {
    color: #9f9f9f;
    font-size: 0.8em;
    font-weight: normal;
}
body.page-events td .date {
    font-weight: bold;
    font-size: 1.2em;
    color: #c3c3c3;
}
body.page-events #monthNav {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 1em;
}
body.page-events #monthNav a {
    text-decoration: none;
}
body.page-events .mobileDate {
    white-space: nowrap;
    color: #717171;
    font-weight: bold;
}
body.page-events .mobileDate .dayOfWeek {
    text-transform: uppercase;
    font-size: 0.8em;
    font-weight: normal;
}
body.page-events main .calendarUtils {
    margin-top: 1em;
}
body.page-events main .calendarUtils a {
    margin-right: 15px;
}

/* page-events-editor — from events/editor.php (two adjacent inline blocks) */
body.page-events-editor .buttonBar,
body.page-events-editor .totalRecords,
body.page-events-editor .thePager {
    xdisplay: none;
}
body.page-events-editor .cloneButton {
    margin-right: 50px;
}
body.page-events-editor .gripper {
    width: 10px;
}
body.page-events-editor .entry {
}
body.page-events-editor .break {
    font-weight: bold;
}
body.page-events-editor .actions .btn-group,
body.page-events-editor .actions .form-group {
    margin-left: 4px;
}
body.page-events-editor #scheduleGrid_wrapper .topUtils {
    display: none;
}
body.page-events-editor .custom-select {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}
body.page-events-editor .custom-select option:nth-child(1) {
    background-color: #cce5ff;
}
body.page-events-editor .custom-select option:nth-child(2) {
    background-color: #e2e3e5;
}
body.page-events-editor .custom-select option:nth-child(3) {
    background-color: var(--state-success-bg);
}
body.page-events-editor .custom-select option:nth-child(4) {
    background-color: var(--state-danger-bg);
}
body.page-events-editor .custom-select option:nth-child(5) {
    background-color: var(--state-warning-bg);
}
body.page-events-editor .custom-select option:nth-child(6) {
    background-color: var(--state-notice-bg);
}
body.page-events-editor #eventDaysTable th,
body.page-events-editor #eventDaysTable td { vertical-align: middle; white-space: nowrap; }
body.page-events-editor #eventDaysTable th:nth-child(1) { width: 60px; }
body.page-events-editor #eventDaysTable th:nth-child(4),
body.page-events-editor #eventDaysTable th:nth-child(5) { width: 170px; }
body.page-events-editor #eventDaysTable th:nth-child(6) { width: 110px; }
body.page-events-editor #eventDaysTable th:nth-child(7) { width: 70px; }
body.page-events-editor #eventDaysTable .input-group.date { flex-wrap: nowrap; }
body.page-events-editor #eventDaysTable .datetimepicker-input { min-width: 100px; }
body.page-events-editor .bootstrap-datetimepicker-widget.dropdown-menu {
    border: 1px solid rgba(0,0,0,.2) !important;
    border-radius: 8px !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.2) !important;
    padding: 12px !important;
    width: auto !important;
    min-width: 16rem !important;
}
body.page-events-editor .bootstrap-datetimepicker-widget .timepicker-hour,
body.page-events-editor .bootstrap-datetimepicker-widget .timepicker-minute,
body.page-events-editor .bootstrap-datetimepicker-widget .timepicker-second {
    font-size: 1.4em !important;
    font-weight: 700 !important;
    color: #333 !important;
}
body.page-events-editor .bootstrap-datetimepicker-widget table td {
    padding: 8px 10px !important;
}
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn {
    border-radius: 6px !important;
}
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="incrementHours"],
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="incrementMinutes"],
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="decrementHours"],
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="decrementMinutes"] {
    color: #495057 !important;
}
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="incrementHours"]:hover,
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="incrementMinutes"]:hover,
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="decrementHours"]:hover,
body.page-events-editor .bootstrap-datetimepicker-widget table td .btn[data-action="decrementMinutes"]:hover {
    background: #e9ecef !important;
    border-radius: 6px !important;
}
body.page-events-editor .bootstrap-datetimepicker-widget table td span.separator {
    font-size: 1.2em !important;
    font-weight: 700 !important;
}

/* page-events-images-editor — from events/images/editor.php */
/* overrides so it will display a box to indicate a pdf is ready to upload */
body.page-events-images-editor .dropzone .dz-details {
	display: block;
}
body.page-events-images-editor .dropzone .dz-preview,
body.page-events-images-editor .dropzone .dz-preview .dz-image {
	height: 120px;
}

/* page-events-attachments-editor — from events/attachments/editor.php */
/* overrides so it will display a box to indicate a pdf is ready to upload */
body.page-events-attachments-editor .dropzone .dz-details {
	display: block;
}
body.page-events-attachments-editor .dropzone .dz-preview,
body.page-events-attachments-editor .dropzone .dz-preview .dz-image {
	height: 120px;
}

/* page-events-add-ons-purchases — from events/add-ons/purchases.php */
body.page-events-add-ons-purchases .card-header {
    background-color: #cad7ff;
}
body.page-events-add-ons-purchases .stat-value {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}
body.page-events-add-ons-purchases .stat-label {
    text-align: center;
    color: #666;
}

/* C3 — Phase C3: schedule-heavy pages */

/* page-events-critique-schedule-editor — was-only `.selectedRow`, now in shared utilities */
/* page-events-default-positions-assign-person-any — was-only `.selectedRow`, now in shared utilities */
/* page-events-default-positions-assign-person-other — was-only `.selectedRow`, now in shared utilities */
/* page-events-default-positions-assign-person — was-only `.selectedRow`, now in shared utilities */
/* page-events-default-positions-editor — `.selectedRow` promoted; partial rules below */
/* page-events-schedule-editor — `.selectedRow` promoted; overwrite-modal partial rules below */
/* page-events-warmup-schedule-editor — was-only `.selectedRow`, now in shared utilities */

/* page-events-schedule-usb-announcer-script — from events/schedule/usb/announcer-script.php
   This is a print/announcer page; styles include print media queries and
   layout overrides that hide the global header/footer for the print view. */
body.page-events-schedule-usb-announcer-script {
    background-color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;
    padding: 0px;
}
@media print {
    body.page-events-schedule-usb-announcer-script {
        font-family: -apple-system, "Roboto", "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif !important;
        text-align: justify;
    }
}
body.page-events-schedule-usb-announcer-script header,
body.page-events-schedule-usb-announcer-script footer {
    display: none;
}
body.page-events-schedule-usb-announcer-script main {
    margin-top: 0px;
    margin-left: 5em;
    margin-right: 5em;
    margin-bottom: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
}
body.page-events-schedule-usb-announcer-script .spielWrapper {
    margin-top: 1em;
}
body.page-events-schedule-usb-announcer-script #devBar {
    display: none;
}
body.page-events-schedule-usb-announcer-script .instructions {
    font-size: 0.8em;
    text-align: center;
}
body.page-events-schedule-usb-announcer-script .dialog {
    font-family: monospace;
    border: 1px solid silver;
    padding: 1em;
    padding-bottom: 0px;
    font-size: 1.2em;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
}
body.page-events-schedule-usb-announcer-script .dialog .instructions {
    font-family: initial;
    font-size: 0.6em;
}
body.page-events-schedule-usb-announcer-script .dialog .instructions {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;
    padding: 0px;
}
@media print {
    body.page-events-schedule-usb-announcer-script .dialog .instructions {
        font-family: -apple-system, "Roboto", "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif !important;
    }
}
body.page-events-schedule-usb-announcer-script .phonetic {
    xfont-family: monospace;
    font-weight: normal;
    xfont-size: 1.2em;
    color: #888888;
}
body.page-events-schedule-usb-announcer-script h2.eventNameDate {
    text-transform: uppercase;
    font-size: 0.8em;
}
body.page-events-schedule-usb-announcer-script .act {
    margin-top: 10px;
    text-align: center;
}
body.page-events-schedule-usb-announcer-script .additionalNotes {
    font-size: 0.8em;
}
body.page-events-schedule-usb-announcer-script .pageBreak {
    page-break-after: always;
}
body.page-events-schedule-usb-announcer-script .otherBlock {
    text-align: center;
    padding-top: 200px;
    padding-bottom: 200px;
}
body.page-events-schedule-usb-announcer-script .otherBlock .description {
    font-size: 2.5em;
    font-weight: bold;
}
body.page-events-schedule-usb-announcer-script .dialog .instructions {
    color: red;
}
body.page-events-schedule-usb-announcer-script .fillIn {
    color: red;
}
body.page-events-schedule-usb-announcer-script .opening {
    padding: 15px;
    border: 1px dashed silver;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
}
body.page-events-schedule-usb-announcer-script .logo {
    text-align: center;
    margin-bottom: 1em;
}
body.page-events-schedule-usb-announcer-script .logo img {
    width: 60%;
}

/* page-events-schedule-wba-announcer-script — from events/schedule/wba/announcer-script.php */
body.page-events-schedule-wba-announcer-script {
    background-color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;
    padding: 0px;
}
@media print {
    body.page-events-schedule-wba-announcer-script {
        font-family: -apple-system, "Roboto", "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif !important;
    }
}
body.page-events-schedule-wba-announcer-script header,
body.page-events-schedule-wba-announcer-script footer {
    display: none;
}
body.page-events-schedule-wba-announcer-script main {
    margin-top: 0px;
    margin-left: 5em;
    margin-right: 5em;
    margin-bottom: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
}
body.page-events-schedule-wba-announcer-script .spielWrapper {
    margin-top: 1em;
}
body.page-events-schedule-wba-announcer-script #devBar {
    display: none;
}
body.page-events-schedule-wba-announcer-script .instructions {
    font-size: 1em;
    text-align: center;
}
body.page-events-schedule-wba-announcer-script .dialog {
    font-family: monospace;
    border: 1px solid silver;
    padding: 1em;
    padding-bottom: 0px;
    font-size: 1.4em;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
}
body.page-events-schedule-wba-announcer-script .dialog .instructions {
    text-align: none;
    font-family: initial;
    font-size: 0.8em;
}
body.page-events-schedule-wba-announcer-script .dialog .instructions {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif;
    padding: 0px;
}
@media print {
    body.page-events-schedule-wba-announcer-script .dialog .instructions {
        font-family: -apple-system, "Roboto", "Segoe UI", "Oxygen", "Ubuntu", "Helvetica Neue", Arial, sans-serif !important;
    }
}
body.page-events-schedule-wba-announcer-script .phonetic {
    xfont-family: monospace;
    font-weight: normal;
    xfont-size: 1.4em;
    color: #888888;
}
body.page-events-schedule-wba-announcer-script h2.eventNameDate {
    text-transform: uppercase;
    font-size: 1em;
}
body.page-events-schedule-wba-announcer-script .act {
    margin-top: 10px;
    text-align: center;
}
body.page-events-schedule-wba-announcer-script .additionalNotes {
    font-size: 1em;
}
body.page-events-schedule-wba-announcer-script .pageBreak {
    page-break-after: always;
}
body.page-events-schedule-wba-announcer-script .otherBlock {
    text-align: center;
    padding-top: 200px;
    padding-bottom: 200px;
}
body.page-events-schedule-wba-announcer-script .otherBlock .description {
    font-size: 2.8em;
    font-weight: bold;
}
body.page-events-schedule-wba-announcer-script .dialog .instructions {
    color: red;
}
body.page-events-schedule-wba-announcer-script .fillIn {
    color: red;
}
body.page-events-schedule-wba-announcer-script .opening {
    padding: 15px;
    border: 1px dashed silver;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
}
body.page-events-schedule-wba-announcer-script .logo {
    text-align: center;
    margin-bottom: 1em;
}
body.page-events-schedule-wba-announcer-script .logo img {
    width: 60%;
}

/* C4 — Phase C4: modal/partial-heavy pages + wrapper */

/* page-common-broadcast-compose-email — from common/broadcast/compose-email.php */
/* overrides so it will display a box to indicate a pdf is ready to upload */
body.page-common-broadcast-compose-email .dropzone .dz-details {
    display: block;
}
body.page-common-broadcast-compose-email .dropzone .dz-preview,
body.page-common-broadcast-compose-email .dropzone .dz-preview .dz-image {
    height: 120px;
}
body.page-common-broadcast-compose-email .dropzone .dz-preview {
    margin-bottom: 2rem;
}
body.page-common-broadcast-compose-email #sendProgressOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}
body.page-common-broadcast-compose-email #sendProgressOverlay.active { display: flex; }
body.page-common-broadcast-compose-email #sendProgressCard {
    background: #fff;
    border-radius: 8px;
    padding: 2rem 2.5rem;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    text-align: center;
}
body.page-common-broadcast-compose-email #sendProgressCard .progress { height: 22px; border-radius: 6px; }
body.page-common-broadcast-compose-email #sendProgressCard .progress-bar {
    transition: width 0.4s ease;
    font-size: 0.8rem;
    font-weight: 600;
}
body.page-common-broadcast-compose-email #sendProgressIcon {
    font-size: 2.4rem;
    color: #095170;
    margin-bottom: 0.75rem;
}
body.page-common-broadcast-compose-email #sendProgressTitle {
    font-family: "Oswald", Helvetica, Arial, sans-serif;
    font-size: 1.25rem;
    color: #095170;
    margin-bottom: 0.25rem;
}
body.page-common-broadcast-compose-email #sendProgressStatus {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
body.page-common-broadcast-compose-email #sendProgressDetail {
    color: #888;
    font-size: 0.8rem;
    margin-top: 0.75rem;
}

/* page-common-broadcast-compose-text-message — from common/broadcast/compose-text-message.php */
body.page-common-broadcast-compose-text-message x#theCount {
    xfont-size: 2em;
    color: #999999;
    display: inline-block;
    padding-top: 10px;
    font-weight: bold;
    float: right;
}

/* page-reports-addon-purchases — from reports/addon-purchases/index.php */
body.page-reports-addon-purchases .stat-value {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}
body.page-reports-addon-purchases .stat-label {
    text-align: center;
    color: #666;
}

/* page-reports-dashboard — from reports/dashboard/index.php */
body.page-reports-dashboard .card-header {
    background-color: #cad7ff;
}

/* page-reports-staff-report — from reports/staff-report/index.php */
body.page-reports-staff-report .dataTables_wrapper {
    position: relative;
}
body.page-reports-staff-report .dataTables_scrollBody {
    overflow-x: auto;
}
body.page-reports-staff-report .dataTables_scrollHead,
body.page-reports-staff-report .dataTables_scrollHeadInner {
    overflow: auto !important;
}
body.page-reports-staff-report .dataTables_scrollHeadInner {
    width: 100% !important;
}

/* page-scheduling-event-monitored-dates-editor — from
   scheduling/event-monitored-dates/editor.php */
body.page-scheduling-event-monitored-dates-editor #startDatetimePickerOther .day.disabled {
    color: white;
    background-color: lawngreen;
}

/* (partial) available-person-chooser-grid — namespaced under parent
   page-scheduling-event-monitored-dates-editor */
body.page-scheduling-event-monitored-dates-editor .custom-width {
    width: 50px;
}

/* page-scheduling-expenses — from scheduling/expenses/index.php (block 1).
   Modal-* partials are included into this same page so their styles also
   namespace under page-scheduling-expenses. */
body.page-scheduling-expenses .openSettings {
    border: 1px solid #7D7D7D !important;
    padding: 5px 12px 6px 12px;
}
body.page-scheduling-expenses .filter-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    z-index: 9999;
    padding: .5rem;
    background-color: white;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
}
body.page-scheduling-expenses .filter-dropdown .form-check {
    width: max-content;
    margin-bottom: .5rem;
}
body.page-scheduling-expenses .filter-dropdown p {
    font-weight: bolder;
    font-size: 1.5rem;
    margin-bottom: .5rem;
}
body.page-scheduling-expenses .filter-dropdown span {
    display: block;
    margin-bottom: .25rem;
}
body.page-scheduling-expenses .filter-dropdown .form-date {
    display: flex;
    column-gap: .4rem;
    align-items: center;
}
body.page-scheduling-expenses .filter-dropdown .form-date span {
    margin: 0;
}
body.page-scheduling-expenses #myModalLarge {
    z-index: 10000;
}

/* (partials of page-scheduling-expenses) modal-approval, modal-approval-settings,
   modal-bill-details, modal-denial, modal-expenses, modal-settings, modal-unlock,
   assignments/modal-expenses — these all share the same base modal-header /
   modal-title rules. Several add their own card / approver / file-info rules. */
body.page-scheduling-expenses .modal-header {
    line-height: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}
body.page-scheduling-expenses .modal-title {
    line-height: 24px;
    font-size: 20px;
}
/* modal-expenses / assignments/modal-expenses / print-expenses block 2 had no
   font-size on .modal-title — they target the file-upload modal specifically. */
body.page-scheduling-expenses #myModalLarge .modal-title,
body.page-scheduling-expenses #expensesModal .modal-title {
    font-size: inherit;
}
body.page-scheduling-expenses #approvalCircuit,
body.page-scheduling-expenses #circuit {
    background: #7D7D7D;
    color: #fff;
}
body.page-scheduling-expenses .approver-row {
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
}
body.page-scheduling-expenses .remove-approver {
    line-height: 1;
}
body.page-scheduling-expenses .card {
    border: 0;
}
body.page-scheduling-expenses .card-body {
    border-radius: 10px;
    background: #F6F6F6;
    display: flex;
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    align-self: stretch;
}
body.page-scheduling-expenses .card-secondary {
    border-radius: 10px;
    background: rgba(0, 129, 255, 0.10);
    border: 0;
}
body.page-scheduling-expenses .additional-pay-container {
    border-radius: 10px;
    background-color: #F6F6F6;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
body.page-scheduling-expenses #newRangeButton {
    margin-top: 15px;
    color: #007BFE;
    background-color: #007BFF12;
    border: unset;
}
body.page-scheduling-expenses .additionalPay.pay-main {
    border-radius: 10px;
    background-color: white;
    padding: 10px;
    margin-bottom: 10px;
}
body.page-scheduling-expenses .file-info {
    border-radius: 5px;
    border: 1px solid #BCBCBC;
    background: #FFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 24px;
}
body.page-scheduling-expenses .file-name {
    max-width: 135px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* page-scheduling-expenses — from scheduling/expenses/index.php (block 2,
   the data-grid + export-overlay block) */
body.page-scheduling-expenses #grid thead {
    border: none;
    font-size: 18px;
}
body.page-scheduling-expenses #grid thead th {
    border: none;
    border-bottom: 1px solid #dee2e6;
}
body.page-scheduling-expenses .table td,
body.page-scheduling-expenses .table th {
    padding: .75rem;
    vertical-align: middle;
    border-top: none;
    border-bottom: 1px solid #dee2e6;
    cursor: default;
}
body.page-scheduling-expenses td.addExpense {
    color: #007BFF;
    font-family: Helvetica;
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 48px;
    text-decoration-line: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}
body.page-scheduling-expenses .text-small {
    font-size: 12px;
    font-weight: 500;
}
body.page-scheduling-expenses td.expenseAction {
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: 18px;
    letter-spacing: 0.2px;
}
body.page-scheduling-expenses .form-check {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 10px;
    border-radius: 5px;
    background: #F6F6F6;
    gap: 7px;
}
body.page-scheduling-expenses .check-input-custom {
    margin-top: 3px;
}
body.page-scheduling-expenses .expensesGridRow {
    padding: 20px 100px;
}
@media (max-width: 991.98px) {
    body.page-scheduling-expenses .expensesGridRow {
        padding: 20px 0;
    }
}
body.page-scheduling-expenses .btn-light {
    background: #7D7D7D;
    color: #fff;
}
body.page-scheduling-expenses .filter-option-inner-inner {
    color: #fff;
}
body.page-scheduling-expenses #exportLoadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.95) 0%, rgba(0, 40, 80, 0.95) 100%);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}
body.page-scheduling-expenses #exportLoadingOverlay.show,
body.page-scheduling-expenses #exportLoadingOverlay[style*="block"] {
    display: flex !important;
}
body.page-scheduling-expenses .loading-content {
    text-align: center;
    color: #fff;
    padding: 50px 60px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 420px;
}
body.page-scheduling-expenses .loading-content h2 {
    margin: 30px 0 10px;
    font-size: 26px;
    font-weight: 600;
    background: linear-gradient(90deg, #fff, #64B5F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.page-scheduling-expenses .loading-content p {
    margin: 0 0 5px;
    font-size: 16px;
    opacity: 0.85;
    color: #B0BEC5;
}
body.page-scheduling-expenses .loading-content .loading-subtext {
    font-size: 13px;
    opacity: 0.6;
    margin-top: 20px;
    color: #78909C;
}
body.page-scheduling-expenses .loader-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}
body.page-scheduling-expenses .loader-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 3px solid transparent;
}
body.page-scheduling-expenses .loader-ring:nth-child(1) {
    width: 100px;
    height: 100px;
    margin: -50px 0 0 -50px;
    border-top-color: #2196F3;
    border-bottom-color: #2196F3;
    animation: spin 2s linear infinite;
}
body.page-scheduling-expenses .loader-ring:nth-child(2) {
    width: 76px;
    height: 76px;
    margin: -38px 0 0 -38px;
    border-left-color: #64B5F6;
    border-right-color: #64B5F6;
    animation: spin 1.5s linear infinite reverse;
}
body.page-scheduling-expenses .loader-ring:nth-child(3) {
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    border-top-color: #90CAF9;
    border-bottom-color: #90CAF9;
    animation: spin 1s linear infinite;
}
body.page-scheduling-expenses .loader-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    background: linear-gradient(135deg, #2196F3, #64B5F6);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.6);
}
body.page-scheduling-expenses .loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}
body.page-scheduling-expenses .loading-dots span {
    width: 10px;
    height: 10px;
    background: #2196F3;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}
body.page-scheduling-expenses .loading-dots span:nth-child(1) {
    animation-delay: 0s;
}
body.page-scheduling-expenses .loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}
body.page-scheduling-expenses .loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(33, 150, 243, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 0 50px rgba(33, 150, 243, 0.9); }
}
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}
body.page-scheduling-expenses #cancelExportBtn {
    margin-top: 25px;
    padding: 10px 25px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
body.page-scheduling-expenses #cancelExportBtn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}
body.page-scheduling-expenses #cancelExportBtn:active {
    transform: scale(0.98);
}

/* page-scheduling-expenses-invoice-expense-view — from
   scheduling/expenses/invoice-expense-view.php (standalone print page that
   does not use Wrapper). Body class is set directly on the <body> tag. */
body.page-scheduling-expenses-invoice-expense-view {
    font-family: DejaVu Sans, Arial, sans-serif;
    font-size: 12px;
    color: #000;
    margin: 40px 45px;
}
body.page-scheduling-expenses-invoice-expense-view .top-row { width: 100%; }
body.page-scheduling-expenses-invoice-expense-view .top-left,
body.page-scheduling-expenses-invoice-expense-view .top-right { vertical-align: top; }
body.page-scheduling-expenses-invoice-expense-view .top-left { width: 40%; }
body.page-scheduling-expenses-invoice-expense-view .top-right { width: 60%; text-align: right; }
body.page-scheduling-expenses-invoice-expense-view .org-name { font-size: 20px; font-weight: bold; }
body.page-scheduling-expenses-invoice-expense-view .invoice-label { font-size: 20px; font-weight: bold; }
body.page-scheduling-expenses-invoice-expense-view .org-address { margin-top: 12px; line-height: 1.4; }
body.page-scheduling-expenses-invoice-expense-view .logo { margin-top: 10px; }
body.page-scheduling-expenses-invoice-expense-view .logo img { height: 50px; }
body.page-scheduling-expenses-invoice-expense-view .spacer { height: 40px; }
body.page-scheduling-expenses-invoice-expense-view .billto-row {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 25px;
}
body.page-scheduling-expenses-invoice-expense-view .billto-left,
body.page-scheduling-expenses-invoice-expense-view .billto-right { vertical-align: top; }
body.page-scheduling-expenses-invoice-expense-view .billto-left { width: 50%; }
body.page-scheduling-expenses-invoice-expense-view .billto-right { width: 50%; text-align: right; }
body.page-scheduling-expenses-invoice-expense-view .billto-label { font-weight: bold; margin-bottom: 4px; }
body.page-scheduling-expenses-invoice-expense-view .meta-label { font-weight: bold; }
body.page-scheduling-expenses-invoice-expense-view .invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 12px;
}
body.page-scheduling-expenses-invoice-expense-view .invoice-table th,
body.page-scheduling-expenses-invoice-expense-view .invoice-table td {
    padding: 8px 10px;
    border: 1px solid #cccccc;
    vertical-align: top;
}
body.page-scheduling-expenses-invoice-expense-view .invoice-table th {
    background-color: #f0f0f0;
    font-weight: bold;
}
body.page-scheduling-expenses-invoice-expense-view .col-description { width: 75%; }
body.page-scheduling-expenses-invoice-expense-view .col-amount { width: 25%; text-align: right; }
body.page-scheduling-expenses-invoice-expense-view .total-row td { font-weight: bold; font-size: 13px; }
body.page-scheduling-expenses-invoice-expense-view .total-label { text-align: right; }
body.page-scheduling-expenses-invoice-expense-view .total-amount { text-align: right; }
body.page-scheduling-expenses-invoice-expense-view .receipts-title {
    font-size: 16px;
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 10px;
}
body.page-scheduling-expenses-invoice-expense-view .receipt-block { margin-top: 15px; }
body.page-scheduling-expenses-invoice-expense-view .receipt-caption { font-weight: bold; margin-bottom: 5px; }
body.page-scheduling-expenses-invoice-expense-view .receipt-description { font-size: 11px; margin-bottom: 8px; }
body.page-scheduling-expenses-invoice-expense-view .receipt-image {
    max-width: 100%;
    max-height: 900px;
    border: 1px solid #ccc;
}
body.page-scheduling-expenses-invoice-expense-view .page-break {
    page-break-before: always;
}

/* page-scheduling-expenses-print-expenses — from scheduling/expenses/print-expenses.php
   (two adjacent inline blocks: filter-dropdown + modal-* base) */
body.page-scheduling-expenses-print-expenses .openSettings {
    border: 1px solid #7D7D7D !important;
    padding: 5px 12px 6px 12px;
}
body.page-scheduling-expenses-print-expenses .filter-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + .5rem);
    z-index: 9999;
    padding: .5rem;
    background-color: white;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
}
body.page-scheduling-expenses-print-expenses .filter-dropdown .form-check {
    width: max-content;
    margin-bottom: .5rem;
}
body.page-scheduling-expenses-print-expenses .filter-dropdown p {
    font-weight: bolder;
    font-size: 1.5rem;
    margin-bottom: .5rem;
}
body.page-scheduling-expenses-print-expenses .filter-dropdown span {
    display: block;
    margin-bottom: .25rem;
}
body.page-scheduling-expenses-print-expenses .filter-dropdown .form-date {
    display: flex;
    column-gap: .4rem;
    align-items: center;
}
body.page-scheduling-expenses-print-expenses .filter-dropdown .form-date span {
    margin: 0;
}
body.page-scheduling-expenses-print-expenses #myModalLarge {
    z-index: 10000;
}
body.page-scheduling-expenses-print-expenses .modal-header {
    line-height: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}
body.page-scheduling-expenses-print-expenses .modal-title {
    line-height: 24px;
}
body.page-scheduling-expenses-print-expenses .file-info {
    border-radius: 5px;
    border: 1px solid #BCBCBC;
    background: #FFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    top: 24px;
}
body.page-scheduling-expenses-print-expenses .file-name {
    max-width: 135px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* (partials) events/default-positions/_staff_position_modal,
   _staff_sidebar, _staff_tab — these partials render in TWO body
   contexts: the standalone default-positions editor page, and inside
   events/editor.php (bodyClass: page-events-editor). Both scopes
   must apply so the cards/modal styling works in either context. */
body.page-events-default-positions-editor .modal-card,
body.page-events-editor .modal-card {
    border-radius: 10px;
    background: #F4F4F4;
    padding: 10px;
    cursor: pointer;
}
body.page-events-default-positions-editor .cards,
body.page-events-editor .cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    max-height: 500px;
    overflow-x: hidden;
    overflow-y: auto;
}
body.page-events-default-positions-editor .staff,
body.page-events-editor .staff {
    gap: 10px;
    max-height: 72vh;
    overflow-x: hidden;
    overflow-y: auto;
}
body.page-events-default-positions-editor .f-14,
body.page-events-editor .f-14 { font-size: 14px; }
body.page-events-default-positions-editor .f-12,
body.page-events-editor .f-12 { font-size: 12px; }
body.page-events-default-positions-editor .f-10,
body.page-events-editor .f-10 { font-size: 10px; }
body.page-events-default-positions-editor .active-card,
body.page-events-editor .active-card { cursor: pointer; }
body.page-events-default-positions-editor .active-card:hover,
body.page-events-default-positions-editor .active-card:focus,
body.page-events-editor .active-card:hover,
body.page-events-editor .active-card:focus {
    background-color: #F2F2F2;
}
body.page-events-default-positions-editor .disabled-card,
body.page-events-editor .disabled-card {
    cursor: not-allowed;
}
/* _staff_tab.php had an empty <style> block — nothing to extract. */

/* (partial) events/schedule/overwrite-announcer-script-modal — child of
   page-events-schedule-editor */
body.page-events-schedule-editor .dropzone .dz-details {
    display: block;
}
body.page-events-schedule-editor .dropzone .dz-preview,
body.page-events-schedule-editor .dropzone .dz-preview .dz-image {
    height: 120px;
}

/* (partial) people/person-form/_ajax_expense_additional_pay — fragment used
   by people/editor.php; `.cloneSource` and `.noRecords` promoted to shared
   utilities */
body.page-people-editor .unitProductionPeople th {
    text-transform: uppercase;
    color: #aaaaaa;
    font-size: 0.8em;
}

/* (partial) admin/audit-logs/partials/row-detail — child of page-admin-audit-logs-view */
body.page-admin-audit-logs-view .auditDetail { max-width: 1100px; }
body.page-admin-audit-logs-view .auditDetail dl { display: grid; grid-template-columns: 180px 1fr; gap: 6px 20px; }
body.page-admin-audit-logs-view .auditDetail dt { font-weight: 600; color: #555; }
body.page-admin-audit-logs-view .auditDetail dd { margin: 0; word-break: break-word; }
body.page-admin-audit-logs-view .auditDetail .sectionHeader { margin-top: 30px; margin-bottom: 10px; font-weight: 600; font-size: 1.1em; border-bottom: 1px solid #dee2e6; padding-bottom: 4px; }
body.page-admin-audit-logs-view .auditDetail .diffTable td,
body.page-admin-audit-logs-view .auditDetail .diffTable th { vertical-align: top; padding: 6px 10px; }
body.page-admin-audit-logs-view .auditDetail .diffTable .fieldName { font-family: monospace; font-weight: 600; }
body.page-admin-audit-logs-view .auditDetail .diffTable .oldValue { color: var(--state-danger-strong); background: var(--state-danger-bg); }
body.page-admin-audit-logs-view .auditDetail .diffTable .newValue { color: #155724; background: var(--state-success-bg); }
body.page-admin-audit-logs-view .auditDetail pre.jsonBlock { background: #f6f8fa; border: 1px solid #e1e4e8; border-radius: 4px; padding: 10px; font-size: 0.85em; max-height: 400px; overflow: auto; }
body.page-admin-audit-logs-view .auditDetail .severity-pill { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 0.85em; text-transform: uppercase; }
body.page-admin-audit-logs-view .auditDetail .severity-pill.severity-info     { background: #e2e3e5; color: #383d41; }
body.page-admin-audit-logs-view .auditDetail .severity-pill.severity-notice   { background: var(--state-notice-bg); color: #0c5460; }
body.page-admin-audit-logs-view .auditDetail .severity-pill.severity-warning  { background: var(--state-warning-bg); color: var(--state-warning-text); }
body.page-admin-audit-logs-view .auditDetail .severity-pill.severity-critical { background: var(--state-danger-bg); color: var(--state-danger-strong); }
body.page-admin-audit-logs-view .auditDetail .correlationLink { font-family: monospace; }

/* === /pages === */


/* === outdated-browser banner (wrapper-level — applies on every page) === */
/* extracted from includes/wrapper/footer-inc.php */
#outdated h6,
#outdated p {
	text-transform: none;
}
#outdated #btnUpdateBrowser {
	width: 260px;
}
/* === /outdated-browser banner === */




/* /content-management/crud/list filter labels — injected by the
   Table.php view script for mobile clarity. Hidden at desktop where
   the column-header <tr> above the filter <tr> already labels each
   filter cell visually. */
.filter-label {
	display: none;
}
/* Toggle button that opens/closes the filter panel on mobile.
   Hidden on desktop (filters are inline in the thead row there). */
.filters-toggle {
	display: none;
	margin-bottom: 0.5rem;
}

/* DataTables filter — tap-to-search button injected by grids.js initComplete.
   Hidden on desktop (Enter triggers search there); shown only at mobile
   widths via the media block below. Style is button-only so the
   surrounding desktop layout is untouched. */
.dataTables_filter .dt-search-trigger {
	display: none;
	margin-left: 0.25rem;
	padding: 0.25rem 0.55rem;
	line-height: 1;
	vertical-align: middle;
}


/* Slide-out staff-assignment drawer (#mySidebar) — universal rules.
   Base styling lives in events/default-positions/staff_assignment.css.
   #mySidebar must NOT scroll itself (it would clip the close button
   that hangs off its left edge at `left: -29px`). Instead, scroll the
   inner #sidebarContent. Both axes on #mySidebar stay visible. */
#mySidebar {
	display: flex;
	flex-direction: column;
}

/* Sidebar AJAX loader — base CSS in staff_assignment.css uses
   `justify-content: start` which sticks the spinner against the left
   edge. Center it instead so the loading state reads as such. */
#mySidebar #preloader.preloader-container {
	justify-content: center !important;
}


/* Mobile-only close button inside the sidebar. Hidden at desktop
   widths; the @media block below shows it. Positioned absolutely at
   the top-right of the panel with a clear border so it's a tappable
   visible target. */
#mySidebar .close-btn-mobile {
	display: none;
	position: absolute;
	top: 88px;             /* matches desktop .close-btn so it sits below the page navbar */
	right: 0.75rem;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--border-default);
	border-radius: 0.25rem;
	background: var(--surface-page);
	color: var(--text-default);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	justify-content: center;
	align-items: center;
	z-index: 1001;
}
#mySidebar .close-btn-mobile:hover,
#mySidebar .close-btn-mobile:focus {
	background: var(--surface-sidebar-hover);
}
#mySidebar #sidebarContent {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	/* Hide the scrollbar but keep the panel scrollable. */
	scrollbar-width: none;        /* Firefox */
	-ms-overflow-style: none;     /* legacy Edge / IE */
}
#mySidebar #sidebarContent::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;                /* Chrome / Safari / WebKit */
}
#mySidebar #sidebarContent .staff {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
#mySidebar #sidebarContent .staff > .card {
	margin-bottom: 0;
}
#mySidebar #sidebarContent .staff > .card > .card-body {
	padding: 0.75rem !important;
}


/* === responsive ===
   Mobile-first overrides. Two breakpoints, matching Bootstrap 4 defaults:
   <768 (tablet) and <576 (phone). Earlier @media blocks in this file
   already handle a couple of cases (#sidebar at <576, .tableUtils at <768)
   and stay where they are; rules below add the rest of the responsive
   pass without touching the existing ones. */

@media (max-width: 767.98px) {

	/* Sidebar: collapse on tablet too (not just phone). The existing 575px
	   block already does this for phone; here we extend the same behavior
	   up to 768px so editor pages aren't squeezed by a fixed 200px sidebar. */
	#sidebar {
		margin-left: calc(-1 * var(--sidebar-width));
	}
	#sidebar.active {
		margin-left: 0px;
	}

	/* Editor header: bump the bottom padding (matches bluecloud). */
	#editorHeader {
		padding-bottom: 10px;
	}

	/* Editor header buttons: let long labels wrap rather than overflow.
	   At <576 the block goes full-width and stacks (see phone block below). */
	.editorHeaderButtons,
	.utilButtons {
		white-space: normal;
		margin-top: 0.5rem;
	}
	.editorHeaderButtons .btn,
	.utilButtons .btn {
		white-space: normal;
	}

	/* Right-aligned action wrappers go centered on mobile so they don't
	   hug the right edge of a narrow viewport. */
	.searchButtonWrapper,
	.deleteButtonWrapper,
	.voidButtonWrapper {
		text-align: center;
	}

	/* DataTables: let the table scroll inside its own wrapper instead of
	   forcing the page to scroll horizontally. Also stack the utility row
	   (length / filter / buttons) so each gets its own line. */
	.dataTables_wrapper {
		overflow-x: auto;
	}
	.dataTables_wrapper .dataTables_length,
	.dataTables_wrapper .dataTables_filter,
	.dataTables_wrapper .dt-buttons,
	.dataTables_wrapper .buttonBar {
		float: none;
		text-align: center;
		margin-bottom: .5em;
	}

	/* The grids.js DOM layout (`<'row topUtils'<'col-sm-6'..>><'col-sm-6'f>>`
	   plus the third row `col-sm-4 / col-sm-2 / col-sm-6`) stays side-by-
	   side from 576px up because of `col-sm-`. On small tablets that
	   crams the filter input and pager into ~half a viewport. Force the
	   internal grid full-width below 768 so each row gets its own line. */
	.dataTables_wrapper .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
	}
	.dataTables_wrapper .row.topUtils > .col-sm-6 + .col-sm-6 {
		margin-top: 0.25rem;
	}
	.dataTables_wrapper .totalRecords,
	.dataTables_wrapper .thePager {
		text-align: center;
	}
	.dataTables_wrapper .dataTables_paginate {
		float: none;
		text-align: center;
	}

	/* DataTables search box / length select: label and control stack
	   vertically and the input fills the row. Without this the default
	   inline label leaves a tiny input crammed at the right edge. */
	.dataTables_wrapper .dataTables_filter label,
	.dataTables_wrapper .dataTables_length label {
		display: flex;
		flex-direction: column;
		gap: 0.25rem;
		align-items: stretch;
		text-align: left;
		width: 100%;
		font-weight: bold;
	}
	.dataTables_wrapper .dataTables_filter input,
	.dataTables_wrapper .dataTables_length select {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
	}
	.dataTables_wrapper .dataTables_filter .dt-search-trigger {
		display: inline-flex;
		align-self: flex-end;
		margin-left: 0;
	}

	/* Generic input groups & form controls inside main content cap at the
	   viewport so PHP-rendered fixed widths don't blow past the edge. */
	main .input-group,
	main .form-control,
	main .custom-select,
	.modal-body .form-control,
	.modal-body .custom-select {
		max-width: 100%;
	}

	/* Standalone search / quick-jump form (the navbar `#idSearchForm`
	   and any `.quickSearchForm`) — full-width input on mobile. */
	.quickSearchForm,
	.quickSearchForm input,
	#idSearchForm,
	#idSearchForm input {
		width: 100%;
		max-width: 100%;
	}

	/* Editor forms: any extracted page rules that nailed an element to a
	   specific pixel width get capped at the viewport. */
	body.page-content-management .width-200,
	body.page-content-management-bingo .width-200,
	body.page-classification .width-200 {
		max-width: 100%;
	}

	/* Default-positions sidebar list: free up the staff list on tablet. */
	body.page-events-default-positions-editor .staff {
		max-height: 50vh;
	}

	/* /events/ month/year/circuit filter — stack cleanly on phones.
	   Markup order inside .form-group: [←][circuit][month][year][→].
	   Bootstrap-select wraps each <select> in a .bootstrap-select div,
	   so we target by nth-child position instead of by id. We use
	   flex + flex order to put the long Circuit select on its own row,
	   then the prev/next arrows + Month + Year on a single row. */
	body.page-events #monthNav {
		font-size: 1rem;
	}
	body.page-events #monthNav .form-group {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.5rem;
		margin: 0;
	}
	/* Circuit (2nd child) — full width, first row */
	body.page-events #monthNav .form-group > :nth-child(2) {
		order: 0;
		flex: 0 0 100%;
		max-width: 100%;
		min-width: 0;
	}
	/* ← arrow (1st child) — left side of row 2 */
	body.page-events #monthNav .form-group > :nth-child(1) {
		order: 1;
		flex: 0 0 auto;
	}
	/* Month (3rd) and Year (4th) selects — share row 2 */
	body.page-events #monthNav .form-group > :nth-child(3),
	body.page-events #monthNav .form-group > :nth-child(4) {
		order: 2;
		flex: 1 1 0;
		min-width: 0;
		max-width: 100%;
	}
	/* → arrow (5th child) — right side of row 2 */
	body.page-events #monthNav .form-group > :nth-child(5) {
		order: 3;
		flex: 0 0 auto;
	}
	/* Make any direct-child <select> fill its flex track */
	body.page-events #monthNav .form-group > select.form-control,
	body.page-events #monthNav .form-group > .bootstrap-select {
		width: 100% !important;
		max-width: 100%;
	}
	/* Prev/Next arrows: square tappable buttons */
	body.page-events #monthNav .form-group > a {
		display: inline-flex;
		justify-content: center;
		align-items: center;
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.25rem;
		border: 1px solid var(--border-default);
		border-radius: var(--radius-default);
		color: var(--text-default);
		background: var(--surface-page);
		text-decoration: none;
	}

	/* Slide-out staff-assignment drawer (#mySidebar / .sidebar in events
	   editor's Default Positions tab). The toggle JS sets width:650px
	   inline, which overflows phone viewports. At mobile take the full
	   width and override the inline style. Scrolling lives on
	   #sidebarContent (set at file scope above) so this stays unchanged. */
	#mySidebar {
		max-width: 100vw;
	}
	#mySidebar[style*="width: 650px"],
	#mySidebar[style*="width:650px"] {
		width: 100vw !important;
	}
	#mySidebar #sidebarContent.container {
		padding-left: 0.75rem;
		padding-right: 0.75rem;
		padding-bottom: 1.5rem;
	}

	/* Hide the desktop close button on phones (it hangs at left:-29px
	   which is offscreen) and show the mobile-only close button —
	   ONLY when the sidebar is open. JS sets style="width: 650px;"
	   on #mySidebar to open and width:0 to close, so we key off that. */
	#mySidebar .close-btn {
		display: none !important;
	}
	#mySidebar[style*="width: 650px"] .close-btn-mobile,
	#mySidebar[style*="width:650px"] .close-btn-mobile {
		display: flex !important;
	}
	/* The standalone staff list is capped to 50vh elsewhere — that limits
	   the drawer too. Free it on phones so the full list scrolls inside
	   #mySidebar's overflow-y. Also gap the cards so they don't visually
	   merge into one block. */
	#mySidebar #sidebarContent .staff {
		max-height: none;
		gap: 0.75rem;
	}
	/* Belt-and-suspenders for browsers that ignore flex `gap` on
	   block-level cards: also bump margin-bottom. The two combined are
	   safe — only the larger of (gap, margin) shows up between siblings. */
	#mySidebar #sidebarContent .staff > .card {
		margin-bottom: 0;
	}
	#mySidebar #sidebarContent .staff > .card + .card {
		margin-top: 0;
	}
	/* Tighten internal padding so each card breathes inside the narrow
	   drawer width without the avatar/name section feeling cramped. */
	#mySidebar #sidebarContent .staff > .card > .card-body {
		padding: 0.75rem !important;
	}

	/* Staff sidebar header row (search input + sort button): the search
	   input-group and sort button live in a single .d-flex with
	   justify-content-between. On phones they crowd; let them wrap. */
	#mySidebar #sidebarContent .row.mb-3 > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
	}
	#mySidebar #sidebarContent .row.mb-3 .d-flex.justify-content-between {
		flex-wrap: wrap;
		gap: 0.5rem;
		justify-content: stretch !important;
	}
	#mySidebar #sidebarContent .row.mb-3 .input-group {
		flex: 1 1 100%;
	}

	/* Staff person cards: at <768 the col-md-6 halves stack full-width.
	   The right half uses justify-content:end + align-items:end which
	   looks awkward when stacked — flip to start alignment. */
	#mySidebar #sidebarContent .staff .card .row > [class*="col-md-"] {
		flex: 0 0 100%;
		max-width: 100%;
	}
	#mySidebar #sidebarContent .staff .card .col-md-6.justify-content-end.align-items-end {
		justify-content: flex-start !important;
		align-items: flex-start !important;
		margin-top: 0.5rem;
	}

	/* Navbar scroll stability on mobile.
	   cloud.js fades #mainHeader out/in on scroll; tiny scroll wobbles around
	   the threshold strobe the navbar. Lock it visible on mobile — the fade
	   animation still runs but produces no visual change. */
	#mainHeader {
		display: block !important;
		opacity: 1 !important;
	}

	/* Editor header sticky/floating behavior on mobile causes page-height
	   oscillation: cloud.js adds `.floating` (position:fixed, takes the
	   element out of flow, shrinking the page) past the navbar threshold.
	   Tiny scroll wobbles add/remove the class repeatedly, producing
	   visible flicker, and the user can't scroll past the new shrunk
	   bottom. Cancel the float entirely on mobile — let the header
	   scroll out of view normally. */
	#editorHeader.floating {
		position: static !important;
		top: auto !important;
		left: auto !important;
		width: auto !important;
		background: transparent !important;
		box-shadow: none !important;
		z-index: auto !important;
	}

	/* === Responsive cards (opt-in via class="responsive-cards" on <table>) ===
	   Behavior ports the bluecloud pattern: each <tr> renders as a card and
	   each <td> shows "Label: Value" via a data-label attribute set by
	   applyResponsiveCardLabels() in grids.js on every draw. Direct-child
	   selectors keep nested tables unaffected. */

	/* Hide the header visually but keep it readable to assistive tech. */
	table.responsive-cards > thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	/* Some tables put inline <th> rows inside <tbody>. Hide those too. */
	table.responsive-cards > tbody > tr:has(> th) {
		display: none;
	}

	table.responsive-cards > tbody > tr {
		display: block;
		margin-bottom: 0.75rem;
		border: 1px solid var(--border-soft);
		border-radius: var(--radius-default);
		padding: 0.5rem 0.75rem;
		background: var(--surface-page);
	}
	/* Stay hidden in cards mode — these are JS template / empty-state
	   rows, not real data. */
	table.responsive-cards > tbody > tr.cloneSource {
		display: none !important;
	}
	table.responsive-cards > tbody > tr:nth-of-type(odd) {
		background: var(--surface-alt-row);
	}

	table.responsive-cards > tbody > tr > td {
		/* !important defeats the DataTables Responsive plugin's inline
		   display:none on hidden columns — in card mode every field is
		   visible as its own labelled row. */
		display: flex !important;
		justify-content: space-between;
		align-items: center;
		padding: 0.35rem 0;
		border: none;
		text-align: right;
		word-break: break-word;
	}
	table.responsive-cards > tbody > tr > td::before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--text-form);
		margin-right: 0.75rem;
		flex: 0 0 40%;
		text-align: left;
	}

	/* Control / expand-arrow column has no role in card mode — every column
	   is shown. Hide it. The JS helper applyResponsiveCardLabels() also
	   skips this cell so labels stay aligned with the visible content. */
	table.responsive-cards > tbody > tr > td.dtr-control,
	table.responsive-cards > tbody > tr > td.control {
		display: none !important;
	}

	/* FixedHeader plugin clones the <thead> and pins it to viewport top on
	   scroll. In card mode the original thead is hidden; the floating clone
	   becomes a stray strip under the navbar. Hide both states. */
	.fixedHeader-floating,
	.fixedHeader-locked {
		display: none !important;
	}

	/* responsive-cards-form variant: editable rows where each <td>
	   contains an <input>/<select>/<textarea>. Label sits ABOVE the
	   control, control fills full width, no right-alignment. */
	table.responsive-cards.responsive-cards-form > tbody > tr > td {
		flex-direction: column !important;
		align-items: stretch;
		justify-content: flex-start;
		text-align: left;
		gap: 0.25rem;
	}
	table.responsive-cards.responsive-cards-form > tbody > tr > td::before {
		flex: 0 0 auto;
		margin-right: 0;
		font-size: 0.85rem;
	}
	table.responsive-cards.responsive-cards-form > tbody > tr > td .form-control,
	table.responsive-cards.responsive-cards-form > tbody > tr > td .form-control-sm,
	table.responsive-cards.responsive-cards-form > tbody > tr > td .input-group,
	table.responsive-cards.responsive-cards-form > tbody > tr > td textarea,
	table.responsive-cards.responsive-cards-form > tbody > tr > td select {
		width: 100%;
		max-width: 100%;
	}
	/* Two adjacent <select>s for hour/minute on the same line stay paired. */
	table.responsive-cards.responsive-cards-form > tbody > tr > td .form-group {
		display: flex;
		gap: 0.25rem;
		width: 100%;
		margin: 0;
	}
	/* Action <td> with the delete button — drop the label, button only. */
	table.responsive-cards.responsive-cards-form > tbody > tr > td:last-child::before {
		display: none;
	}
	table.responsive-cards.responsive-cards-form > tbody > tr > td:last-child .goAwayButton {
		align-self: flex-end;
	}

	/* "No records" row: center it, drop the label pseudo. */
	table.responsive-cards > tbody > tr > td.dataTables_empty {
		display: block !important;
		text-align: center;
		color: var(--text-muted-bs);
		padding: 0.75rem 0;
	}
	table.responsive-cards > tbody > tr > td.dataTables_empty::before {
		display: none;
	}

	/* Cells spanning multiple columns (loaders, manual empty-states): own
	   row, no label prefix. */
	table.responsive-cards > tbody > tr > td[colspan] {
		display: block !important;
		text-align: center;
		padding: 0.5rem 0;
	}
	table.responsive-cards > tbody > tr > td[colspan]::before {
		display: none;
	}

	/* RowReorder gripper: full-width drag handle above the labelled rows. */
	table.responsive-cards > tbody > tr > td.gripper {
		justify-content: center;
		border-bottom: 1px solid #f1f3f5;
		margin-bottom: 0.25rem;
		padding: 0.5rem 0;
		font-size: 1.25rem;
		color: var(--text-muted-bs);
		cursor: grab;
	}
	table.responsive-cards > tbody > tr > td.gripper::before {
		display: none;
	}

	/* Checkbox cells: center the box, no label prefix. */
	table.responsive-cards > tbody > tr > td.checker {
		justify-content: center;
	}
	table.responsive-cards > tbody > tr > td.checker::before {
		display: none;
	}

	/* DataTables `processing` indicator: render as an in-flow banner with
	   spinner so users know data is loading on small screens. */
	.dataTables_wrapper .dataTables_processing {
		display: none !important;
		margin: 0 !important;
	}
	.dataTables_wrapper .dataTables_processing[style*="display: block"] {
		display: block !important;
		position: static !important;
		top: auto !important;
		left: auto !important;
		margin: 1rem 0 !important;
		padding: 1.25rem 1rem !important;
		background: var(--surface-alt-row) !important;
		border: 1px solid var(--border-soft) !important;
		border-radius: var(--radius-default) !important;
		text-align: center !important;
		color: var(--text-muted-bs) !important;
		font-size: 1rem !important;
		font-weight: 500 !important;
		width: 100% !important;
		height: auto !important;
		box-shadow: none !important;
		line-height: 1.5 !important;
		opacity: 1 !important;
	}
	.dataTables_wrapper .dataTables_processing[style*="display: block"]::before {
		content: "";
		display: inline-block;
		width: 1.25rem;
		height: 1.25rem;
		margin-right: 0.6rem;
		border: 2.5px solid var(--border-soft);
		border-top-color: #007bff;
		border-radius: 50%;
		animation: womp-cards-spin 0.8s linear infinite;
		vertical-align: -0.3rem;
	}
}

@keyframes womp-cards-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 575.98px) {

	/* Phone-only adjustments. */

	/* Editor header — stack title and button block on phone (mirrors
	   bluecloud). The shared markup is:
	     <div class="row" id="editorHeader">
	       <div class="col">title</div>
	       <div class="col editorHeaderButtons">[Cancel][Save]</div>
	     </div>
	   `.col` (no breakpoint) keeps siblings on the same flex row by
	   default. We force each child to take the full row, then stack the
	   buttons inside the .editorHeaderButtons block as full-width
	   buttons. column-reverse puts the primary action (Save) above the
	   secondary (Cancel), matching bluecloud's mobile pattern even
	   though the HTML order is Cancel → Save for desktop convention. */
	#editorHeader > .col,
	#editorHeader > [class^="col-"],
	#editorHeader > [class*=" col-"] {
		flex: 0 0 100%;
		max-width: 100%;
	}
	.editorHeaderButtons,
	.utilButtons {
		display: flex;
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 0.25rem;
		margin-top: 0.5rem;
	}
	.editorHeaderButtons .btn,
	.editorHeaderButtons .btn-group,
	.utilButtons .btn,
	.utilButtons .btn-group {
		width: 100%;
		margin: 0;
	}

	/* Events editor — 4 buttons (View / Clone / Cancel / Save) feel
	   heavy stacked. Arrange as:
	     [        Save        ]
	     [       Cancel       ]
	     [  Clone  ][  View   ]
	   Save + Cancel keep prominence; the auxiliary actions share row 3. */
	/* /reports/wba-registration-timeline/ — 5-cell filter row (Event,
	   Reg From, Reg To, Unit Name, Search/Clear). Each col-sm-*
	   shrinks to 25-33% at xs which is unusable. Stack full-width.
	   Search + Clear buttons share row 2 of their cell as a 50/50
	   pair. Stats card row + Export button also stack. */
	body.page-reports-wba-registration-timeline #myForm > .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0.5rem;
	}
	body.page-reports-wba-registration-timeline #myForm .input-group,
	body.page-reports-wba-registration-timeline #myForm .form-control,
	body.page-reports-wba-registration-timeline #myForm .datetimepicker-input {
		width: 100% !important;
		max-width: 100% !important;
	}
	body.page-reports-wba-registration-timeline #myForm .form-group > label[for=""],
	body.page-reports-wba-registration-timeline #myForm .form-group > label:empty {
		display: none;
	}
	/* Search/Clear cell — the only .col-sm-2 in the form that ISN'T
	   also a .col (date pickers are `col col-sm-2`). The cell has
	   <label>&nbsp;</label><br /><button#search><button#clear>;
	   strip the <br /> + empty label and lay the buttons out as a
	   50/50 flex pair. Avoids :has() for compatibility. */
	body.page-reports-wba-registration-timeline #myForm .col-sm-2:not(.col) .form-group {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
		align-items: stretch;
	}
	body.page-reports-wba-registration-timeline #myForm .col-sm-2:not(.col) .form-group > br,
	body.page-reports-wba-registration-timeline #myForm .col-sm-2:not(.col) .form-group > label {
		display: none;
	}
	body.page-reports-wba-registration-timeline #myForm #searchButton,
	body.page-reports-wba-registration-timeline #myForm #clearButton {
		flex: 1 1 calc(50% - 0.25rem);
		margin: 0;
		min-width: 0;
	}
	/* Stats cards row + Export button: stack each on its own line. */
	body.page-reports-wba-registration-timeline .row.mb-3 > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0.5rem;
	}
	body.page-reports-wba-registration-timeline .row.mb-3 .float-right {
		float: none !important;
		margin-top: 0 !important;
	}
	body.page-reports-wba-registration-timeline .row.mb-3 .float-right > .btn {
		width: 100%;
	}

	/* /reports/westernbands-reg/ — h2 title with inline year <select>
	   plus a float-right Export button. Stack the year select under
	   the title and stretch the Export button. */
	body.page-reports-westernbands-reg #editorHeader h2 {
		font-size: 1.25rem;
		margin: 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	body.page-reports-westernbands-reg #editorHeader h2 form,
	body.page-reports-westernbands-reg #editorHeader h2 select {
		width: 100%;
	}
	body.page-reports-westernbands-reg main .float-right {
		float: none !important;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		margin-bottom: 0.5rem;
	}
	body.page-reports-westernbands-reg main .float-right > .btn {
		width: 100%;
		margin: 0;
	}

	/* /reports/usbands-reg/ — header has h2 title + year <select> +
	   Reg. Date datepicker all crammed inline in a single
	   .d-flex.justify-content-between with `gap: 10px`. Stack each
	   piece full-width on phones. The Reset / Export buttons at the
	   top of the table area also stretch. */
	body.page-reports-usbands-reg #editorHeader > .col.d-flex {
		flex-direction: column;
		align-items: stretch !important;
		gap: 0.5rem !important;
	}
	body.page-reports-usbands-reg #editorHeader h2 {
		font-size: 1.25rem;
		margin: 0;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	body.page-reports-usbands-reg #editorHeader h2 form,
	body.page-reports-usbands-reg #editorHeader h2 select {
		width: 100%;
	}
	body.page-reports-usbands-reg #editorHeader .form-group {
		flex-direction: column;
		align-items: stretch !important;
		gap: 0.25rem !important;
		width: 100%;
	}
	body.page-reports-usbands-reg #editorHeader .input-group,
	body.page-reports-usbands-reg #editorHeader .datetimepicker-input {
		width: 100% !important;
		max-width: 100% !important;
	}
	/* Reset / Export action row: full-width stacked instead of float-right cluster. */
	body.page-reports-usbands-reg main .float-right {
		float: none !important;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		margin-bottom: 0.5rem;
	}
	body.page-reports-usbands-reg main .float-right > .btn {
		width: 100%;
		margin: 0;
	}

	/* /people/editor.php — Available Dates tab. Same 2-col label/control
	   pattern as Expense Levels: hide the original <thead> (the
	   "Date" / "Position Category" labels would just float in the
	   middle) and stack each row's date-toggle + category-select
	   vertically full-width. */
	body.page-people-editor .available-dates-table thead {
		display: none;
	}
	body.page-people-editor .available-dates-table tr {
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		padding: 0.5rem 0;
		border-bottom: 1px solid var(--border-soft);
	}
	body.page-people-editor .available-dates-table td {
		display: block;
		width: 100% !important;
		border: none;
		padding: 0;
	}
	body.page-people-editor .available-dates-table td .col-md-4 {
		flex: 0 0 100%;
		max-width: 100%;
		padding: 0;
	}
	/* Bootstrap-toggle widget computes label widths inline at init
	   based on the toggle's initial width — forcing 100% later
	   leaves the labels stuck at their original ~90px while the bar
	   stretches, hiding the date text. Keep the natural width so
	   the date stays readable. */
	body.page-people-editor .available-dates-table .toggle.btn {
		width: 220px !important;
	}
	body.page-people-editor .available-dates-table .toogleAvailableDate + .toggle-group .toggle-on,
	body.page-people-editor .available-dates-table .toogleAvailableDate + .toggle-group .toggle-off {
		font-size: 0.85rem;
		white-space: nowrap;
	}
	body.page-people-editor .available-dates-table .form-control {
		width: 100%;
	}

	/* /people/editor.php — Expense Levels tab. The table is a 2-col
	   form (Label | <select>). Keep a normal table layout but stack
	   each row's two cells vertically as label-on-top / select-below
	   so long labels like "Adjudication Technician Pay" don't get
	   squashed into a 25%-wide cell. */
	body.page-people-editor .expense-level-table tr {
		display: flex;
		flex-direction: column;
		gap: 0.25rem;
		padding: 0.5rem 0;
		border-bottom: 1px solid var(--border-soft);
	}
	body.page-people-editor .expense-level-table td {
		display: block;
		width: 100% !important;
		border: none;
		padding: 0;
	}
	body.page-people-editor .expense-level-table .form-control {
		width: 100%;
	}

	/* /units/editor.php — the main form has two bare <div class="col">
	   siblings (left = profile photo + Unit Name + School Name +
	   Address + City + ...; right = Billing Information section).
	   Bootstrap's `.col` keeps them at equal share of the row at
	   every viewport, so on phones they're each 50% wide and content
	   gets squeezed. Force every direct .col child of an editorForm
	   row to take the full row on mobile so they stack vertically. */
	body.page-units-editor #myForm > .row > .col {
		flex: 0 0 100%;
		max-width: 100%;
	}

	/* /units/productions/editor.php — the Leadership / Staff sections
	   wrap their Repeaters in <div class="row row-cols-sm-2"> which
	   keeps two .col siblings at 50/50 from 576px up, cramping each
	   Repeater. Force every .col inside any row-cols-sm-2 row to
	   100% width on mobile so each Repeater (Directors / Drum Majors /
	   Section Leaders / Staff Members / etc.) gets the full row. */
	body.page-units-productions-editor .row.row-cols-sm-2 > .col,
	body.page-units-productions-editor .row[class*="row-cols-"] > .col {
		flex: 0 0 100%;
		max-width: 100%;
	}

	/* /units/editor.php — section headers (Store Credit, Productions
	   and Specs, Managers, Purchase Orders, Invoices/Payments,
	   Waitlist) all use the pattern <h2 class="float-left"> + a
	   <div class="float-right"> action wrapper. Floats collide on
	   phones; stack them as title row + full-width action row. */
	body.page-units-editor h2.float-left {
		float: none !important;
		display: block;
		width: 100%;
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
	}
	body.page-units-editor .float-right {
		float: none !important;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		margin: 0 0 0.75rem 0;
	}
	body.page-units-editor .float-right > .btn,
	body.page-units-editor .float-right > .btn-group,
	body.page-units-editor .float-right > a.btn,
	body.page-units-editor .float-right > .form-group {
		width: 100%;
		margin: 0;
	}

	/* Editor title h1 — slim breadcrumb on phones, ID badge inline,
	   any inline emphasized text breaks to its own line cleanly. */
	body.page-units-editor #editorHeader h1 {
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
		line-height: 1.3;
	}
	body.page-units-editor #editorHeader h1 .infoBlock {
		display: inline-flex;
		gap: 0.25rem;
		margin-left: 0.25rem;
		vertical-align: baseline;
	}
	body.page-units-editor #editorHeader h1 .infoBlock .infoTitle,
	body.page-units-editor #editorHeader h1 .infoBlock .info {
		display: inline;
		font-size: 0.7rem;
	}

	/* /administration-contact-emails/editor.php — three col-4 cells
	   (Circuit / Alias Name / Email) crammed at 33% each on mobile.
	   Stack full-width. */
	body.page-administration-contact-emails-editor #myForm > .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0.5rem;
	}
	body.page-administration-contact-emails-editor #myForm .form-control {
		width: 100%;
		max-width: 100%;
	}
	body.page-administration-contact-emails-editor #myForm .form-group > br {
		display: none;
	}

	/* /admin/audit-logs/view.php — same shape as the report pages
	   (h2 title, tab strip, filter form, DataTable). Filters stack
	   full-width; the long domain-tab strip scrolls horizontally
	   like the editor tab bars; Apply/Clear buttons share a 50/50
	   row at the bottom of the filters. */
	body.page-admin-audit-logs-view #editorHeader h2 {
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
	}
	body.page-admin-audit-logs-view ul.auditTabs.nav-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		border-bottom: 1px solid var(--border-soft);
	}
	body.page-admin-audit-logs-view ul.auditTabs.nav-tabs::-webkit-scrollbar {
		height: 4px;
	}
	body.page-admin-audit-logs-view ul.auditTabs.nav-tabs::-webkit-scrollbar-thumb {
		background: var(--border-default);
		border-radius: 2px;
	}
	body.page-admin-audit-logs-view ul.auditTabs.nav-tabs > .nav-item {
		flex: 0 0 auto;
	}
	body.page-admin-audit-logs-view ul.auditTabs.nav-tabs .nav-link {
		white-space: nowrap;
		padding: 0.5rem 0.875rem;
		font-size: 0.9rem;
	}
	body.page-admin-audit-logs-view #filterForm > .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0.5rem;
	}
	body.page-admin-audit-logs-view #filterForm .input-group,
	body.page-admin-audit-logs-view #filterForm .form-control,
	body.page-admin-audit-logs-view #filterForm .datetimepicker-input {
		width: 100% !important;
		max-width: 100% !important;
	}
	body.page-admin-audit-logs-view #filterForm .form-group > label[for=""],
	body.page-admin-audit-logs-view #filterForm .form-group > label:empty {
		display: none;
	}
	/* Apply / Clear pair — sit side by side as 50/50 */
	body.page-admin-audit-logs-view #filterForm .form-group:has(button[type="submit"]),
	body.page-admin-audit-logs-view #filterForm .col-sm-2:last-child .form-group {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	body.page-admin-audit-logs-view #filterForm .form-group > br,
	body.page-admin-audit-logs-view #filterForm .form-group > label[for=""] {
		display: none;
	}
	body.page-admin-audit-logs-view #filterForm button[type="submit"],
	body.page-admin-audit-logs-view #filterForm a.btn {
		flex: 1 1 calc(50% - 0.25rem);
		min-width: 0;
		margin: 0;
	}
	/* Card-mode tweaks for the audit grid: long UUIDs / URIs / JSON
	   blobs and inline link/code text don't have whitespace, so
	   word-break alone leaves them as one giant unbroken token that
	   pushes the card past the viewport. Use overflow-wrap:anywhere
	   on the value side, force flex children to shrink (min-width:0)
	   and keep the table itself within the parent col. */
	body.page-admin-audit-logs-view #grid_wrapper,
	body.page-admin-audit-logs-view table.responsive-cards {
		max-width: 100%;
	}
	body.page-admin-audit-logs-view table.responsive-cards > tbody > tr > td {
		flex-wrap: wrap;
		text-align: left;
		row-gap: 0.25rem;
		min-width: 0;
	}
	body.page-admin-audit-logs-view table.responsive-cards > tbody > tr > td,
	body.page-admin-audit-logs-view table.responsive-cards > tbody > tr > td * {
		overflow-wrap: anywhere;
		word-break: break-word;
		min-width: 0;
	}
	body.page-admin-audit-logs-view table.responsive-cards .auditTargetSummary {
		display: block;
		width: 100%;
		margin-top: 0.25rem;
	}

	/* All /reports/* pages — generic mobile rules. Each report page
	   shares the same shape: <h2> title, <form id="myForm"
	   class="editorForm"> with col-sm-* filter cells, .float-right
	   action buttons above a DataTable. The selector body[class*=
	   "page-reports-"] only fires on report pages so it can't leak. */
	body[class*="page-reports-"] #editorHeader h2 {
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
	}
	body[class*="page-reports-"] #myForm > .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0.5rem;
	}
	body[class*="page-reports-"] #myForm .input-group,
	body[class*="page-reports-"] #myForm .form-control,
	body[class*="page-reports-"] #myForm .datetimepicker-input {
		width: 100% !important;
		max-width: 100% !important;
	}
	/* Empty placeholder labels (used to align inputs with the buttons
	   row on desktop) collapse on mobile. Use the structural selector
	   that catches both <label></label> and <label>&nbsp;</label>. */
	body[class*="page-reports-"] #myForm .form-group > label[for=""],
	body[class*="page-reports-"] #myForm .form-group > label:empty {
		display: none;
	}
	/* .float-right action button clusters above the table become a
	   stacked full-width column. */
	body[class*="page-reports-"] main .float-right {
		float: none !important;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		margin: 0 0 0.5rem 0 !important;
	}
	body[class*="page-reports-"] main .float-right > .btn {
		width: 100%;
		margin: 0;
	}
	/* Server-rendered tables that already have responsive-cards keep
	   working; ones without (audit-logs / unit-members-info-directors
	   etc.) still scroll inside their col without breaking the page. */
	body[class*="page-reports-"] main .table:not(.responsive-cards) {
		font-size: 0.85rem;
	}

	/* /reports/membership/ — title + a single 6-column server-rendered
	   table. The table opts in to responsive-cards above; here we
	   just slim the title on phones. */
	body.page-reports-membership #editorHeader h2 {
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
	}

	/* /reports/payments/ — filter row: Start Date / End Date / School
	   Name / Search button. Each uses `col col-sm-3`, so at xs each
	   shrinks to 25% of viewport (~94px) which is too narrow for a
	   date input. Stack each cell full-width on phones and stretch
	   the Search button. */
	body.page-reports-payments #myForm > .row > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		margin-bottom: 0.5rem;
	}
	body.page-reports-payments #myForm .input-group,
	body.page-reports-payments #myForm .form-control,
	body.page-reports-payments #myForm .datetimepicker-input {
		width: 100% !important;
		max-width: 100% !important;
	}
	body.page-reports-payments #myForm .searchButton {
		display: block;
		width: 100%;
	}
	/* The empty <label>&nbsp;</label> above the Search button forces a
	   blank line on desktop alignment — collapse on mobile. */
	body.page-reports-payments #myForm .form-group > label[for=""],
	body.page-reports-payments #myForm .form-group > label:empty {
		display: none;
	}

	/* /reports/dashboard/ — header has h2 with two inline <select>s
	   (year + circuit) which wraps badly on phones. Stack the title
	   text and selectors. Tables in cards stay tabular but scroll
	   horizontally inside their own card-body so the page never
	   forces full-page horizontal scroll. */
	body.page-reports-dashboard #editorHeader h2 {
		font-size: 1.25rem;
		display: flex;
		flex-direction: column;
		gap: 0.5rem;
		align-items: flex-start;
	}
	body.page-reports-dashboard #editorHeader h2 form {
		display: flex !important;
		flex-direction: column;
		gap: 0.5rem;
		width: 100%;
	}
	body.page-reports-dashboard #editorHeader h2 form select,
	body.page-reports-dashboard #editorHeader h2 form select.form-control {
		width: 100%;
		max-width: 100%;
	}
	/* Excessive 40px margin between cards squeezes vertical density.
	   Tighten to 1rem on phones. */
	body.page-reports-dashboard main .row[style*="margin-top: 40px"] {
		margin-top: 1rem !important;
	}
	body.page-reports-dashboard .card-header h5 {
		font-size: 1rem;
		margin: 0;
	}
	/* Wide multi-column financial tables now render as responsive
	   cards on phones (each row = a card with Label:value lines).
	   Card-body just keeps tight padding; no horizontal scroll
	   needed once cards mode kicks in. */
	body.page-reports-dashboard .card-body {
		padding: 0.75rem;
	}
	body.page-reports-dashboard .card-body table {
		font-size: 0.9rem;
		margin-bottom: 0;
	}

	/* /scheduling/expenses/ — header / filter bar.
	   Markup is one .row with col-sm-2 (title) + col-sm-5 (circuit
	   select + 2 settings buttons) + col-sm-5 (filter button + Export
	   PDF + Generate CSV dropdown). Inline `gap: 20px` and floats
	   wreck things on phones. Stack each col-sm-* full-width and let
	   buttons inside flex-wrap with even spacing. */
	body.page-scheduling-expenses #editorHeader {
		flex-direction: column;
		align-items: stretch !important;
		gap: 0.5rem;
	}
	body.page-scheduling-expenses #editorHeader > [class*="col-"] {
		flex: 0 0 100%;
		max-width: 100%;
		padding-left: 0;
		padding-right: 0;
	}
	body.page-scheduling-expenses #editorHeader h1 {
		font-size: 1.5rem;
		margin: 0;
	}
	body.page-scheduling-expenses #editorHeader .form-group {
		flex-direction: column;
		gap: 0.5rem;
	}
	body.page-scheduling-expenses #editorHeader #entryForCircuit {
		width: 100%;
	}
	body.page-scheduling-expenses #editorHeader .openSettings,
	body.page-scheduling-expenses #editorHeader .exportPDF,
	body.page-scheduling-expenses #editorHeader .btn-group {
		width: 100%;
		margin: 0 !important;
	}
	body.page-scheduling-expenses #editorHeader .btn-group > .btn {
		width: 100%;
	}
	/* Filter funnel block: collapse the inline gap, full width */
	body.page-scheduling-expenses #filter-block {
		gap: 0.5rem !important;
		flex-direction: column;
		align-items: stretch !important;
		justify-content: flex-start !important;
	}
	body.page-scheduling-expenses #filter-block #filters-trigger {
		width: 100%;
	}
	body.page-scheduling-expenses .filter-dropdown {
		position: static !important;
		width: 100% !important;
	}
	/* Filter-dropdown internals — Event Dates date pair overflows on
	   phones because both `<input type="date">` are rendered at the
	   browser-default minimum width side-by-side. Stack them with a
	   "to" separator that takes its own line, and let each date fill
	   the row. Also full-width the Search Event button. */
	body.page-scheduling-expenses .filter-dropdown .form-date {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.25rem;
	}
	body.page-scheduling-expenses .filter-dropdown .form-date input[type="date"] {
		width: 100% !important;
		max-width: 100% !important;
	}
	body.page-scheduling-expenses .filter-dropdown .form-date > span {
		text-align: center;
		font-size: 0.85rem;
		color: var(--text-muted);
	}
	body.page-scheduling-expenses .filter-dropdown #eventChooser {
		width: 100%;
	}
	/* Tighten checkbox group spacing so the panel doesn't feel huge. */
	body.page-scheduling-expenses .filter-dropdown .form-check {
		padding-left: 0;
	}

	/* /scheduling/expenses/ — table cards mode tweaks. The page-
	   specific styles set .addExpense to 30px and .expenseAction to
	   20px which blow up cell width inside a card. Tighten on phones
	   so labels and values share the row cleanly. */
	body.page-scheduling-expenses td.addExpense {
		font-size: 1.25rem !important;
		text-decoration: underline;
		line-height: 1.2;
	}
	body.page-scheduling-expenses td.expenseAction {
		font-size: 0.95rem !important;
		font-weight: 600;
	}
	/* In the cards mode, give the value column more breathing room
	   (50/50 instead of 40/60) and let it wrap naturally, not right-
	   aligned forced wrap that ends up vertical-letter for narrow
	   nested elements. */
	body.page-scheduling-expenses table.responsive-cards > tbody > tr > td {
		flex-wrap: wrap;
		row-gap: 0.25rem;
		text-align: left;
	}
	body.page-scheduling-expenses table.responsive-cards > tbody > tr > td::before {
		flex: 0 0 auto;
		min-width: 35%;
	}
	/* Action button group inside Approve/Deny cell — keep them
	   horizontal, not vertical-letter stacked. */
	body.page-scheduling-expenses td.expenseAction .btn-group,
	body.page-scheduling-expenses td.expenseAction .btn {
		display: inline-flex !important;
		flex: 0 0 auto;
		writing-mode: horizontal-tb !important;
	}

	/* Repeater "new item" button row — used by classification/editor,
	   units/productions/editor, scheduling/expenses modals, and any
	   other page that renders the col-6 (empty header label) +
	   col-6 (right-aligned .newProductionPersonButton) pattern. At
	   narrow widths the button wraps mid-word inside its 50% column;
	   stretch the button and hide the empty-header sibling column. */
	.newProductionPersonButton {
		width: 100%;
		white-space: normal;
		padding: 0.5rem 0.75rem;
		font-size: 0.9rem;
	}
	.row:has(> .col-6 > .newProductionPersonButton) > .col-6:first-child,
	.row:has(> .col-6 > .text-right > .newProductionPersonButton) > .col-6:first-child {
		display: none;
	}
	.row:has(> .col-6 > .newProductionPersonButton) > .col-6:last-child,
	.row:has(> .col-6 > .text-right > .newProductionPersonButton) > .col-6:last-child {
		flex: 0 0 100%;
		max-width: 100%;
	}
	.row > .col-6 > .text-right:has(> .newProductionPersonButton) {
		text-align: stretch !important;
	}

	/* Bootstrap-Select dropdown menu — at narrow viewports the menu
	   has a min-width set by the plugin that overflows the right
	   edge (visible on /events/waitlist/editor.php's "Event Day"
	   select among others). Clamp to viewport so the menu always
	   fits and items wrap if needed. */
	.bootstrap-select .dropdown-menu {
		max-width: calc(100vw - 1rem);
		min-width: 0 !important;
	}
	.bootstrap-select .dropdown-menu li {
		max-width: 100%;
	}
	.bootstrap-select .dropdown-menu li a {
		white-space: normal;
		word-break: break-word;
	}

	/* States Select2 multiselect on /classification/editor.php — the
	   underlying <select> has inline `style="width: 350px;"` which
	   Select2 mirrors. At narrow viewports that overflows the right
	   edge. Force full-width on mobile (covers both the bare select
	   and the Select2 wrapper container). */
	body.page-classification-editor #selectState,
	body.page-classification-editor .select2-container,
	body.page-classification-editor .select2-selection,
	body.page-classification-editor .select2-selection__rendered {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* /content-management/crud/list/?item=... — server-rendered table
	   converted to responsive-cards. The base cards rule hides the
	   whole <thead>, but this page keeps a SECOND <tr> in <thead>
	   that holds per-column filter inputs (built by FiltersGenerator).
	   Override the thead-hide so it stays visible, then drop the
	   first <tr> (column-name labels) and stack the filter <th>
	   cells as full-width inputs. The body rows render as cards via
	   the standard rules + applyResponsiveCardLabels(). */
	body.page-content-management-crud-list .row.m-4 {
		margin: 0.5rem !important;
	}
	body.page-content-management-crud-list h2 {
		font-size: 1.5rem;
		margin: 0 0 0.5rem;
	}
	body.page-content-management-crud-list a.btn.m-4 {
		display: block;
		width: 100%;
		margin: 0 0 0.5rem 0 !important;
	}
	body.page-content-management-crud-list #circuit-select.form-control {
		width: 100%;
		max-width: 100%;
	}
	body.page-content-management-crud-list .table-responsive {
		overflow: visible;       /* let the cards spill naturally */
	}

	/* Restore <thead> as a visible block (the base cards rule hides it
	   for accessibility-only access). */
	body.page-content-management-crud-list table.responsive-cards > thead {
		position: static !important;
		width: auto !important;
		height: auto !important;
		overflow: visible !important;
		clip: auto !important;
		white-space: normal !important;
		display: block;
		margin-bottom: 0.5rem;
	}
	/* Hide the first <tr> (column-name labels); keep the second <tr>
	   (filter inputs). */
	body.page-content-management-crud-list table.responsive-cards > thead > tr:first-child {
		display: none;
	}
	/* Show the toggle button on phones (it's hidden by default at
	   file-scope above). */
	body.page-content-management-crud-list .filters-toggle {
		display: block;
		width: 100%;
	}
	body.page-content-management-crud-list .filters-toggle.active {
		background: var(--surface-sidebar-active);
	}
	/* Filter row: hidden by default on mobile. Becomes visible only
	   when the user taps the Filters toggle (sets .filters-open on
	   the table). */
	body.page-content-management-crud-list table.responsive-cards > thead > tr:nth-child(2) {
		display: none;
		flex-direction: column;
		gap: 0.5rem;
		padding: 0.75rem;
		border: 1px solid var(--border-soft);
		border-radius: var(--radius-default);
		background: var(--surface-alt-row);
		margin-bottom: 0.75rem;
	}
	body.page-content-management-crud-list table.responsive-cards.filters-open > thead > tr:nth-child(2) {
		display: flex;
	}
	body.page-content-management-crud-list table.responsive-cards > thead > tr:nth-child(2) > th {
		display: block;
		width: 100%;
		padding: 0;
		border: none;
	}
	/* Filter labels (injected by Table.php JS): show above each filter
	   input as a small caption so users know which column each filter
	   targets. */
	body.page-content-management-crud-list table.responsive-cards .filter-label {
		display: block;
		font-size: 0.8rem;
		font-weight: 600;
		color: var(--text-form);
		margin-bottom: 0.15rem;
	}
	/* Action cell card row — label "Actions" was being squeezed by the
	   Edit/Delete buttons on the value side, wrapping letter-by-letter.
	   Stack the label on top and the buttons in a horizontal cluster
	   below. */
	body.page-content-management-crud-list table.responsive-cards > tbody > tr > td.actionButtons {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}
	body.page-content-management-crud-list table.responsive-cards > tbody > tr > td.actionButtons::before {
		flex: 0 0 auto;
	}
	body.page-content-management-crud-list table.responsive-cards > tbody > tr > td.actionButtons > a,
	body.page-content-management-crud-list table.responsive-cards > tbody > tr > td.actionButtons > btn,
	body.page-content-management-crud-list table.responsive-cards > tbody > tr > td.actionButtons > button {
		flex: 0 0 auto;
	}
	/* Each filter input/select fills its row. Override the .m-1 margin
	   that LikeFilter/BooleanFilter add by default. */
	body.page-content-management-crud-list table.responsive-cards .filter {
		margin: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	/* Apply / Clear buttons in the last filter cell — sit side-by-side
	   as a 50/50 pair instead of stacking. */
	body.page-content-management-crud-list table.responsive-cards > thead > tr:nth-child(2) > th:last-child {
		display: flex;
		gap: 0.5rem;
	}
	body.page-content-management-crud-list table.responsive-cards .apply-filters,
	body.page-content-management-crud-list table.responsive-cards .clear-filters {
		flex: 1 1 calc(50% - 0.25rem);
		margin: 0 !important;
	}

	/* Pagination wraps & centers on phones. */
	body.page-content-management-crud-list .pagination {
		flex-wrap: wrap;
		gap: 0.25rem;
		justify-content: center;
		padding-left: 0;
	}
	body.page-content-management-crud-list .pagination .page-link {
		padding: 0.3rem 0.55rem;
		font-size: 0.85rem;
	}

	/* Events editor — per-tab section header (h2.float-left + .actions
	   .float-right). The floats collide on phones and the action
	   dropdowns squash into a tiny right-edge strip. Stack them
	   vertically: h2 first, action group below as a full-width column,
	   any nested .btn-group / .form-group / .btn become full-width. */
	body.page-events-editor .tab-pane h2.float-left {
		float: none !important;
		display: block;
		width: 100%;
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
	}
	body.page-events-editor .tab-pane .actions.float-right {
		float: none !important;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		margin: 0 0 0.75rem;
	}
	body.page-events-editor .tab-pane .actions.float-right > .btn,
	body.page-events-editor .tab-pane .actions.float-right > .btn-group,
	body.page-events-editor .tab-pane .actions.float-right > .form-group {
		float: none !important;
		width: 100%;
		margin: 0 !important;
	}
	body.page-events-editor .tab-pane .actions.float-right .btn-group > .btn,
	body.page-events-editor .tab-pane .actions.float-right .btn-group > .dropdown-toggle {
		width: 100%;
	}
	/* The toggle switches inside .form-group sit centered when stacked
	   full-width so they don't hug the right edge. */
	body.page-events-editor .tab-pane .actions.float-right .switch-toggle,
	body.page-events-editor .tab-pane .actions.float-right fieldset {
		width: 100%;
	}

	/* Tab bars (#nav-tab.nav-tabs) used by events/editor and people/
	   editor — Bootstrap nav-tabs default to flex-wrap which
	   fragments long labels across many ragged rows. Switch to
	   horizontal scroll: tabs stay on one line, user swipes to reach
	   the rest. Keep a thin visible scrollbar so users can see
	   there's more to scroll into. */
	body.page-events-editor #nav-tab.nav-tabs,
	body.page-people-editor #nav-tab.nav-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		border-bottom: 1px solid var(--border-soft);
	}
	body.page-events-editor #nav-tab.nav-tabs::-webkit-scrollbar,
	body.page-people-editor #nav-tab.nav-tabs::-webkit-scrollbar {
		height: 4px;
	}
	body.page-events-editor #nav-tab.nav-tabs::-webkit-scrollbar-thumb,
	body.page-people-editor #nav-tab.nav-tabs::-webkit-scrollbar-thumb {
		background: var(--border-default);
		border-radius: 2px;
	}
	body.page-events-editor #nav-tab.nav-tabs > .nav-link,
	body.page-people-editor #nav-tab.nav-tabs > .nav-link {
		flex: 0 0 auto;
		white-space: nowrap;
		padding: 0.5rem 0.875rem;
		font-size: 0.9rem;
	}
	body.page-events-editor #nav-tab.nav-tabs > .nav-link.active,
	body.page-people-editor #nav-tab.nav-tabs > .nav-link.active {
		font-weight: 600;
	}

	/* Events editor title — make the breadcrumb smaller and put the
	   event name on its own line so the whole header feels lighter. */
	body.page-events-editor #editorHeader h1 {
		font-size: 1.25rem;
		margin: 0 0 0.5rem;
		line-height: 1.3;
	}
	body.page-events-editor #editorHeader h1 .title {
		display: inline;
	}
	body.page-events-editor #editorHeader h1 .infoBlock {
		display: inline-flex;
		gap: 0.25rem;
		margin-left: 0.25rem;
		vertical-align: baseline;
	}
	body.page-events-editor #editorHeader h1 .infoBlock .infoTitle,
	body.page-events-editor #editorHeader h1 .infoBlock .info {
		display: inline;
		font-size: 0.7rem;
	}
	body.page-events-editor #editorHeader h1 b {
		display: block;
		font-size: 1.5rem !important;
		margin: 0.25rem 0 0 0 !important;
		line-height: 1.25;
	}

	body.page-events-editor .editorHeaderButtons {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	body.page-events-editor .editorHeaderButtons .saveButton {
		order: 1;
		flex: 0 0 100%;
	}
	body.page-events-editor .editorHeaderButtons .cancelButton {
		order: 2;
		flex: 0 0 100%;
	}
	body.page-events-editor .editorHeaderButtons .cloneButton,
	body.page-events-editor .editorHeaderButtons .noPermissionAnchorEvent {
		order: 3;
		flex: 1 1 calc(50% - 0.25rem);
		min-width: 0;
		width: auto;
		margin: 0 !important;
	}
	body.page-events-editor .editorHeaderButtons > a[target="_blank"].btn {
		order: 4;
		flex: 1 1 calc(50% - 0.25rem);
		min-width: 0;
		width: auto;
		margin: 0 !important;
	}

	/* Multi-button rows above tables (filter / export / generate buttons
	   on the expenses page, broadcast page, etc.) wrap with even spacing
	   and full-width buttons rather than squashing onto a single line. */
	main .btn-toolbar > .btn-group,
	main .btn-toolbar > .btn {
		flex: 1 1 auto;
		margin-bottom: 0.25rem;
	}

	/* Modal forms: prevent fixed positioning rules from pushing content
	   under the navbar on small viewports. */
	body.page-scheduling-expenses .file-info {
		position: static;
		top: auto;
	}
	body.page-scheduling-expenses .file-name {
		max-width: 100%;
	}

	/* Modal dialogs: leverage the full viewport width on phone so forms
	   inside don't get cut off by the default modal padding. */
	.modal-dialog {
		margin: 0.5rem;
	}
	.modal-body {
		padding: 0.75rem;
	}

	/* Form rows where children stack: give a small gap between rows. */
	main .form-row > [class*="col-"] {
		margin-bottom: 0.5rem;
	}
}
/* === /responsive === */
