/**
 * Marine PDS appearance tokens — light (default) + dark via html[data-bs-theme="dark"].
 * Load before pds-app.css / agent styles so chrome can use var(--pds-*).
 */

:root,
html[data-bs-theme="light"] {
	color-scheme: light;

	--pds-navy: #003399;
	--pds-navy-deep: #002266;
	--pds-navy-ink: #003399;
	--pds-navy-link: #003399;
	--pds-orange: #ff7f00;
	--pds-orange-hover: #e87200;

	--pds-bg: #d8e3ff;
	--pds-bg-soft: #e8eefc;
	--pds-surface: #ffffff;
	--pds-surface-2: #f7f9ff;
	--pds-surface-3: #eef2fb;
	--pds-surface-hover: #f3f6ff;
	--pds-surface-muted: #f4f6fb;
	--pds-stripe: #f8f9fa;
	--pds-stripe-hover: #f1f3f5;

	--pds-text: #1a2b4a;
	--pds-muted: #5a6a85;
	--pds-border: rgba(0, 51, 153, 0.18);
	--pds-border-strong: rgba(0, 51, 153, 0.28);

	--pds-shadow: 0 2px 4px rgba(0, 40, 100, 0.08), 0 10px 28px rgba(0, 40, 100, 0.16);
	--pds-shadow-soft: 0 1px 2px rgba(0, 40, 100, 0.08), 0 4px 12px rgba(0, 40, 100, 0.1);

	--pds-navbar-bg-top: #ffffff;
	--pds-navbar-bg-bottom: #f7f9ff;
	--pds-navbar-shadow: 0 0.125rem 0.25rem rgba(0, 51, 153, 0.06), 0 0.35rem 1.1rem rgba(0, 51, 153, 0.12);

	--pds-control-strip-top: #ffffff;
	--pds-control-strip-bottom: #eef2fb;
	--pds-inset-highlight: rgba(255, 255, 255, 0.95);

	--pds-success: #198754;
	--pds-success-bg: #e7f7ef;
	--pds-danger: #dc3545;
	--pds-danger-bg: #fff0f0;
	--pds-warning-bg: #fff8e6;
	--pds-warning-border: #ffecb5;
	--pds-info-bg: #e8f0ff;
	--pds-pending-bg: #fff7ed;

	--pds-help-page: #ffffff;
	--pds-help-ink: #1e293b;
	--pds-help-accent: #003399;
	--pds-help-accent-soft: #eef2fb;
	--pds-help-muted: #64748b;

	--pds-hero-logo-plate: rgba(255, 255, 255, 0.96);
}

html[data-bs-theme="dark"] {
	color-scheme: dark;

	--pds-navy: #003399;
	--pds-navy-deep: #1a56c4;
	--pds-navy-ink: #c7dbff;
	--pds-navy-link: #c7dbff;
	--pds-orange: #ff7f00;
	--pds-orange-hover: #ff9933;

	--pds-bg: #0b1220;
	--pds-bg-soft: #121a2b;
	--pds-surface: #151d2e;
	--pds-surface-2: #1c2740;
	--pds-surface-3: #243252;
	--pds-surface-hover: #243252;
	--pds-surface-muted: #1a2336;
	--pds-stripe: #1a2336;
	--pds-stripe-hover: #243252;

	/* Near-white primary text for readable contrast on dark chrome */
	--pds-text: #f5f7fb;
	--pds-muted: #d0d8e8;
	--pds-border: rgba(199, 219, 255, 0.28);
	--pds-border-strong: rgba(199, 219, 255, 0.4);

	--pds-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.45);
	--pds-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.35);

	--pds-navbar-bg-top: #151d2e;
	--pds-navbar-bg-bottom: #121a2b;
	--pds-navbar-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.35), 0 0.35rem 1.1rem rgba(0, 0, 0, 0.45);

	--pds-control-strip-top: #1c2740;
	--pds-control-strip-bottom: #151d2e;
	--pds-inset-highlight: rgba(255, 255, 255, 0.04);

	--pds-success: #3dd68c;
	--pds-success-bg: rgba(61, 214, 140, 0.15);
	--pds-danger: #f87171;
	--pds-danger-bg: rgba(248, 113, 113, 0.15);
	--pds-warning-bg: rgba(251, 191, 36, 0.15);
	--pds-warning-border: rgba(251, 191, 36, 0.45);
	--pds-info-bg: rgba(142, 180, 255, 0.15);
	--pds-pending-bg: rgba(255, 127, 0, 0.15);

	--pds-help-page: #151d2e;
	--pds-help-ink: #f5f7fb;
	--pds-help-accent: #c7dbff;
	--pds-help-accent-soft: #1c2740;
	--pds-help-muted: #d0d8e8;

	--pds-hero-logo-plate: rgba(255, 255, 255, 0.92);
}

/* Global dark readability — body, muted Bootstrap helpers, tables */
html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] body.pds-app {
	color: var(--pds-text);
	background-color: var(--pds-bg);
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .form-text,
html[data-bs-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .text-body-secondary {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.pds-id-chip-link) {
	color: var(--pds-navy-link);
}

html[data-bs-theme="dark"] .pds-app .dataTables_wrapper table.dataTable thead th,
html[data-bs-theme="dark"] .pds-app .pds-panel table.dataTable thead th {
	color: #ffffff !important;
	border-bottom-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app .dataTables_wrapper table.dataTable tbody td,
html[data-bs-theme="dark"] .pds-app .pds-panel table.dataTable tbody td {
	color: var(--pds-text);
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app .dataTables_wrapper table.dataTable.table-bordered > :not(caption) > * > *,
html[data-bs-theme="dark"] .pds-app .pds-panel table.dataTable.table-bordered > :not(caption) > * > *,
html[data-bs-theme="dark"] .pds-app .dataTables_wrapper table.dataTable.row-border > tbody > tr > td,
html[data-bs-theme="dark"] .pds-app .dataTables_wrapper table.dataTable.display > tbody > tr > td {
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_info,
html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_length,
html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_filter,
html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_paginate {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_paginate .paginate_button {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-bs-theme="dark"] .pds-app .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
	color: var(--pds-muted) !important;
}

/* Footer — opaque dark bar, light copy (not frosted white) */
html[data-bs-theme="dark"] .pds-app-footer,
html[data-bs-theme="dark"] footer.pds-app-footer,
html[data-bs-theme="dark"] .footer {
	background: var(--pds-surface-2) !important;
	border-top-color: var(--pds-border) !important;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-app-footer-text,
html[data-bs-theme="dark"] .footer-content {
	color: rgba(255, 255, 255, 0.92) !important;
}

html[data-bs-theme="dark"] .pds-app-footer-text a,
html[data-bs-theme="dark"] .footer-content a {
	color: #ffffff !important;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

html[data-bs-theme="dark"] .pds-app-footer-text a:hover,
html[data-bs-theme="dark"] .pds-app-footer-text a:focus,
html[data-bs-theme="dark"] .footer-content a:hover,
html[data-bs-theme="dark"] .footer-content a:focus {
	color: var(--pds-orange) !important;
}

/* Status / ID chips — light text on tinted dark pills */
html[data-bs-theme="dark"] .pds-id-chip--pds {
	background: rgba(199, 219, 255, 0.16) !important;
	color: #ffffff !important;
	border-color: rgba(199, 219, 255, 0.4) !important;
}

html[data-bs-theme="dark"] .pds-id-chip--req {
	background: rgba(196, 181, 253, 0.18) !important;
	color: #ffffff !important;
	border-color: rgba(196, 181, 253, 0.4) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--status-ok {
	background: rgba(61, 214, 140, 0.22) !important;
	color: #d1fae5 !important;
	border-color: rgba(61, 214, 140, 0.45) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--status-approved {
	background: rgba(96, 165, 250, 0.22) !important;
	color: #ffffff !important;
	border-color: rgba(96, 165, 250, 0.5) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--status-pending {
	background: rgba(251, 191, 36, 0.2) !important;
	color: #fef3c7 !important;
	border-color: rgba(251, 191, 36, 0.45) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--status-bad {
	background: rgba(248, 113, 113, 0.22) !important;
	color: #fee2e2 !important;
	border-color: rgba(248, 113, 113, 0.45) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--status-default {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-toast--info,
html[data-bs-theme="dark"] .pds-export-toast--info {
	background: var(--pds-surface-2);
	color: #ffffff;
	border-color: var(--pds-border);
}

html[data-bs-theme="dark"] .pds-toast--success,
html[data-bs-theme="dark"] .pds-export-toast--success {
	/* Solid fill so footer / page edge does not show through */
	background: #14532d;
	color: #dcfce7;
	border-color: rgba(61, 214, 140, 0.55);
}

html[data-bs-theme="dark"] .pds-toast--error,
html[data-bs-theme="dark"] .pds-export-toast--error {
	background: #7f1d1d;
	color: #fee2e2;
	border-color: rgba(248, 113, 113, 0.55);
}

/* Common hard-coded muted grays from light chrome */
html[data-bs-theme="dark"] .pds-profile-role,
html[data-bs-theme="dark"] .pds-profile-role-line,
html[data-bs-theme="dark"] .pds-page-kicker,
html[data-bs-theme="dark"] .pds-notifications-empty,
html[data-bs-theme="dark"] .pds-search-empty,
html[data-bs-theme="dark"] .dropdown-header {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-profile-name,
html[data-bs-theme="dark"] .pds-navbar-brand-title {
	color: #ffffff;
}

html[data-bs-theme="dark"] .pds-nav-link-btn,
html[data-bs-theme="dark"] .pds-theme-toggle,
html[data-bs-theme="dark"] .pds-navbar-brand-subtitle {
	color: var(--pds-navy-ink);
}

html[data-bs-theme="dark"] .pds-nav-link-btn:hover,
html[data-bs-theme="dark"] .pds-nav-link-btn:focus,
html[data-bs-theme="dark"] .pds-nav-link-btn.active,
html[data-bs-theme="dark"] .pds-theme-toggle:hover,
html[data-bs-theme="dark"] .pds-theme-toggle:focus {
	color: var(--pds-orange);
}

html[data-bs-theme="dark"] .form-label,
html[data-bs-theme="dark"] label {
	color: var(--pds-text);
}

html[data-bs-theme="dark"] .page-link {
	background-color: var(--pds-surface-2);
	border-color: var(--pds-border);
	color: var(--pds-text);
}

html[data-bs-theme="dark"] .page-item.disabled .page-link {
	background-color: var(--pds-surface);
	color: var(--pds-muted);
}

html[data-bs-theme="dark"] .page-item.active .page-link {
	background-color: var(--pds-navy-deep);
	border-color: var(--pds-navy-deep);
	color: #ffffff;
}

/* Theme toggle tooltip stays orange/navy (readable); keep label in sync */
html[data-bs-theme="dark"] .tooltip.custom-tooltip .tooltip-inner,
html[data-bs-theme="dark"] .custom-tooltip .tooltip-inner {
	--bs-tooltip-color: #0b1220;
	--bs-tooltip-bg: #fe8700;
	color: #0b1220;
	background: #fe8700;
}

html[data-bs-theme="dark"] .pds-auth-footer {
	background: var(--pds-surface-2) !important;
	border-top-color: var(--pds-border) !important;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-auth-footer-text,
html[data-bs-theme="dark"] .pds-auth-footer-text strong {
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-auth-footer-text span {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .footer-login {
	background-color: var(--pds-surface-2) !important;
	color: var(--pds-text) !important;
	border-top: 1px solid var(--pds-border);
}

/* BRT / UNBRT / SHFT — solid navy + white check (Harbour Schedule style) */
html[data-bs-theme="dark"] input.pds-flag-check,
html[data-bs-theme="dark"] .pds-app input.pds-flag-check {
	background-color: var(--pds-surface) !important;
	border-color: #8eb4ff !important;
	box-shadow: none;
	accent-color: #003399;
}

html[data-bs-theme="dark"] input.pds-flag-check:checked,
html[data-bs-theme="dark"] input.pds-flag-check:checked:disabled,
html[data-bs-theme="dark"] .pds-app input.pds-flag-check:checked,
html[data-bs-theme="dark"] .pds-app input.pds-flag-check:checked:disabled {
	background-color: #003399 !important;
	border-color: #5b8def !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") !important;
}

/* Movement / service-request modals — remarks, flags, datetime picker */
html[data-bs-theme="dark"] .pds-remark-composer-box {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-remark-composer-input,
html[data-bs-theme="dark"] .pds-remark-composer-hint,
html[data-bs-theme="dark"] .pds-remark-composer-count,
html[data-bs-theme="dark"] .pds-remark-composer-optional {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-remark-composer-hint,
html[data-bs-theme="dark"] .pds-remark-composer-count,
html[data-bs-theme="dark"] .pds-remark-composer-optional {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-remark-composer-bar {
	background: var(--pds-surface-3) !important;
	border-top-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-modal .modal-footer,
html[data-bs-theme="dark"] .pds-app .pds-modal .modal-footer,
html[data-bs-theme="dark"] .pds-app .pds-movement-modal .modal-footer {
	background-color: var(--pds-surface-2) !important;
	border-top-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-form-flag {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-form-flag:has(input:checked) {
	background: var(--pds-surface-3) !important;
	border-color: #5b8def !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-app .pds-form-flag input[type="checkbox"] {
	background-color: var(--pds-surface) !important;
	border-color: #8eb4ff !important;
}

html[data-bs-theme="dark"] .pds-app .pds-form-flag input[type="checkbox"]:checked {
	background-color: #003399 !important;
	border-color: #5b8def !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") !important;
}

html[data-bs-theme="dark"] .pds-app .pds-movement-updated-chip {
	background: var(--pds-surface-3) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker,
html[data-bs-theme="dark"] .pds-app .xdsoft_datetimepicker,
html[data-bs-theme="dark"] body .xdsoft_datetimepicker {
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
	box-shadow: var(--pds-shadow) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar th,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_label {
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar th {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled {
	opacity: 0.45;
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div.xdsoft_current {
	background: #003399 !important;
	box-shadow: none !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
	color: var(--pds-orange) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_calendar td:hover,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box > div > div:hover {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_label i,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_prev,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_next,
html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_today_button {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .xdsoft_datetimepicker .xdsoft_scrollbar > .xdsoft_scroller {
	background: var(--pds-border-strong) !important;
}

html[data-bs-theme="dark"] .pds-modal-submit-btn {
	background-color: #003399 !important;
	border-color: #003399 !important;
	color: #ffffff !important;
}

/* Primary CTA buttons — never use light navy-ink fill with white text */
html[data-bs-theme="dark"] .pds-app .btn-link,
html[data-bs-theme="dark"] .pds-app .pds-movement-submit,
html[data-bs-theme="dark"] .pds-app .pds-movement-modal .modal-footer .btn-primary,
html[data-bs-theme="dark"] .pds-app .btn-primary:not(.btn-outline-primary) {
	background-color: #003399 !important;
	border-color: #003399 !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-app .btn-link:hover,
html[data-bs-theme="dark"] .pds-app .btn-link:focus,
html[data-bs-theme="dark"] .pds-app .pds-movement-submit:hover,
html[data-bs-theme="dark"] .pds-app .pds-movement-submit:focus,
html[data-bs-theme="dark"] .pds-app .pds-movement-modal .modal-footer .btn-primary:hover,
html[data-bs-theme="dark"] .pds-app .pds-movement-modal .modal-footer .btn-primary:focus {
	background-color: var(--pds-orange) !important;
	border-color: var(--pds-orange) !important;
	color: #ffffff !important;
}

/* Agent portal content card + Bootstrap bg-white leftovers */
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .pds-content-card,
html[data-bs-theme="dark"] .pds-content-card > .card-header,
html[data-bs-theme="dark"] .pds-content-card-header,
html[data-bs-theme="dark"] .pds-content-card > .card-body {
	background-color: var(--pds-surface) !important;
	color: var(--pds-text) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-page-kicker {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-content-card table.dataTable thead th,
html[data-bs-theme="dark"] #scheduleView .dataTables_wrapper table.dataTable thead th,
html[data-bs-theme="dark"] #chronologicalView .dataTables_wrapper table.dataTable thead th,
html[data-bs-theme="dark"] #agentRequestsTable thead th {
	background: var(--pds-surface-2) !important;
	color: #ffffff !important;
	border-bottom-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-content-card table.dataTable tbody td,
html[data-bs-theme="dark"] #scheduleView .dataTables_wrapper table.dataTable tbody td,
html[data-bs-theme="dark"] #chronologicalView .dataTables_wrapper table.dataTable tbody td,
html[data-bs-theme="dark"] #agentRequestsTable tbody td {
	color: var(--pds-text) !important;
	border-color: var(--pds-border) !important;
	background-color: transparent;
}

html[data-bs-theme="dark"] .pds-content-card table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-bs-theme="dark"] #scheduleView .dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-bs-theme="dark"] #chronologicalView .dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-bs-theme="dark"] #agentRequestsTable.table-striped > tbody > tr:nth-of-type(odd) > * {
	background-color: var(--pds-stripe) !important;
	--bs-table-bg-type: var(--pds-stripe) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-content-card table.dataTable.table-striped > tbody > tr:nth-of-type(even) > *,
html[data-bs-theme="dark"] #scheduleView .dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-of-type(even) > *,
html[data-bs-theme="dark"] #chronologicalView .dataTables_wrapper table.dataTable.table-striped > tbody > tr:nth-of-type(even) > *,
html[data-bs-theme="dark"] #agentRequestsTable.table-striped > tbody > tr:nth-of-type(even) > * {
	background-color: var(--pds-surface) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--portal,
html[data-bs-theme="dark"] .pds-hist-badge--harbour,
html[data-bs-theme="dark"] .pds-hist-badge--pds,
html[data-bs-theme="dark"] .pds-hist-badge--req,
html[data-bs-theme="dark"] .pds-hist-badge--type-bod,
html[data-bs-theme="dark"] .pds-hist-badge--type-boa,
html[data-bs-theme="dark"] .pds-hist-badge--type-shift,
html[data-bs-theme="dark"] .pds-hist-badge--type-other {
	color: #ffffff !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-hist-badge--portal {
	background: rgba(96, 165, 250, 0.22) !important;
}
html[data-bs-theme="dark"] .pds-hist-badge--harbour {
	background: rgba(255, 127, 0, 0.22) !important;
}
html[data-bs-theme="dark"] .pds-hist-badge--type-boa {
	background: rgba(61, 214, 140, 0.22) !important;
}
html[data-bs-theme="dark"] .pds-hist-badge--type-bod {
	background: rgba(248, 113, 113, 0.22) !important;
}
html[data-bs-theme="dark"] .pds-hist-badge--type-shift {
	background: rgba(96, 165, 250, 0.22) !important;
}
html[data-bs-theme="dark"] .pds-hist-badge--type-other,
html[data-bs-theme="dark"] .pds-hist-badge--pds,
html[data-bs-theme="dark"] .pds-hist-badge--req {
	background: var(--pds-surface-3) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--admin,
html[data-bs-theme="dark"] .pds-role-badge--editor,
html[data-bs-theme="dark"] .pds-role-badge--viewer,
html[data-bs-theme="dark"] .pds-role-badge--agent,
html[data-bs-theme="dark"] .pds-role-badge--shipper,
html[data-bs-theme="dark"] .pds-role-badge--default {
	color: #ffffff !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--admin {
	background: rgba(167, 139, 250, 0.22) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--editor {
	background: rgba(251, 146, 60, 0.22) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--viewer {
	background: rgba(61, 214, 140, 0.22) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--agent {
	background: rgba(34, 211, 238, 0.22) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--shipper {
	background: rgba(251, 191, 36, 0.22) !important;
}

html[data-bs-theme="dark"] .pds-role-badge--default {
	background: var(--pds-surface-3) !important;
}

html[data-bs-theme="dark"] .pds-status-chip--active {
	background: rgba(25, 135, 84, 0.22) !important;
	color: #4ade80 !important;
	border-color: rgba(74, 222, 128, 0.35) !important;
}

html[data-bs-theme="dark"] .pds-status-chip--revoked {
	background: rgba(148, 163, 184, 0.14) !important;
	color: #94a3b8 !important;
	border-color: rgba(148, 163, 184, 0.28) !important;
}

html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge--admin,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge--editor,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge--viewer,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge--agent,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge--shipper,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-role-badge--default,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-source-badge,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-login-type-badge,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive .pds-email-badge {
	background: rgba(148, 163, 184, 0.16) !important;
	color: #94a3b8 !important;
	border-color: rgba(148, 163, 184, 0.32) !important;
}

html[data-bs-theme="dark"] .pds-source-badge--internal {
	background: rgba(148, 163, 184, 0.16);
	color: #cbd5e1;
	border: 1px solid rgba(148, 163, 184, 0.35);
}

html[data-bs-theme="dark"] .pds-source-badge--external {
	background: rgba(34, 211, 238, 0.16);
	color: #67e8f9;
	border: 1px solid rgba(34, 211, 238, 0.35);
}

html[data-bs-theme="dark"] .pds-login-type-badge--individual {
	background: rgba(96, 165, 250, 0.18);
	color: #bfdbfe;
	border: 1px solid rgba(96, 165, 250, 0.35);
}

html[data-bs-theme="dark"] .pds-login-type-badge--shared {
	background: rgba(251, 146, 60, 0.2);
	color: #fdba74;
	border: 1px solid rgba(251, 146, 60, 0.4);
}

html[data-bs-theme="dark"] .pds-login-type-badge--shared-email {
	background: rgba(34, 211, 238, 0.16);
	color: #67e8f9;
	border: 1px solid rgba(34, 211, 238, 0.35);
}

html[data-bs-theme="dark"] .pds-email-badge--verified {
	background: rgba(61, 214, 140, 0.16);
	color: #86efac;
	border: 1px solid rgba(61, 214, 140, 0.35);
}

html[data-bs-theme="dark"] .pds-email-badge--unverified {
	background: rgba(251, 191, 36, 0.16);
	color: #fbbf24;
	border: 1px solid rgba(251, 191, 36, 0.35);
}

html[data-bs-theme="dark"] .pds-email-badge--empty {
	background: rgba(148, 163, 184, 0.12);
	color: #94a3b8;
	border: 1px solid rgba(148, 163, 184, 0.3);
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-admin {
	background: rgba(167, 139, 250, 0.18);
	color: #ddd6fe;
	border-color: rgba(167, 139, 250, 0.35);
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-admin.is-active {
	background: #5b21b6;
	border-color: #5b21b6;
	color: #fff;
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-editor {
	background: rgba(251, 146, 60, 0.18);
	color: #fdba74;
	border-color: rgba(251, 146, 60, 0.35);
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-editor.is-active {
	background: #c2410c;
	border-color: #c2410c;
	color: #fff;
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-viewer {
	background: rgba(61, 214, 140, 0.18);
	color: #86efac;
	border-color: rgba(61, 214, 140, 0.35);
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-viewer.is-active {
	background: #146c43;
	border-color: #146c43;
	color: #fff;
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-agent {
	background: rgba(34, 211, 238, 0.18);
	color: #a5f3fc;
	border-color: rgba(34, 211, 238, 0.35);
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-agent.is-active {
	background: #0e7490;
	border-color: #0e7490;
	color: #fff;
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-shipper {
	background: rgba(251, 191, 36, 0.18);
	color: #fcd34d;
	border-color: rgba(251, 191, 36, 0.35);
}

html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip--role-shipper.is-active {
	background: #92400e;
	border-color: #92400e;
	color: #fff;
}

/* Manage modals + announcements — dark hover (Bootstrap accent overlay stays readable) */
html[data-bs-theme="dark"] .pds-manage-table.table-hover > tbody > tr:hover > *,
html[data-bs-theme="dark"] .pds-manage-table.table-hover > tbody > tr:hover > td,
html[data-bs-theme="dark"] .pds-announcements-modal .table-hover > tbody > tr:hover > *,
html[data-bs-theme="dark"] .pds-manage-dialog .table-hover > tbody > tr:hover > *,
html[data-bs-theme="dark"] .modal .pds-manage-table.table-hover > tbody > tr:hover > * {
	background-color: var(--pds-stripe-hover) !important;
	--bs-table-hover-bg: var(--pds-stripe-hover) !important;
	--bs-table-accent-bg: var(--pds-stripe-hover) !important;
	--bs-table-hover-color: #ffffff !important;
	color: #ffffff !important;
	box-shadow: inset 0 0 0 9999px var(--pds-stripe-hover) !important;
}

html[data-bs-theme="dark"] .pds-manage-table tbody td,
html[data-bs-theme="dark"] .pds-announcements-modal .pds-manage-table tbody td {
	background: var(--pds-surface) !important;
	color: var(--pds-text) !important;
	border-bottom-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-manage-table.table-striped > tbody > tr:nth-of-type(odd) > *,
html[data-bs-theme="dark"] .pds-announcements-modal .pds-manage-table.table-striped > tbody > tr:nth-of-type(odd) > * {
	background: var(--pds-stripe) !important;
	--bs-table-bg-type: var(--pds-stripe) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-users-table tbody td.actions-cell {
	background: var(--pds-surface) !important;
}

html[data-bs-theme="dark"] .pds-users-table.table-striped > tbody > tr:nth-of-type(odd) > td.actions-cell {
	background: var(--pds-stripe) !important;
}

html[data-bs-theme="dark"] .pds-users-table.table-hover > tbody > tr:hover > td.actions-cell {
	background: var(--pds-stripe-hover) !important;
}

html[data-bs-theme="dark"] .pds-manage-table tbody tr.pds-row-inactive > *,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive > *,
html[data-bs-theme="dark"] .pds-manage-table.table-striped > tbody > tr.pds-row-inactive > *,
html[data-bs-theme="dark"] .pds-users-table.table-striped > tbody > tr.pds-row-inactive > *,
html[data-bs-theme="dark"] .pds-manage-table.table-striped > tbody > tr.pds-row-inactive:nth-of-type(odd) > *,
html[data-bs-theme="dark"] .pds-users-table.table-striped > tbody > tr.pds-row-inactive:nth-of-type(odd) > *,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive > td.actions-cell,
html[data-bs-theme="dark"] .pds-users-table.table-striped > tbody > tr.pds-row-inactive > td.actions-cell,
html[data-bs-theme="dark"] .pds-users-table.table-striped > tbody > tr.pds-row-inactive:nth-of-type(odd) > td.actions-cell {
	background: rgba(148, 163, 184, 0.16) !important;
	background-color: rgba(148, 163, 184, 0.16) !important;
	--bs-table-bg-type: rgba(148, 163, 184, 0.16) !important;
	--bs-table-accent-bg: rgba(148, 163, 184, 0.16) !important;
	--bs-table-striped-bg: rgba(148, 163, 184, 0.16) !important;
	--bs-table-hover-bg: rgba(148, 163, 184, 0.16) !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-manage-table tbody tr.pds-row-inactive > td:first-child,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive > td:first-child {
	box-shadow: inset 3px 0 0 #8b98ae !important;
}

html[data-bs-theme="dark"] .pds-manage-table.table-hover > tbody > tr.pds-row-inactive:hover > *,
html[data-bs-theme="dark"] .pds-users-table.table-hover > tbody > tr.pds-row-inactive:hover > *,
html[data-bs-theme="dark"] .pds-users-table.table-hover > tbody > tr.pds-row-inactive:hover > td.actions-cell {
	background: rgba(148, 163, 184, 0.24) !important;
	background-color: rgba(148, 163, 184, 0.24) !important;
	--bs-table-hover-bg: rgba(148, 163, 184, 0.24) !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-manage-table.table-hover > tbody > tr.pds-row-inactive:hover > td:first-child,
html[data-bs-theme="dark"] .pds-users-table.table-hover > tbody > tr.pds-row-inactive:hover > td:first-child {
	box-shadow: inset 3px 0 0 #8b98ae !important;
}

html[data-bs-theme="dark"] .pds-manage-table tbody tr.pds-row-inactive > td:not(.text-nowrap):not(.pds-active-cell):not(.actions-cell):not(.active-cell):not(.security-cell):not(.pds-user-select-cell),
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive > td:not(.text-nowrap):not(.pds-active-cell):not(.actions-cell):not(.active-cell):not(.security-cell):not(.pds-user-select-cell) {
	color: #b7c3d6 !important;
}

html[data-bs-theme="dark"] .pds-manage-table:not(.pds-users-table) tbody tr.pds-row-inactive > td:first-child::after,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-inactive > td.pds-user-name-cell::after {
	color: #e8eef6;
	background: rgba(148, 163, 184, 0.22);
	border-color: rgba(203, 213, 225, 0.28);
}

html[data-bs-theme="dark"] .pds-manage-table tbody tr.pds-row-selected > *,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-selected > * {
	background-color: rgba(59, 130, 246, 0.22) !important;
	box-shadow: inset 4px 0 0 #93c5fd;
}

html[data-bs-theme="dark"] .pds-manage-table tbody tr.pds-row-selected.pds-row-inactive > *,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-selected.pds-row-inactive > * {
	background-color: rgba(148, 163, 184, 0.2) !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-manage-table tbody tr.pds-row-selected.pds-row-inactive > td:first-child,
html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-selected.pds-row-inactive > td:first-child {
	box-shadow: inset 3px 0 0 #93c5fd !important;
}

html[data-bs-theme="dark"] .pds-users-table tbody tr.pds-row-selected > td.actions-cell {
	background: rgba(59, 130, 246, 0.22) !important;
}

html[data-bs-theme="dark"] .pds-users-table tr.pds-row-editing > td.actions-cell {
	background: #3a3218 !important;
}

html[data-bs-theme="dark"] .pds-manage-list-title,
html[data-bs-theme="dark"] .pds-manage-new-title {
	color: var(--pds-text) !important;
}

/* Manage Users (and similar) accordion headers — collapsed must not stay pale */
html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-item,
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-item {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button,
html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button.collapsed,
html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button:not(.collapsed),
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button,
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button.collapsed,
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button:not(.collapsed) {
	background: var(--pds-surface-2) !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button:not(.collapsed),
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button:not(.collapsed) {
	background: var(--pds-surface-3) !important;
	box-shadow: inset 0 -1px 0 var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button h4,
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button h4,
html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button .pds-manage-new-title,
html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button .pds-manage-list-title {
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button:hover,
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button:hover {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-button::after,
html[data-bs-theme="dark"] .pds-app .pds-manage-list-accordion .accordion-button::after {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e8eef8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
	filter: none !important;
}

html[data-bs-theme="dark"] .pds-app .pds-manage-new-accordion .accordion-body {
	background: var(--pds-surface) !important;
	color: var(--pds-text) !important;
}

/* Audit trail tabs — inactive stays dark (not pale grey) */
html[data-bs-theme="dark"] .pds-app .pds-audit-tabs {
	border-bottom-color: var(--pds-orange) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-audit-tab {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-muted) !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-app .pds-audit-tab:hover,
html[data-bs-theme="dark"] .pds-app .pds-audit-tab:focus {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
	border-color: var(--pds-border-strong) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-audit-tab.is-active,
html[data-bs-theme="dark"] .pds-app .pds-audit-tab[aria-current="page"] {
	background: var(--pds-surface) !important;
	border-color: var(--pds-orange) !important;
	color: #ffffff !important;
	box-shadow: inset 0 -2px 0 var(--pds-orange) !important;
}

html[data-bs-theme="dark"] .pds-app .pds-audit-tab.is-active:hover,
html[data-bs-theme="dark"] .pds-app .pds-audit-tab[aria-current="page"]:hover {
	background: var(--pds-surface) !important;
	color: #ffffff !important;
}

/* Filter chips on Audit / schedules — inactive not white in dark mode */
html[data-bs-theme="dark"] .pds-filter-chip,
html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip,
html[data-bs-theme="dark"] .pds-filter-bar--status .pds-filter-chip {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-filter-chip:hover,
html[data-bs-theme="dark"] .pds-filter-chip:focus,
html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip:hover,
html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip:focus,
html[data-bs-theme="dark"] .pds-filter-bar--status .pds-filter-chip:hover,
html[data-bs-theme="dark"] .pds-filter-bar--status .pds-filter-chip:focus {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-filter-chip.is-active,
html[data-bs-theme="dark"] .pds-filter-bar--type .pds-filter-chip.is-active {
	background: var(--pds-navy-deep) !important;
	border-color: var(--pds-navy-deep) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-filter-bar--status .pds-filter-chip.is-active {
	background: #0f766e !important;
	border-color: #0f766e !important;
	color: #ffffff !important;
}

/* Help & Support modal — force readable ink across guide / ticket / list */
html[data-bs-theme="dark"] .pds-help-book {
	--pds-help-page: var(--pds-surface) !important;
	--pds-help-page-edge: var(--pds-border) !important;
	--pds-help-ink: #f5f7fb !important;
	--pds-help-accent: #c7dbff !important;
	--pds-help-accent-soft: var(--pds-surface-3) !important;
	--pds-help-muted: #d0d8e8 !important;
}

html[data-bs-theme="dark"] .pds-modal-subtitle,
html[data-bs-theme="dark"] .pds-help-list,
html[data-bs-theme="dark"] .pds-help-section,
html[data-bs-theme="dark"] .pds-help-book-page,
html[data-bs-theme="dark"] .pds-help-contact,
html[data-bs-theme="dark"] .pds-ticket-hint,
html[data-bs-theme="dark"] .pds-help-role-intro,
html[data-bs-theme="dark"] .pds-help-role-intro p,
html[data-bs-theme="dark"] .pds-help-acc-body {
	color: var(--pds-help-ink, #f5f7fb) !important;
}

html[data-bs-theme="dark"] .pds-help-contact a {
	color: #9db7ff !important;
}

html[data-bs-theme="dark"] .pds-help-contact a:hover {
	color: #ff7f00 !important;
}

html[data-bs-theme="dark"] .pds-help-role-intro {
	background: var(--pds-surface-3) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-help-role-chip {
	background: var(--pds-navy-deep, #002266) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-help-accordion .accordion-item,
html[data-bs-theme="dark"] .pds-help-section.accordion-item {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-help-acc-btn,
html[data-bs-theme="dark"] .pds-help-acc-btn.collapsed,
html[data-bs-theme="dark"] .pds-help-acc-btn:not(.collapsed),
html[data-bs-theme="dark"] .pds-help-acc-btn:hover,
html[data-bs-theme="dark"] .pds-help-acc-btn:focus {
	background: var(--pds-surface-2) !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-help-acc-btn:not(.collapsed) {
	background: var(--pds-surface-3) !important;
	box-shadow: inset 0 -1px 0 var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-help-acc-btn::after {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e8eef8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
	filter: none !important;
}

html[data-bs-theme="dark"] .pds-help-acc-body {
	background: var(--pds-surface) !important;
}

html[data-bs-theme="dark"] .pds-modal-subtitle,
html[data-bs-theme="dark"] .pds-ticket-hint,
html[data-bs-theme="dark"] .pds-help-book-tabs .nav-link:not(.active) {
	color: var(--pds-help-muted, #d0d8e8) !important;
}

html[data-bs-theme="dark"] .pds-help-book-tabs {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-help-book-tabs .nav-link:hover,
html[data-bs-theme="dark"] .pds-help-book-tabs .nav-link:focus {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-help-book-tabs .nav-link.active {
	background: var(--pds-navy-deep) !important;
	border-color: var(--pds-navy-deep) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-help-section h3,
html[data-bs-theme="dark"] .pds-help-section h4,
html[data-bs-theme="dark"] .pds-help-section h6,
html[data-bs-theme="dark"] .pds-help-section .pds-modal-section-title,
html[data-bs-theme="dark"] .pds-help-section strong,
html[data-bs-theme="dark"] .pds-help-section .fw-semibold,
html[data-bs-theme="dark"] .pds-help-section i {
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-help-keys th,
html[data-bs-theme="dark"] .pds-help-keys td {
	border-bottom-color: var(--pds-border) !important;
	color: var(--pds-help-ink, #f5f7fb) !important;
}

html[data-bs-theme="dark"] .pds-kbd {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: #dbeafe !important;
}

html[data-bs-theme="dark"] .pds-ticket-subject,
html[data-bs-theme="dark"] .pds-ticket-number,
html[data-bs-theme="dark"] .pds-ticket-meta,
html[data-bs-theme="dark"] .pds-ticket-meta-item,
html[data-bs-theme="dark"] .pds-ticket-full-msg,
html[data-bs-theme="dark"] .pds-ticket-preview,
html[data-bs-theme="dark"] .pds-ticket-card {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-subject {
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-ticket-number,
html[data-bs-theme="dark"] .pds-ticket-meta {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-ticket-card,
html[data-bs-theme="dark"] .pds-ticket-card-detail,
html[data-bs-theme="dark"] .pds-ticket-manage,
html[data-bs-theme="dark"] .pds-ticket-scopes,
html[data-bs-theme="dark"] .pds-ticket-subscopes {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-admin-filters .form-control,
html[data-bs-theme="dark"] .pds-ticket-admin-filters .form-select {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-card-toggle:hover {
	background: var(--pds-surface-3) !important;
}

html[data-bs-theme="dark"] .pds-ticket-scope,
html[data-bs-theme="dark"] .pds-ticket-subscope {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-scope:hover,
html[data-bs-theme="dark"] .pds-ticket-subscope:hover {
	background: var(--pds-surface-3) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-ticket-scope.active,
html[data-bs-theme="dark"] .pds-ticket-subscope.active {
	background: var(--pds-navy-deep) !important;
	border-color: var(--pds-navy-deep) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-ticket-manage-row label,
html[data-bs-theme="dark"] .pds-ticket-card-detail .form-check-label,
html[data-bs-theme="dark"] .pds-ticket-card-detail label {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-quill .ql-toolbar.ql-snow,
html[data-bs-theme="dark"] .pds-ticket-quill .ql-container.ql-snow {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-ticket-quill .ql-editor,
html[data-bs-theme="dark"] .pds-ticket-quill .ql-picker,
html[data-bs-theme="dark"] .pds-ticket-quill .ql-picker-label {
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-ticket-quill .ql-stroke {
	stroke: #e8eef8 !important;
}

html[data-bs-theme="dark"] .pds-ticket-quill .ql-fill {
	fill: #e8eef8 !important;
}

html[data-bs-theme="dark"] .pds-ticket-quill .ql-editor.ql-blank::before {
	color: #b8c4d9 !important;
}

html[data-bs-theme="dark"] .pds-ticket-dropzone {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border-strong) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-drop-icon {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-ticket-refresh,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-ticket-refresh {
	background: #003399 !important;
	border-color: #003399 !important;
	color: #fff !important;
}

html[data-bs-theme="dark"] .pds-ticket-refresh:hover,
html[data-bs-theme="dark"] .pds-ticket-refresh:focus,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-ticket-refresh:hover,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-ticket-refresh:focus {
	background: #2556d6 !important;
	border-color: #4d7cff !important;
	color: #fff !important;
	box-shadow: 0 0 0 1px rgba(77, 124, 255, 0.4), 0 4px 14px rgba(0, 51, 153, 0.5) !important;
}

html[data-bs-theme="dark"] .pds-ticket-github-pull,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-ticket-github-pull {
	background: transparent !important;
	border-color: #e6edf3 !important;
	color: #e6edf3 !important;
}

html[data-bs-theme="dark"] .pds-ticket-github-pull:hover,
html[data-bs-theme="dark"] .pds-ticket-github-pull:focus,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-ticket-github-pull:hover,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-ticket-github-pull:focus {
	background: #f0f3f6 !important;
	border-color: #f0f3f6 !important;
	color: #1f2328 !important;
	box-shadow: 0 0 0 1px rgba(240, 243, 246, 0.45), 0 4px 14px rgba(230, 237, 243, 0.32) !important;
}

html[data-bs-theme="dark"] .pds-help-close {
	background: var(--pds-surface-2) !important;
	border-color: rgba(210, 215, 223, 0.45) !important;
	color: #c8d0da !important;
}

html[data-bs-theme="dark"] .pds-help-close:hover,
html[data-bs-theme="dark"] .pds-help-close:focus {
	background: #6c757d !important;
	border-color: #6c757d !important;
	color: #fff !important;
}

html[data-bs-theme="dark"] .pds-help-submit,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-help-submit {
	background: #003399 !important;
	border-color: #003399 !important;
	color: #fff !important;
}

html[data-bs-theme="dark"] .pds-help-submit:hover,
html[data-bs-theme="dark"] .pds-help-submit:focus,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-help-submit:hover,
html[data-bs-theme="dark"] .pds-help-footer-actions .btn.pds-help-submit:focus {
	background: #2556d6 !important;
	border-color: #4d7cff !important;
	color: #fff !important;
	box-shadow: 0 0 0 1px rgba(77, 124, 255, 0.4), 0 4px 14px rgba(0, 51, 153, 0.5) !important;
}

html[data-bs-theme="dark"] .pds-help-section h3 .fas,
html[data-bs-theme="dark"] .pds-help-section h4 .fas,
html[data-bs-theme="dark"] .pds-help-section .fas {
	color: var(--pds-orange) !important;
}

html[data-bs-theme="dark"] .pds-ticket-comment {
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-ticket-comment.is-latest {
	border-color: rgba(125, 160, 230, 0.35) !important;
	box-shadow: inset 3px 0 0 var(--pds-navy-ink, #7da0e6) !important;
}

html[data-bs-theme="dark"] .pds-remark-thread-title {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-field-help,
html[data-bs-theme="dark"] .pds-remark-help,
html[data-bs-theme="dark"] .pds-modal-help {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-field-help:hover,
html[data-bs-theme="dark"] .pds-field-help:focus,
html[data-bs-theme="dark"] .pds-remark-help:hover,
html[data-bs-theme="dark"] .pds-remark-help:focus,
html[data-bs-theme="dark"] .pds-modal-help:hover,
html[data-bs-theme="dark"] .pds-modal-help:focus {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-remark-empty,
html[data-bs-theme="dark"] .pds-remark-when {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-remark-author {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-remark-thread-count,
html[data-bs-theme="dark"] .pds-remark-latest-badge,
html[data-bs-theme="dark"] .pds-remark-instant {
	color: var(--pds-navy-ink) !important;
	background: rgba(125, 160, 230, 0.12) !important;
	border-color: rgba(125, 160, 230, 0.28) !important;
}

html[data-bs-theme="dark"] .pds-remark-toggle {
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-remark-compose-box {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-remark-compose-box:focus-within {
	background: var(--pds-surface) !important;
	border-color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-remark-compose-input {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-remark-compose-bar {
	background: var(--pds-surface-3) !important;
	border-top-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-ticket-comment-body {
	color: var(--pds-text) !important;
	background: transparent !important;
}

html[data-bs-theme="dark"] .pds-ticket-comment-form .form-control {
	color: var(--pds-text) !important;
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-help-book-page .pds-modal-section-title,
html[data-bs-theme="dark"] .pds-help-book-page .pds-modal-alert {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-ticket-comment.is-internal {
	background: rgba(185, 28, 28, 0.18) !important;
	border-color: rgba(248, 113, 113, 0.35) !important;
}

html[data-bs-theme="dark"] .pds-ticket-comment.is-staff {
	background: rgba(180, 83, 9, 0.18) !important;
	border-color: rgba(251, 191, 36, 0.35) !important;
}

html[data-bs-theme="dark"] .pds-ticket-internal-badge {
	color: #fecaca !important;
}

html[data-bs-theme="dark"] .pds-ticket-vis-badge--staff,
html[data-bs-theme="dark"] .pds-ticket-comment.is-staff .pds-ticket-internal-badge {
	color: #fde68a !important;
	background: rgba(180, 83, 9, 0.35) !important;
}

html[data-bs-theme="dark"] .pds-ticket-chip--vis-staff {
	background: rgba(180, 83, 9, 0.28);
	color: #fde68a;
}

html[data-bs-theme="dark"] .pds-ticket-chip--vis-admin {
	background: rgba(185, 28, 28, 0.28);
	color: #fecaca;
}

html[data-bs-theme="dark"] .pds-ticket-thread-title {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-ticket-thread-count {
	color: var(--pds-navy-ink) !important;
	background: rgba(125, 160, 230, 0.16) !important;
	border-color: rgba(125, 160, 230, 0.28) !important;
}

html[data-bs-theme="dark"] .pds-ticket-latest-badge {
	color: #fdba74 !important;
	background: rgba(194, 65, 12, 0.22) !important;
	border-color: rgba(253, 186, 116, 0.28) !important;
}

html[data-bs-theme="dark"] .pds-ticket-comments-toggle {
	color: var(--pds-navy-ink) !important;
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-ticket-chevron-wrap {
	background: var(--pds-surface-3) !important;
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-ticket-card.is-expanded .pds-ticket-chevron-wrap {
	background: var(--pds-help-accent-soft) !important;
	color: var(--pds-navy-ink) !important;
}

/* Keep chip ink readable on pastel fills sitting on dark cards */
html[data-bs-theme="dark"] .pds-ticket-chip--priority-low,
html[data-bs-theme="dark"] .pds-ticket-chip--status-closed {
	background: #334155 !important;
	color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .pds-ticket-chip--priority-medium {
	background: #1e3a8a !important;
	color: #dbeafe !important;
}

html[data-bs-theme="dark"] .pds-ticket-chip--priority-high,
html[data-bs-theme="dark"] .pds-ticket-chip--status-pending {
	background: #7c2d12 !important;
	color: #ffedd5 !important;
}

html[data-bs-theme="dark"] .pds-ticket-chip--priority-critical {
	background: #7f1d1d !important;
	color: #fecaca !important;
}

html[data-bs-theme="dark"] .pds-ticket-chip--status-in_progress {
	background: #1e40af !important;
	color: #dbeafe !important;
}

html[data-bs-theme="dark"] .pds-ticket-chip--status-resolved {
	background: #14532d !important;
	color: #bbf7d0 !important;
}

/* Theme cycle control in sticky nav */
.pds-theme-toggle {
	border: none;
	background: none;
	color: var(--pds-navy-ink, var(--pds-navy, #003399));
	font-weight: 600;
	padding: 0.5rem 0.75rem;
	line-height: 1.2;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	border-radius: 0.375rem;
}

.pds-theme-toggle:hover,
.pds-theme-toggle:focus {
	color: var(--pds-orange, #ff7f00);
	background: var(--pds-surface-hover, #f3f6ff);
}

.pds-theme-toggle:focus-visible {
	outline: 2px solid var(--pds-orange, #ff7f00);
	outline-offset: 2px;
}

.pds-theme-toggle .pds-theme-toggle-icon {
	font-size: 1rem;
	width: 1.1em;
	text-align: center;
}


/* Appearance / table-length choice radios in Account Settings */
.pds-theme-picker {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
}

.pds-theme-picker.pds-page-length-picker {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pds-theme-picker-option {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	width: 100%;
	padding: 0.55rem 0.5rem;
	border: 1px solid var(--pds-border);
	border-radius: 0.5rem;
	background: var(--pds-surface);
	color: var(--pds-text);
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	margin: 0;
	text-align: center;
}

.pds-theme-picker-option input {
	margin: 0;
}

.pds-theme-picker-option.is-selected,
.pds-theme-picker-option:has(input:checked) {
	border-color: var(--pds-orange);
	box-shadow: 0 0 0 1px var(--pds-orange);
	background: var(--pds-surface-2);
}

/* Dark-mode soft chips / announcements that stay readable on dark surfaces */
html[data-bs-theme="dark"] .pds-ticket-chip--priority-low,
html[data-bs-theme="dark"] .pds-ticket-chip--status-closed {
	background: #243252;
	color: #cbd5e1;
}
html[data-bs-theme="dark"] .pds-ticket-chip--priority-medium {
	background: rgba(142, 180, 255, 0.2);
	color: #bfdbfe;
}
html[data-bs-theme="dark"] .pds-ticket-chip--priority-high,
html[data-bs-theme="dark"] .pds-ticket-chip--status-pending {
	background: rgba(255, 127, 0, 0.18);
	color: #fdba74;
}
html[data-bs-theme="dark"] .pds-ticket-chip--priority-critical {
	background: rgba(248, 113, 113, 0.2);
	color: #fca5a5;
}
html[data-bs-theme="dark"] .pds-ticket-chip--status-in_progress {
	background: rgba(96, 165, 250, 0.2);
	color: #93c5fd;
}
html[data-bs-theme="dark"] .pds-ticket-chip--status-resolved {
	background: rgba(61, 214, 140, 0.18);
	color: #86efac;
}

html[data-bs-theme="dark"] .pds-ann-type-warning {
	background: rgba(255, 127, 0, 0.12);
}
html[data-bs-theme="dark"] .pds-ann-type-alert {
	background: rgba(248, 113, 113, 0.12);
}
html[data-bs-theme="dark"] .pds-ann-pill.pds-ann-priority-medium {
	background: rgba(251, 191, 36, 0.15);
	color: #fbbf24;
}
html[data-bs-theme="dark"] .pds-ann-pill.pds-ann-priority-high {
	background: rgba(255, 127, 0, 0.18);
	color: #fb923c;
}

/* Bootstrap table / card leftovers that often stay white */
html[data-bs-theme="dark"] .table,
html[data-bs-theme="dark"] .table > :not(caption) > * > * {
	--bs-table-bg: var(--pds-surface);
	--bs-table-color: var(--pds-text);
	--bs-table-striped-bg: var(--pds-stripe);
	--bs-table-hover-bg: var(--pds-stripe-hover);
	color: var(--pds-text);
}
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .card {
	background-color: var(--pds-surface);
	color: var(--pds-text);
	border-color: var(--pds-border);
}
html[data-bs-theme="dark"] .pds-users-bulk-menu {
	background-color: var(--pds-surface);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
html[data-bs-theme="dark"] .pds-users-bulk-item {
	color: var(--pds-text);
}
html[data-bs-theme="dark"] .pds-users-bulk-item:hover,
html[data-bs-theme="dark"] .pds-users-bulk-item:focus {
	background: var(--pds-surface-hover, rgba(59, 130, 246, 0.16));
	color: var(--pds-text);
}
html[data-bs-theme="dark"] .pds-users-bulk-ico {
	background: rgba(148, 163, 184, 0.16);
	color: #dbe7ff;
}
html[data-bs-theme="dark"] .pds-users-bulk-item:hover .pds-users-bulk-ico,
html[data-bs-theme="dark"] .pds-users-bulk-item:focus .pds-users-bulk-ico {
	background: rgba(59, 130, 246, 0.22);
}
html[data-bs-theme="dark"] .pds-users-bulk-ico--ok {
	background: rgba(34, 197, 94, 0.18);
	color: #86efac;
}
html[data-bs-theme="dark"] .pds-users-bulk-ico--warn,
html[data-bs-theme="dark"] .pds-users-bulk-item--warn .pds-users-bulk-ico {
	background: rgba(251, 146, 60, 0.18);
	color: #fdba74;
}
html[data-bs-theme="dark"] .pds-users-bulk-item--warn {
	color: #fdba74;
}
html[data-bs-theme="dark"] .pds-users-bulk-item--warn:hover,
html[data-bs-theme="dark"] .pds-users-bulk-item--warn:focus {
	background: rgba(251, 146, 60, 0.14);
	color: #fed7aa;
}
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
	background-color: var(--pds-surface-2);
	color: var(--pds-text);
	border-color: var(--pds-border);
}
html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
	background-color: var(--pds-surface-2);
	color: var(--pds-text);
}
html[data-bs-theme="dark"] .text-muted {
	color: var(--pds-muted) !important;
}

/* Admin Manage Account (Users) — cards, stats, tabs, audit table */
html[data-bs-theme="dark"] .pds-admin-user-tabs .nav-link {
	background: var(--pds-surface-3) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-admin-user-tabs .nav-link:hover {
	background: var(--pds-surface-hover) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-admin-user-tabs .nav-link.active {
	background: var(--pds-navy, #003399) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-admin-card,
html[data-bs-theme="dark"] .pds-admin-stat {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-admin-card .fw-semibold,
html[data-bs-theme="dark"] .pds-admin-card strong,
html[data-bs-theme="dark"] .pds-admin-stat .num,
html[data-bs-theme="dark"] #admOverviewProfile strong,
html[data-bs-theme="dark"] #admOverviewProfile div {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-admin-meta,
html[data-bs-theme="dark"] .pds-admin-stat .small,
html[data-bs-theme="dark"] #adminUserManageModal .text-muted {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .pds-admin-audit-table,
html[data-bs-theme="dark"] #adminUserManageModal .pds-admin-audit-table > :not(caption) > * > * {
	color: var(--pds-text) !important;
	background-color: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .pds-admin-audit-table thead th {
	color: #ffffff !important;
	background-color: var(--pds-surface-2) !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .pds-admin-audit-table.table-striped > tbody > tr:nth-of-type(odd) > * {
	background-color: var(--pds-stripe) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .badge.bg-info {
	color: #0b1220 !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .btn-outline-primary {
	color: var(--pds-navy-ink) !important;
	border-color: var(--pds-border-strong) !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .btn-outline-danger {
	color: #fca5a5 !important;
	border-color: #f87171 !important;
}

html[data-bs-theme="dark"] #adminUserManageModal .btn-outline-secondary {
	color: var(--pds-muted) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-account-role-chip {
	background: rgba(142, 180, 255, 0.14) !important;
	color: #bfdbfe !important;
}
html[data-bs-theme="dark"] .pds-account-lead,
html[data-bs-theme="dark"] .pds-account-empty,
html[data-bs-theme="dark"] .pds-mfa-setup-card {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-muted) !important;
}
html[data-bs-theme="dark"] .pds-password-hint {
	background: var(--pds-warning-bg) !important;
	border-color: var(--pds-warning-border) !important;
	color: #fdba74 !important;
	box-shadow: inset 3px 0 0 #FE8700;
}
html[data-bs-theme="dark"] .pds-password-hint i {
	color: #FE8700 !important;
}
html[data-bs-theme="dark"] .pds-session-card-icon {
	background: rgba(142, 180, 255, 0.14) !important;
	color: #bfdbfe !important;
}
html[data-bs-theme="dark"] .pds-account-chip--ok {
	background: rgba(61, 214, 140, 0.16) !important;
	color: #86efac !important;
}
html[data-bs-theme="dark"] .pds-account-chip--warn {
	background: rgba(254, 135, 0, 0.18) !important;
	color: #fdba74 !important;
}
html[data-bs-theme="dark"] .pds-account-chip--off {
	background: rgba(148, 163, 184, 0.16) !important;
	color: #cbd5e1 !important;
}
html[data-bs-theme="dark"] .pds-account-modal .modal-footer {
	background: var(--pds-surface-2) !important;
}
html[data-bs-theme="dark"] .pds-mfa-qr-wrap {
	background: #fff !important;
}

/* Account / App Settings — panels stay light in light mode; dark surfaces + ink in dark */
html[data-bs-theme="dark"] .pds-account-tabs .nav-link,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-account-tabs .nav-link {
	background: transparent !important;
	border-color: transparent !important;
	color: var(--pds-muted) !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-account-tabs .nav-link:hover,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-account-tabs .nav-link:hover,
html[data-bs-theme="dark"] .pds-account-tabs .nav-link:focus,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-account-tabs .nav-link:focus {
	background: transparent !important;
	color: #ffffff !important;
	border-bottom-color: rgba(254, 135, 0, 0.55) !important;
}

html[data-bs-theme="dark"] .pds-account-tabs .nav-link.active,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-account-tabs .nav-link.active {
	background: transparent !important;
	border-color: transparent !important;
	border-bottom-color: #FE8700 !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

html[data-bs-theme="dark"] .pds-app-settings-modal .pds-account-tabs {
	background: var(--pds-surface) !important;
	border-bottom-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section .pds-mfa-box {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section-toggle {
	color: var(--pds-text) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section-summary {
	color: var(--pds-muted) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section-summary.is-on {
	color: #4ade80 !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section-summary.is-off {
	color: var(--pds-muted) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-settings-section-summary.is-warn {
	color: #fbbf24 !important;
}

html[data-bs-theme="dark"] .pds-app-settings-modal .modal-footer {
	background: var(--pds-surface-2) !important;
	border-top-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-mfa-box,
html[data-bs-theme="dark"] .pds-session-card,
html[data-bs-theme="dark"] .pds-pref-row,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-mfa-box,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-pref-row {
	background: var(--pds-surface-2) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-mfa-box .fw-semibold,
html[data-bs-theme="dark"] .pds-mfa-box .text-muted,
html[data-bs-theme="dark"] .pds-pref-row .fw-semibold,
html[data-bs-theme="dark"] .pds-pref-row .text-muted,
html[data-bs-theme="dark"] .pds-pref-row .form-label,
html[data-bs-theme="dark"] .pds-pref-row .form-text,
html[data-bs-theme="dark"] .pds-session-card,
html[data-bs-theme="dark"] .pds-session-card strong,
html[data-bs-theme="dark"] .pds-session-card .text-muted,
html[data-bs-theme="dark"] .pds-session-card .small {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-mfa-box .text-muted,
html[data-bs-theme="dark"] .pds-pref-row .text-muted,
html[data-bs-theme="dark"] .pds-session-card .text-muted,
html[data-bs-theme="dark"] .pds-pref-row .form-text {
	color: var(--pds-muted) !important;
}

html[data-bs-theme="dark"] .pds-pref-subtitle {
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-account-modal .form-label,
html[data-bs-theme="dark"] .pds-app-settings-modal .form-label {
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-session-card .text-success,
html[data-bs-theme="dark"] .pds-account-modal .text-success {
	color: #4ade80 !important;
}

html[data-bs-theme="dark"] .pds-account-modal .text-warning {
	color: #fbbf24 !important;
}

html[data-bs-theme="dark"] .pds-account-modal .btn-outline-danger,
html[data-bs-theme="dark"] .pds-app-settings-modal .btn-outline-danger {
	color: #fca5a5 !important;
	border-color: #f87171 !important;
}

html[data-bs-theme="dark"] .pds-account-modal .btn-outline-danger:hover,
html[data-bs-theme="dark"] .pds-app-settings-modal .btn-outline-danger:hover {
	background: rgba(248, 113, 113, 0.18) !important;
	color: #fecaca !important;
	border-color: #fca5a5 !important;
}

/* App Settings — API access tab, secret banner, inline code */
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner {
	background: rgba(251, 191, 36, 0.18) !important;
	border-color: var(--pds-warning-border) !important;
	color: var(--pds-text) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner .text-warning-emphasis {
	color: #fcd34d !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner .text-muted {
	color: #e2e8f0 !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-value {
	background: #0f1729 !important;
	border-color: var(--pds-border) !important;
	color: #f5f7fb !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner .btn-outline-primary {
	color: #93c5fd !important;
	border-color: #60a5fa !important;
	background: rgba(59, 130, 246, 0.12) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner .btn-outline-primary:hover {
	background: rgba(59, 130, 246, 0.22) !important;
	color: #bfdbfe !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner .btn-outline-secondary {
	color: var(--pds-text) !important;
	border-color: var(--pds-border-strong) !important;
	background: rgba(255, 255, 255, 0.06) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-secret-banner .btn-outline-secondary:hover {
	background: rgba(255, 255, 255, 0.12) !important;
	color: #ffffff !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal code {
	color: #a5d8ff !important;
	background: rgba(142, 180, 255, 0.12) !important;
	border-radius: 4px;
	padding: 0.1em 0.35em;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-api-keys-table thead th {
	color: var(--pds-muted) !important;
	border-color: var(--pds-border) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .text-success,
html[data-bs-theme="dark"] .pds-app-settings-modal .pds-form-msg.text-success {
	color: #4ade80 !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .btn-outline-primary {
	color: var(--pds-navy-ink) !important;
	border-color: var(--pds-border-strong) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .btn-outline-secondary {
	color: var(--pds-muted) !important;
	border-color: var(--pds-border) !important;
}
html[data-bs-theme="dark"] .pds-app-settings-modal .btn-outline-secondary:hover {
	background: var(--pds-surface-hover) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-account-modal .btn-outline-secondary {
	color: var(--pds-muted) !important;
	border-color: var(--pds-border) !important;
}

html[data-bs-theme="dark"] .pds-toast-pos-option {
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-toast-pos-option:hover {
	border-color: var(--pds-navy-ink) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-toast-pos-option:has(input:checked),
html[data-bs-theme="dark"] .pds-toast-pos-option.is-selected {
	background: var(--pds-surface-3) !important;
	border-color: var(--pds-navy-ink) !important;
	color: var(--pds-navy-ink) !important;
}

html[data-bs-theme="dark"] .pds-theme-picker-option {
	background: var(--pds-surface) !important;
	border-color: var(--pds-border) !important;
	color: var(--pds-text) !important;
}

html[data-bs-theme="dark"] .pds-theme-picker-option.is-selected,
html[data-bs-theme="dark"] .pds-theme-picker-option:has(input:checked) {
	background: var(--pds-surface-2) !important;
	color: #ffffff !important;
}

html[data-bs-theme="dark"] .pds-generated-hint {
	background: rgba(61, 214, 140, 0.15) !important;
	border-color: rgba(61, 214, 140, 0.35) !important;
	color: #86efac !important;
}

html[data-bs-theme="dark"] .pds-account-modal .form-control::placeholder,
html[data-bs-theme="dark"] .pds-account-modal .form-control::-webkit-input-placeholder {
	color: #9aa8c2 !important;
	opacity: 1;
}

/* Native search-box X — keep it visible in light and dark (Chrome/Edge). */
input[type="search"] {
	padding-right: 1.85rem;
}

input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 0.95rem;
	height: 0.95rem;
	margin: 0 0.05rem 0 0.35rem;
	background-color: currentColor;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' d='M3.2 3.2l9.6 9.6M12.8 3.2l-9.6 9.6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' d='M3.2 3.2l9.6 9.6M12.8 3.2l-9.6 9.6'/%3E%3C/svg%3E");
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	cursor: pointer;
	opacity: 0.72;
}

input[type="search"]::-webkit-search-cancel-button:hover {
	opacity: 1;
}

.pds-filter-chip-clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.05rem;
	height: 1.05rem;
	margin-left: 0.28rem;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
	opacity: 0.9;
}

.pds-filter-chip.is-active .pds-filter-chip-clear:hover {
	background: rgba(255, 255, 255, 0.22);
	opacity: 1;
}
