/* ═══════════════════════════════════════════════════════════════
   AtlasMPS — Custom Platform Styles
   All custom CSS for the AtlasMPS platform.
   Template framework styles remain in styles.css
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   Entity Theme Variables
   Default entity colors and per-entity overrides
   ═══════════════════════════════════════════════════════════════ */

:root {
	/* Platform default — used when no entity-specific CSS rule or DB value exists */
	--sa-primary-color: #282320;
	--sa-secondary-color: #847C70;

	--body-bg-rgb: 237, 238, 241;
	--primary-rgb: 40, 35, 32;
	--secondary-rgb: 245, 111, 75;
	--warning-rgb: 245, 184, 73;
	--info-rgb: 73, 182, 245;
	--success-rgb: 38, 191, 148;
	--danger-rgb: 230, 83, 60;
	--light-rgb: 248, 249, 250;
	--dark-rgb: 35, 35, 35;
	--orange-rgb: 255, 165, 5;
	--pink-rgb: 231, 145, 188;
	--teal-rgb: 18, 194, 194;
	--purple-rgb: 177, 75, 213;
	--default-body-bg-color: rgb(var(--body-bg-rgb));
	--primary-border: rgb(var(--primary-rgb));
	--primary01: rgba(var(--primary-rgb), 0.1);
	--primary02: rgba(var(--primary-rgb), 0.2);
	--primary03: rgba(var(--primary-rgb), 0.3);
	--primary04: rgba(var(--primary-rgb), 0.4);
	--primary05: rgba(var(--primary-rgb), 0.5);
	--primary06: rgba(var(--primary-rgb), 0.6);
	--primary07: rgba(var(--primary-rgb), 0.7);
	--primary08: rgba(var(--primary-rgb), 0.8);
	--primary09: rgba(var(--primary-rgb), 0.9);
	--primary005: rgba(var(--primary-rgb), 0.05);
	--default-font-family: "Inter", sans-serif;
	--default-font-weight: 400;
	--default-text-color: #333;
	--default-border: #f0f0f0;
	--default-background: #f2f4f7;
	--menu-bg: #fff;
	--menu-prime-color: #2A2622;
	--menu-border-color: #f3f3f3;
	--header-bg: #e8e0d4;
	--header-prime-color: #e8e0d4;
	--header-border-color: #f3f3f3;
	--custom-white: #fff;
	--custom-black: #000;
	--bootstrap-card-border: #f3f3f3;
	--list-hover-focus-bg: #f5f6f7;
	--text-muted: #333;
	--input-border: #e4e9f4;
	--form-control-bg: #ffffff;
	/* Gray set */
	--gray-1: #F8F6F3;
	--gray-2: #f2f4f5;
	--gray-3: #e6eaeb;
	--gray-4: #dbdfe1;
	--gray-5: #949eb7;
	--gray-6: #7987a1;
	--gray-7: #4d5875;
	--gray-8: #383853;
	--gray-9: #323251;
	/* White set */
	--white-1: rgba(255, 255, 255, 0.1);
	--white-2: rgba(255, 255, 255, 0.2);
	--white-3: rgba(255, 255, 255, 0.3);
	--white-4: rgba(255, 255, 255, 0.4);
	--white-5: rgba(255, 255, 255, 0.5);
	--white-6: rgba(255, 255, 255, 0.6);
	--white-7: rgba(255, 255, 255, 0.7);
	--white-8: rgba(255, 255, 255, 0.8);
	--white-9: rgba(255, 255, 255, 0.9);
	/* Black set */
	--black-1: rgba(0, 0, 0, 0.1);
	--black-2: rgba(0, 0, 0, 0.2);
	--black-3: rgba(0, 0, 0, 0.3);
	--black-4: rgba(0, 0, 0, 0.4);
	--black-5: rgba(0, 0, 0, 0.5);
	--black-6: rgba(0, 0, 0, 0.6);
	--black-7: rgba(0, 0, 0, 0.7);
	--black-8: rgba(0, 0, 0, 0.8);
	--black-9: rgba(0, 0, 0, 0.9);
}

:root[data-entity="100"] {
	--sa-primary-color: #024022;
	--sa-secondary-color: #a9d1bf;
	--sa-entity-logo: url("../images/company-logos/tcventures-logo.webp");
}

:root[data-entity="200"] {
	--sa-primary-color: #305e6d;
	--sa-secondary-color: #cfe5ea;
	--sa-entity-logo: url("../images/company-logos/nuvidamedical-logo.webp");
}

:root[data-entity="205"] {
	--sa-primary-color: #282320;
	--sa-secondary-color: rgb(197, 185, 167);
	--sa-entity-logo: url("../images/company-logos/nuvidamedical-logo.webp");
}

:root[data-entity="300"] {
	--sa-primary-color: #000000;
	--sa-secondary-color: #b5b5b5;
	--sa-entity-logo: url("../images/company-logos/forthrightmedical-logo.webp");
}

:root[data-entity="400"] {
	--sa-primary-color: #000000;
	--sa-secondary-color: #b5b5b5;
	--sa-entity-logo: url("../images/company-logos/forthrightmedical-logo.webp");
}

:root[data-entity="500"] {
	--sa-primary-color: #024022;
	--sa-secondary-color: #a9d1bf;
	--sa-entity-logo: url("../images/company-logos/tcventures-logo.webp");
}

:root[data-entity="600"] {
	--sa-primary-color: #000000;
	--sa-secondary-color: #b5b5b5;
	--sa-entity-logo: url("../images/company-logos/forthrightmedical-logo.webp");
}

:root[data-entity="700"] {
	--sa-primary-color: #024022;
	--sa-secondary-color: #a9d1bf;
	--sa-entity-logo: url("../images/company-logos/tcventures-logo.webp");
}

:root[data-entity="800"] {
	--sa-primary-color: #450840;
	--sa-secondary-color: #d9b7d6;
	--sa-entity-logo: url("../images/company-logos/thecadlab-logo.webp");
}

:root[data-entity="900"] {
	--sa-primary-color: #282320;
	--sa-secondary-color: #cfcac4;
	--sa-entity-logo: url("../images/company-logos/sageandatlas-logo.webp");
}

:root[data-entity="910"] {
	--sa-primary-color: #30428b;
	--sa-secondary-color: #c2caec;
	--sa-entity-logo: url("../images/company-logos/bigskyfootandankle-logo.webp");
}

:root[data-entity="1000"] {
	--sa-primary-color: #5b2c1f;
	--sa-secondary-color: #d9c8b8;
}
/* AtlasLO sidebar logo is supplied by the PHP module-as-brand resolver in
   layouts.php — it pulls Modules.moduleLogoUrl into the inline --sa-entity-logo
   CSS variable so .logo-img picks it up as background-image. No CSS hack needed. */

/* Sidebar header logo — uniform compact sizing across platform, entity, and
   module variants. Caps at 32px height like the original AtlasMPS treatment.
   All variants are horizontally + vertically centered in the header strip. */
.sidebar-platform-logo {
	display: block;
	max-height: 32px;
	max-width: 160px;
	margin: 0 auto;
	object-fit: contain;
	object-position: center center;
}
/* Match the entity/module .logo-img (set as a background-image div) to the
   same compact scale. The base theme uses min-height: 75px which is too big. */
.app-sidebar .main-sidebar-header .logo-img {
	min-height: 0 !important;
	height: 32px !important;
	width: 100% !important;
	max-width: 160px !important;
	margin: 0 auto !important;
	background-size: contain !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
}
/* v3.5.0 — when the .logo-img falls back to a bundled black module logo
   (assets/images/module-logos/*-logo-black.webp), invert it in dark mode so
   it reads as white against the dark sidebar. Class is only added when the
   bundled fallback kicks in, so real customer logos are never inverted. */
[data-theme-mode="dark"] .logo-img--invert-dark {
	filter: invert(1) hue-rotate(180deg);
}
.app-sidebar .main-sidebar-header .header-logo {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 56px;
	padding: 0 16px;
	text-align: center;
}
/* Wordmark fallback (when neither entity nor platform logo is set) — also
   centered in the header strip. */
.app-sidebar .main-sidebar-header .atlasmps-wordmark--sidebar,
.app-sidebar .main-sidebar-header .atlasmps-wordmark {
	margin: 0 auto;
	text-align: center;
}

/* Obsolete page-header-breadcrumb button overrides removed — the new
   design system (components/atlas-lo-system.css) flips the header strip
   to a light editorial title block, so dark-strip button tinting is no
   longer necessary. */

/* ═══════════════════════════════════════════════════════════════
   Custom Sidebar — Light Theme
   One clean block. All states. No conflicts.
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ── */
.app-sidebar .side-menu__item {
	border-radius: 0 !important;
	margin: 0 !important;
	padding: 0.5rem 0.75rem !important;
	line-height: 1.4;
	color: #2A2622 !important;
	background-color: transparent !important;
	transition: background-color 0.15s ease;
}

.app-sidebar .side-menu__label {
	font-size: 0.82rem !important;
	font-weight: 500 !important;
	color: inherit !important;
	white-space: normal !important;
	overflow: visible !important;
	text-overflow: unset !important;
}

.app-sidebar .side-menu__icon {
	width: 18px !important;
	min-width: 18px !important;
	font-size: 0.9rem !important;
	color: #6E6660 !important;
}

.app-sidebar .side-menu__angle {
	font-size: 0.6rem !important;
	color: #B5AB9D !important;
	transition: transform 0.2s ease;
}

/* ── Submenu items ── */
.app-sidebar .slide-menu .side-menu__item {
	padding: 0.4rem 0.75rem 0.4rem 1.5rem !important;
	font-size: 0.8rem !important;
}

.app-sidebar .slide-menu .side-menu__item::before {
	display: none !important;
}

/* ── Hover — background only ── */
.app-sidebar .side-menu__item:hover {
	background-color: #f0f0f0 !important;
	color: #2A2622 !important;
}
.app-sidebar .side-menu__item:hover .side-menu__label,
.app-sidebar .side-menu__item:hover .side-menu__icon,
.app-sidebar .side-menu__item:hover .side-menu__angle {
	color: inherit !important;
}
.app-sidebar .slide-menu .side-menu__item:hover {
	padding-left: 1.5rem !important;
}

/* ── Active — left border + bg ── */
/* Uses inset box-shadow instead of border-left so the active indicator
   doesn't consume horizontal space (which would shift content 3px right
   and break alignment with sibling inactive items, especially in nested
   menus where padding-left compensation is fragile across cascade order). */
.app-sidebar .side-menu__item.active {
	background-color: #f0f0f0 !important;
	color: #1A1715 !important;
	border-left: 0 !important;
	box-shadow: inset 3px 0 0 var(--sa-primary-color, #282320) !important;
}
.app-sidebar .side-menu__item.active .side-menu__label {
	color: #1A1715 !important;
	font-weight: 600 !important;
}
.app-sidebar .side-menu__item.active .side-menu__icon {
	color: #1A1715 !important;
}

/* ── Group labels ── */
.sa-sb-group-toggle, .sa-sb-mod-toggle {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	padding: 0.45rem 0.65rem !important;
	margin: 0.5rem 0 0.25rem !important;
	font-size: 0.58rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6E6660 !important;
	cursor: pointer;
	border: 1px solid #D8D0C3;
	border-left: 3px solid #B5AB9D;
	background: #F8F6F3 !important;
	transition: all 0.15s;
}
.sa-sb-group-toggle:hover, .sa-sb-mod-toggle:hover {
	color: #3D3833 !important;
	background: #EFEBE5 !important;
	border-left-color: var(--sa-primary-color, #282320);
}
.sa-sb-group-toggle .sa-sb-group-icon,
.sa-sb-mod-toggle .sa-sb-mod-icon {
	font-size: 0.5rem;
	color: #847C70;
	transition: transform 0.2s;
}

/* ── Entity label + badge ── */
.app-sidebar .side-menu__label1 {
	font-size: 0.7rem;
	font-weight: 600;
	color: #6E6660;
	padding: 0.4rem 0.75rem;
	border-bottom: 1px solid #EFEBE5;
}

/* ── Entity favicon ── */
.entity-favicon-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.entity-favicon-img {
	width: 18px;
	height: 18px;
	border-radius: 0;
	object-fit: contain;
}

/* ── Sidebar toggle icon ── */
.sidebar-toggle-icon {
	font-size: 0.8rem;
	font-weight: 900;
	color: var(--header-prime-color);
}

/* ── Hide sidebar collapse toggle on desktop ── */
@media (min-width: 992px) {
	.sidemenu-toggle { display: none !important; }
}

/* ── Collapsed sidebar — hide custom group labels ── */
/* The template handles icon-only mode. We just need to hide our custom elements. */
.app-sidebar[style*="width: 5rem"] .sa-sb-group-toggle,
.app-sidebar[style*="width: 5rem"] .sa-sb-mod-toggle,
[data-toggled="close"] .sa-sb-group-toggle,
[data-toggled="close"] .sa-sb-mod-toggle,
[data-toggled="icon-overlay-close"] .sa-sb-group-toggle,
[data-toggled="icon-overlay-close"] .sa-sb-mod-toggle {
	display: none !important;
}

/* Hide module role pills (Admin/Cust) and the "My Modules" section label when the
   sidebar is in icon-only mode — without the module name next to them they'd appear
   as orphan text/colored bars. */
.app-sidebar[style*="width: 5rem"] .sa-sb-role-pill,
.app-sidebar[style*="width: 5rem"] .sa-sb-modules-label,
[data-toggled="close"] .sa-sb-role-pill,
[data-toggled="close"] .sa-sb-modules-label,
[data-toggled="icon-overlay-close"]:not([data-icon-overlay="open"]) .sa-sb-role-pill,
[data-toggled="icon-overlay-close"]:not([data-icon-overlay="open"]) .sa-sb-modules-label {
	display: none !important;
}
[data-toggled="close"] .app-sidebar .side-menu__item.active,
[data-toggled="icon-overlay-close"]:not([data-icon-overlay="open"]) .app-sidebar .side-menu__item.active {
	border-left: none !important;
	padding-left: 0.75rem !important;
}

/* ── Mobile sidebar ── */
@media (max-width: 991.98px) {
	.app-sidebar {
		transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
	}

	.app-sidebar .side-menu__item {
		min-height: 44px;
		display: flex;
		align-items: center;
	}

	.app-sidebar .slide-menu.child1 .side-menu__item,
	.app-sidebar .slide-menu.child2 .side-menu__item,
	.app-sidebar .slide-menu.child3 .side-menu__item {
		min-height: 42px;
	}

	.slide-menu.child1 {
		transition: max-height 0.2s ease !important;
	}

	.entity-favicon-icon {
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
	}
}

/* ── Remove all border-radius from sidebar elements ── */
.app-sidebar,
.app-sidebar .main-sidebar,
.app-sidebar .main-menu,
.app-sidebar .slide,
.app-sidebar .slide-menu,
.app-sidebar .side-menu__item,
.app-sidebar .side-menu__icon,
.entity-favicon-img {
	border-radius: 0 !important;
}

/* ── Tighter item spacing ── */
.app-sidebar .slide {
	margin-bottom: 0;
}

/* ── Submenu nav indent ── */
#sbIntItems {
	margin-left: 10px;
}

/* ═══════════════════════════════════════════════════════════════
   Profile Dropdown & Clinic Switcher
   ═══════════════════════════════════════════════════════════════ */

/* Modern profile dropdown */
.sa-profile-dropdown {
	border-radius: 0 !important;
	padding: 0 !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
	border: 1px solid #e8e8e8 !important;
}
.sa-profile-dropdown-header {
	background: #fafafa;
	border-bottom: none;
}
.sa-profile-dropdown .dropdown-divider {
	margin: 0;
	border-color: #eee;
}
.sa-dropdown-section-label {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #847C70;
	padding: 0.55rem 1rem 0.25rem;
	pointer-events: none;
}
.sa-dropdown-item {
	padding: 8px 16px !important;
	font-size: 0.875rem;
	color: #333 !important;
	border-radius: 0 !important;
	transition: background 0.15s ease;
}
.sa-dropdown-item:hover,
.sa-dropdown-item:focus {
	background: #f5f5f5 !important;
	color: #111 !important;
}
.sa-dropdown-item:active {
	background: #eee !important;
	color: #111 !important;
}
.sa-dropdown-item i {
	width: 18px;
	text-align: center;
}
.sa-profile-dropdown .clinic-switch-item {
	border-radius: 0 !important;
}
.sa-profile-dropdown .clinic-switch-item.active {
	background: #f0faf0 !important;
	color: #333 !important;
}
.sa-profile-dropdown .clinic-switch-item.active:hover {
	background: #e6f5e6 !important;
}
.sa-clinic-search {
	border-radius: 0 !important;
	font-size: 0.8rem !important;
	border-color: #ddd !important;
}
.sa-clinic-search:focus {
	border-color: #aaa !important;
	box-shadow: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   Custom Platform Styles (main block)
   Typography, buttons, forms, tables, layout, components, etc.
   ═══════════════════════════════════════════════════════════════ */

h1,
h2,
h3 {
	font-weight: 700;
}

h4,
h5,
h6 {
	font-weight: 600;
}

.fw-bold {
	font-weight: 700;
}

.text-xl {
	font-size: 1.775rem;
}

.text-lg {
	font-size: 1.475rem;
}

.text-md {
	font-size: 1.175rem;
}

.rounded-circle {
	border-radius: 0;
}

/*widths*/
.btn-primary {
	background-color: var(--sa-primary-color) !important;
	color: #fff !important;
	border: none !important;
	padding: 10px 20px;
}

.btn-primary:hover {
	background-color: #110e0d !important;
	color: #fff;
}

.btn-secondary {
	background-color: var(--sa-secondary-color) !important;
	color: #000 !important;
	border: none !important;
	padding: 10px 20px;
}

.btn-secondary:hover {
	background-color: #f2f0ee !important;
	color: #000;
}

#btnLogin,
#btnRetrievePassword {
	width: 100%;
}

.container.alert {
	background: #f2f0ee !important;
	position: relative;
}

.login-screen-wrapper {
	background: #f2f0ee !important;
}

.gridjs-head {
	margin-bottom: 16px;
}

input#search {
	border-radius: 0;
	background: #f0f0f0 !important;
	padding: 10px 20px !important;
	min-width: 300px;
}

.gridjs-search button {
	border: 2px solid #28231f !important;
	padding: 10px 14px;
	border-radius: 0;
}

.table-responsive tbody tr:nth-child(even) td {
	background: #f4f4f4 !important;
}

/* (Moved to Custom Sidebar Overrides section) */

thead.table-primary tr th {
	padding: 15px 8px;
}

.detail-wrap {
	text-align: center;
	padding: 20px;
}

img.logo {
	max-width: 250px;
}

#myTable tbody tr {
	cursor: pointer;
}

.dt-right {
	text-align: right;
}

.home-feat-img {
	max-width: 100%;
}

.home-search-bar .card.custom-card {
	text-align: center;
}

.faqs-page-banner .input-group {
	max-width: 500px !important;
	margin: 0 auto !important;
}

.mt-50 {
	margin-top: 50px;
}

/* Entity form */
.sa-form {
	--sa-form-label-col: 220px;
	--sa-form-gap: 16px;
}

.sa-form--label-180 {
	--sa-form-label-col: 180px;
}

.sa-form--gap-12 {
	--sa-form-gap: 12px;
}

.sa-form--narrow {
	--sa-control-max: 440px;
}

.sa-form--wide {
	--sa-control-max: 680px;
}

.sa-form--compact {
	--sa-form-gap: 12px;
}

@media (min-width: 992px) {
	.sa-form {
		--sa-control-max: 560px;
	}

	.sa-field>*:not(label) {
		max-width: var(--sa-control-max);
	}

	.sa-field {
		margin-bottom: 10px;
	}

	.sa-textbox {
		height: 38px;
	}

	.sa-color-picker {
		width: 38px;
		height: 38px;
		border-radius: 0;
	}

	.sa-media {
		margin-top: 12px;
	}

	.sa-btn-align {
		margin-top: 8px;
	}
}

.sa-field {
	display: grid;
	grid-template-columns: var(--sa-form-label-col) 1fr;
	align-items: center;
	gap: var(--sa-form-gap);
	margin-bottom: 14px;
}

.sa-field>label,
.sa-field span,
.sa-field p {
	margin: 0;
	font-weight: 600;
	color: var(--default-text-color, #2a2a2a);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sa-align-top {
	align-items: baseline;
}

/* One-column on small screens */
@media (max-width: 768px) {
	.sa-field {
		grid-template-columns: 1fr;
	}
}

/* Inputs*/
.sa-textbox,
.sa-select {
	width: 100%;
	height: 42px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #B5AB9D;
	border-radius: 0;
	font-size: 0.95rem;
	transition: border-color 0.2s ease;
}

.sa-textbox:focus,
.sa-select:focus {
	outline: none;
	border-color: var(--sa-primary-color, #4661e6);
	box-shadow: 0 0 0 3px rgba(70, 97, 230, 0.15);
}

.sa-select--dropdown {
	cursor: pointer;
}

.sa-media {
	display: block;
	max-width: 260px;
	max-height: 160px;
	object-fit: contain;
	background: #fafafa;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 0;
	padding: 10px;
	margin: 10px 0 0 var(--sa-form-label-col);
}

@media (max-width: 768px) {
	.sa-media {
		margin-left: 0;
	}
}

.sa-btn-align {
	margin-left: var(--sa-form-label-col);
	min-width: 120px;
	border-radius: 0;
}

@media (max-width: 768px) {
	.sa-btn-align {
		margin-left: 0;
		width: 100%;
	}
}

.sa-fit-content {
	width: fit-content;
}

/* Entity form */

/* ═══════════════════════════════════════════════════════════════════
   Staff Profile Page — Hero Layout
   ═══════════════════════════════════════════════════════════════════ */

/* ── Card ────────────────────────────────────────────────────────── */
.sp-card {
	overflow: hidden;
}

/* ── Profile Hero ────────────────────────────────────────────────── */
.sp-hero {
	display: flex;
	align-items: flex-start;
	gap: 1.75rem;
	padding: 2rem;
	background: #F8F6F3;
	border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sp-hero__avatar {
	flex-shrink: 0;
}
.sp-hero__info {
	flex: 1;
	min-width: 0;
	padding-top: 0.15rem;
}
.sp-hero__name {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1A1715;
	margin: 0 0 0.125rem;
	line-height: 1.3;
}
.sp-hero__title {
	font-size: 0.875rem;
	color: #6E6660;
	margin-bottom: 0.5rem;
}
.sp-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}
.sp-meta-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.6rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: #524A45;
	background: #fff;
	border: 1px solid rgba(0,0,0,0.08);
}
.sp-meta-chip i {
	font-size: 0.6875rem;
	color: #847C70;
}
.sp-hero__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin-top: 0.75rem;
}
.sp-contact-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: rgb(var(--primary-rgb, 13, 110, 253));
	text-decoration: none;
	transition: color 0.15s ease;
}
.sp-contact-link:hover {
	color: #1A1715;
	text-decoration: underline;
}
.sp-contact-link i {
	font-size: 0.6875rem;
	opacity: 0.7;
}

/* ── Avatar ──────────────────────────────────────────────────────── */
.sp-headshot-container {
	position: relative;
	display: inline-block;
}
.sp-headshot {
	width: 120px;
	height: 120px;
	overflow: hidden;
	border-radius: 50%;
	border: none;
	box-shadow: 0 2px 12px rgba(0,0,0,0.10);
	display: flex;
	align-items: center;
	justify-content: center;
	background: #D8D0C3;
	margin: 0 auto;
	font-size: 2.5rem;
	font-weight: 700;
	color: #6E6660;
	letter-spacing: 1px;
}
.sp-headshot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.sp-upload-btn {
	position: absolute;
	bottom: 6px;
	right: 6px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #fff;
	color: #524A45;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	transition: background 0.15s ease, transform 0.15s ease, color 0.15s ease;
}
.sp-upload-btn:hover {
	background: #EFEBE5;
	color: #2A2622;
	transform: scale(1.1);
}

/* ── Credential Badge ────────────────────────────────────────────── */
.sp-credential-badge {
	display: inline-block;
	padding: 0.2rem 0.65rem;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: rgb(var(--primary-rgb, 13, 110, 253));
	background: rgba(var(--primary-rgb, 13, 110, 253), 0.08);
	border: 1px solid rgba(var(--primary-rgb, 13, 110, 253), 0.15);
}

/* ── Tabs Wrapper ────────────────────────────────────────────────── */
.sp-tabs-wrapper {
	padding: 0 2rem;
	background: #F8F6F3;
	border-bottom: 2px solid rgba(0,0,0,0.06);
}
.sa-profile .sp-nav-tabs {
	border-bottom: none;
	margin-bottom: -2px;
}
.sa-profile .sp-nav-tabs .nav-link {
	font-size: 0.8125rem;
	font-weight: 500;
	padding: 0.75rem 1.25rem;
	color: #847C70;
	border: none;
	border-bottom: 2px solid transparent;
	background: transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.sa-profile .sp-nav-tabs .nav-link:hover {
	color: #3D3833;
}
.sa-profile .sp-nav-tabs .nav-link.active {
	color: #1A1715;
	font-weight: 600;
	border-bottom-color: #1A1715;
}
.sa-profile .sp-nav-tabs .nav-link i {
	font-size: 0.75rem;
	opacity: 0.7;
}
.sa-profile .sp-nav-tabs .nav-link.active i {
	opacity: 1;
}
.sp-tab-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 0.35rem;
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1;
	background: rgba(0,0,0,0.06);
	color: #6E6660;
	margin-left: 0.35rem;
}
.sa-profile .sp-nav-tabs .nav-link.active .sp-tab-badge {
	background: #1A1715;
	color: #fff;
}

/* ── Tab Content ─────────────────────────────────────────────────── */
.sp-tab-content {
	padding: 1.75rem 2rem;
}

/* ── Read-only Fields ────────────────────────────────────────────── */
.sp-read-label {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #847C70;
	margin-bottom: 0.2rem;
}
.sp-read-value {
	font-size: 0.875rem;
	font-weight: 500;
	color: #1A1715;
}

/* ── Form Layout ─────────────────────────────────────────────────── */
.sp-form .sa-field {
	margin-bottom: 0;
}
.sp-form label {
	font-weight: 600;
	font-size: 0.8125rem;
	color: #3D3833;
	margin-bottom: 0.3rem;
}
.sp-form .form-control,
.sp-form .form-select {
	border-color: rgba(0,0,0,0.1);
	font-size: 0.875rem;
	padding: 0.5rem 0.75rem;
	transition: border-color 0.15s ease;
}
.sp-form .form-control:focus,
.sp-form .form-select:focus {
	border-color: #1A1715;
	box-shadow: 0 0 0 1px rgba(17,24,39,0.08);
}

/* ── Form Section Dividers ───────────────────────────────────────── */
.sp-form-section {
	padding-bottom: 1.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid rgba(0,0,0,0.06);
}
.sp-form-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
}
.sp-form-section__header {
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.sp-form-section__icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	background: #EFEBE5;
	color: #6E6660;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	flex-shrink: 0;
}
.sp-form-section__title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #1A1715;
}
.sp-form-subsection {
	margin-top: 1rem;
	margin-bottom: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px dashed rgba(0,0,0,0.08);
}
.sp-form-subsection__label {
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #847C70;
}

/* ── Form Actions ────────────────────────────────────────────────── */
.sp-form-actions {
	text-align: right;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(0,0,0,0.06);
}

/* ── Entity List ─────────────────────────────────────────────────── */
.sp-entity-list {
	border: 1px solid rgba(0,0,0,0.08);
}
.sp-entity-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.65rem 1rem;
	transition: background 0.12s ease;
}
.sp-entity-row + .sp-entity-row {
	border-top: 1px solid rgba(0,0,0,0.05);
}
.sp-entity-row:hover {
	background: rgba(0,0,0,0.015);
}
.sp-entity-row__name {
	font-size: 0.875rem;
	font-weight: 500;
}
.sp-entity-row__link {
	color: rgb(var(--primary-rgb, 13, 110, 253));
	text-decoration: none;
	font-weight: 600;
}
.sp-entity-row__link:hover {
	text-decoration: underline;
}
.sp-entity-row__email {
	font-size: 0.8rem;
	color: #6c757d;
}
.sp-entity-row__roles {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}
.sp-role-badge {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	font-size: 0.6875rem;
	font-weight: 600;
	color: rgb(var(--primary-rgb, 13, 110, 253));
	background: rgba(var(--primary-rgb, 13, 110, 253), 0.08);
	letter-spacing: 0.02em;
}

/* ── Check Cards ─────────────────────────────────────────────────── */
.sp-check-card {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 0.75rem;
	border: 1px solid rgba(0,0,0,0.08);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.sp-check-card:hover {
	border-color: rgba(0,0,0,0.2);
	background: rgba(0,0,0,0.01);
}
.sp-check-card--active {
	border-color: #1A1715;
	background: rgba(17,24,39,0.03);
	border-left: 3px solid #1A1715;
}
.sp-check-card .form-check-label {
	font-size: 0.8125rem;
	cursor: pointer;
}

/* ── Hint ────────────────────────────────────────────────────────── */
.sp-hint {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 0.875rem;
	font-size: 0.8125rem;
	color: #6E6660;
	background: #F8F6F3;
	border: 1px solid rgba(0,0,0,0.06);
	border-left: 3px solid rgb(var(--primary-rgb, 13, 110, 253));
}
.sp-hint i {
	color: rgb(var(--primary-rgb, 13, 110, 253));
	flex-shrink: 0;
}

/* ── Empty State ─────────────────────────────────────────────────── */
.sp-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 2.5rem 1rem;
	color: #847C70;
	font-size: 0.875rem;
	font-style: italic;
}
.sp-empty-state i {
	font-size: 1.5rem;
	opacity: 0.4;
}

/* ── Overrides ───────────────────────────────────────────────────── */
.sa-profile .btn-primary { border-radius: 0; }
.sa-profile .alert { border-radius: 0; }
.sa-profile .modal-content { border-radius: 0; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 767.98px) {
	.sp-hero {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 1rem;
		padding: 1.5rem 1.25rem;
	}
	.sp-hero__meta {
		justify-content: center;
	}
	.sp-hero__contact {
		justify-content: center;
	}
	.sp-tabs-wrapper {
		padding: 0 1rem;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.sp-tabs-wrapper .sp-nav-tabs {
		flex-wrap: nowrap;
		white-space: nowrap;
	}
	.sa-profile .sp-nav-tabs .nav-link {
		padding: 0.65rem 0.85rem;
		font-size: 0.78rem;
	}
	.sp-tab-content {
		padding: 1.25rem;
	}
	.sp-entity-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
}

/* ── Dark Theme ──────────────────────────────────────────────────── */
[data-theme-mode="dark"] .sp-hero {
	background: rgba(255,255,255,0.02);
	border-color: rgba(255,255,255,0.04);
}
[data-theme-mode="dark"] .sp-hero__name { color: #EFEBE5; }
[data-theme-mode="dark"] .sp-hero__title { color: #847C70; }
[data-theme-mode="dark"] .sp-meta-chip {
	color: #B5AB9D;
	background: rgba(255,255,255,0.04);
	border-color: rgba(255,255,255,0.08);
}
[data-theme-mode="dark"] .sp-meta-chip i { color: #6E6660; }
[data-theme-mode="dark"] .sp-contact-link { color: rgba(var(--primary-rgb, 96, 165, 250)); }
[data-theme-mode="dark"] .sp-contact-link:hover { color: #EFEBE5; }
[data-theme-mode="dark"] .sp-headshot {
	box-shadow: 0 2px 12px rgba(0,0,0,0.3);
	background: #2A2622;
	color: #847C70;
}
[data-theme-mode="dark"] .sp-upload-btn {
	background: #3D3833;
	color: #D8D0C3;
	box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
[data-theme-mode="dark"] .sp-credential-badge {
	background: rgba(var(--primary-rgb, 13, 110, 253), 0.15);
	border-color: rgba(var(--primary-rgb, 13, 110, 253), 0.25);
}
[data-theme-mode="dark"] .sp-tabs-wrapper {
	background: rgba(255,255,255,0.02);
	border-color: rgba(255,255,255,0.04);
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link {
	color: #6E6660;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link:hover {
	color: #B5AB9D;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link.active {
	color: #EFEBE5;
	border-bottom-color: #EFEBE5;
}
[data-theme-mode="dark"] .sp-tab-badge {
	background: rgba(255,255,255,0.08);
	color: #847C70;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link.active .sp-tab-badge {
	background: #EFEBE5;
	color: #1A1715;
}
[data-theme-mode="dark"] .sp-read-label { color: #6E6660; }
[data-theme-mode="dark"] .sp-read-value { color: #EFEBE5; }
[data-theme-mode="dark"] .sp-form label { color: #B5AB9D; }
[data-theme-mode="dark"] .sp-form .form-control,
[data-theme-mode="dark"] .sp-form .form-select {
	border-color: rgba(255,255,255,0.08);
}
[data-theme-mode="dark"] .sp-form .form-control:focus,
[data-theme-mode="dark"] .sp-form .form-select:focus {
	border-color: #EFEBE5;
	box-shadow: 0 0 0 1px rgba(243,244,246,0.08);
}
[data-theme-mode="dark"] .sp-form-section {
	border-color: rgba(255,255,255,0.04);
}
[data-theme-mode="dark"] .sp-form-section__title { color: #D8D0C3; }
[data-theme-mode="dark"] .sp-form-section__icon { background: #2A2622; color: #847C70; }
[data-theme-mode="dark"] .sp-form-subsection { border-color: rgba(255,255,255,0.06); }
[data-theme-mode="dark"] .sp-form-subsection__label { color: #6E6660; }
[data-theme-mode="dark"] .sp-form-actions { border-color: rgba(255,255,255,0.04); }
[data-theme-mode="dark"] .sp-entity-list { border-color: rgba(255,255,255,0.06); }
[data-theme-mode="dark"] .sp-entity-row + .sp-entity-row { border-color: rgba(255,255,255,0.04); }
[data-theme-mode="dark"] .sp-entity-row:hover { background: rgba(255,255,255,0.03); }
[data-theme-mode="dark"] .sp-role-badge {
	background: rgba(var(--primary-rgb, 13, 110, 253), 0.15);
}
[data-theme-mode="dark"] .sp-check-card {
	border-color: rgba(255,255,255,0.06);
}
[data-theme-mode="dark"] .sp-check-card:hover {
	border-color: rgba(255,255,255,0.15);
	background: rgba(255,255,255,0.03);
}
[data-theme-mode="dark"] .sp-check-card--active {
	border-color: #EFEBE5;
	background: rgba(255,255,255,0.04);
	border-left-color: #EFEBE5;
}
[data-theme-mode="dark"] .sp-hint {
	background: rgba(255,255,255,0.02);
	border-color: rgba(255,255,255,0.04);
	border-left-color: rgb(var(--primary-rgb, 13, 110, 253));
	color: #847C70;
}
[data-theme-mode="dark"] .sp-empty-state { color: #6E6660; }



/* (side-menu__label moved to Custom Sidebar Overrides section) */

/* Footer removed — legal content moved to sidebar footer */
footer.footer {
	display: none;
}

/* Sidebar bottom padding so nav items don't hide behind sidebar footer */
.app-sidebar .main-sidebar {
	padding-bottom: 75px;
	overflow-y: auto;
	max-height: calc(100vh - 4rem);
}

/* Hide sidebar footer when sidebar is collapsed */
[data-toggled="icon-overlay-close"]:not([data-icon-overlay="open"]) .sidebar-footer {
	display: none;
}
[data-toggled="icon-overlay-close"]:not([data-icon-overlay="open"]) .app-sidebar .main-sidebar {
	padding-bottom: 0;
}

/* Footer */
.stat-block .count {
	font-size: 20px;
	font-weight: bold;
	line-height: 0px;
}

.stat-block .title {
	font-weight: bold;
}

.sa-spinner {
	color: var(--sa-primary-color);
}

.sa-meta {
	background-color: var(--bs-gray-100);
	border: 1px solid var(--bs-border-color);
	border-radius: 0;
	padding: 0.75rem 1rem;
}

.sa-preview-frame {
	min-height: 420px;
	height: 100%;
}

.sa-test-email-input {
	min-width: 240px;
}

.sa-meta--list {
	background-color: #fff;
	border-radius: 0.75rem;
	padding: 0.5rem 0.75rem;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.sa-meta--list .sa-meta__item {
	align-items: center;
	padding: 0.35rem 0.25rem;
	justify-content: space-between;
}

.sa-meta--list .sa-meta__item+.sa-meta__item {
	margin-top: 0;
	border-top: 1px solid var(--bs-border-color);
}

.sa-meta--list .sa-meta__label {
	min-width: 200px;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.sa-meta--list .sa-meta__value {
	font-weight: 600;
}

.sa-meta__item {
	display: flex;
	gap: 0.5rem;
	font-size: 0.875rem;
	line-height: 1.4;
}

.sa-meta__item+.sa-meta__item {
	margin-top: 0.25rem;
}

.sa-meta__label {
	color: var(--bs-gray-600);
	font-weight: 500;
	white-space: nowrap;
}

.sa-meta__value {
	color: var(--bs-body-color);
	font-weight: 600;
	min-width: 0;
	overflow-wrap: break-word;
	word-break: break-all;
}

.sa-divider {
	border: 0;
	border-top: 1px solid var(--bs-border-color);
	margin: 2rem 0;
	opacity: 0.75;
}

.sa-acc-badge {
	min-width: 88px;
	text-align: center;
	font-size: .75rem;
}

.sa-acc-badge {
	transition:
		background-color 1100ms ease,
		color 1100ms ease,
		opacity 1100ms ease,
		transform 1100ms ease;
}

.sa-acc-badge.is-animating {
	transform: scale(1.15);
	opacity: 0.85;
}

.sa-login-title {
	letter-spacing: .08em;
	font-weight: 700;
}

.sa-login-meta {
	font-size: .95rem;
}

.sa-admin-tile {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	border: 1px solid var(--bs-border-color);
	border-radius: 0;
	text-decoration: none;
	color: inherit;
	transition: background .15s ease, box-shadow .15s ease;
}

.sa-admin-tile:hover {
	background: var(--sa-secondary-color);
	box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .06);
}

.sa-admin-tile-title {
	font-weight: 500;
}

.sa-admin-tile-subtitle {
	font-size: .85rem;
	opacity: .75;
	margin-top: .15rem;
}

.sa-action-badge {
	position: absolute;
	top: -10px;
	right: -10px;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 0;
	background: #dd0031;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .85rem;
	box-shadow: 0 .35rem .75rem rgba(0, 0, 0, .18);
}

.sa-action-summary .sa-action-badge {
	z-index: 2;
}

.sa-action-heading {
	font-weight: 600;
	font-size: 1.1rem;
	color: #1e2c44;
}

.sa-action-subheading {
	font-size: .9rem;
	color: var(--bs-gray-600);
	margin-top: .35rem;
}

.sa-action-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	border: 1px solid var(--bs-border-color);
	border-radius: 0;
	padding: 1.25rem .85rem;
	text-decoration: none;
	color: inherit;
	background: #ffffff;
	min-height: 150px;
	transition: background .15s ease, box-shadow .15s ease, border-color .15s ease, transform .15s ease;
	position: relative;
	overflow: hidden;
}

.sa-action-card:hover {
	background: #f8f9fa;
	border-color: #dfe3e7;
	box-shadow: 0 .35rem .85rem rgba(0, 0, 0, .12);
	transform: translateY(-2px);
}

.sa-action-card.is-complete {
	background: #e9f7e9;
	border-color: #cfe9cf;
}

.sa-action-card.is-complete:hover {
	background: #dff2df;
	border-color: #bfe2bf;
}

.sa-action-icon {
	width: 46px;
	height: 46px;
	border-radius: 0;
	background: #f3f5f7;
	color: var(--sa-primary-color);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	margin-bottom: .55rem;
	box-shadow: inset 0 0 0 2px #e2e6ea;
	position: relative;
}

.sa-action-icon .lni-check-circle-1 {
	font-size: 2.8rem;
	line-height: 1;
}

.sa-action-card.is-complete .sa-action-icon {
	background: #ffffff;
	color: #29b465;
	box-shadow: inset 0 0 0 2px #cfe9cf;
}

.sa-action-title {
	font-weight: 600;
	font-size: .95rem;
	margin-bottom: .2rem;
}

.sa-action-meta {
	font-size: .78rem;
	color: var(--bs-gray-600);
}

.form-check.sa-height-auto {
	min-height: auto;
}

/* #region Stepper */
.sa-stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 12px 0 18px;
}

.sa-step {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 0;
	border: 1px solid var(--bs-border-color, #e3e7eb);
	background: var(--bs-gray-100, #f7f8fa);
	color: var(--sa-muted, var(--bs-gray-700, #524A45));
	font-weight: 600;
	position: relative;
	flex: 1 1 260px;
}

.sa-step:hover {
	background: var(--bs-gray-200, #eef2f6);
}

.sa-step--active {
	background: var(--bs-body-bg, #ffffff);
	border-color: color-mix(in srgb, var(--sa-primary-color) 30%, transparent);
	color: var(--bs-body-color, #1A1715);
}

.sa-step--ready {
	background: var(--bs-gray-100, #f5f7f9);
	color: var(--bs-body-color, #2A2622);
}

.sa-step--locked {
	background: var(--bs-gray-100, #f1f4f7);
	color: var(--bs-gray-500, #847C70);
	cursor: not-allowed;
}

.sa-step__badge {
	width: 28px;
	height: 28px;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	background: var(--bs-gray-200, #D8D0C3);
	color: var(--sa-muted, var(--bs-gray-700, #524A45));
}

.sa-step--active .sa-step__badge {
	background: var(--sa-primary-color);
	color: var(--bs-white, #ffffff);
}

.sa-step--locked .sa-step__badge {
	background: var(--bs-gray-200, #D8D0C3);
	color: var(--bs-gray-500, #847C70);
}

.sa-step__label {
	font-size: 0.95rem;
}

.sa-step__hint {
	margin-left: auto;
	font-size: 0.75rem;
	color: var(--bs-gray-500, #847C70);
	font-weight: 600;
}

.sa-stepper-lock {
	border: 1px dashed var(--bs-border-color, #B5AB9D);
	border-radius: 0;
	padding: 20px;
	background: var(--bs-gray-100, #F8F6F3);
	color: var(--sa-muted, var(--bs-gray-600, #6E6660));
	text-align: center;
}

.sa-stepper-lock__title {
	font-weight: 700;
	margin-bottom: 4px;
	color: var(--bs-body-color, #2A2622);
}

.sa-stepper-lock__copy {
	font-size: 0.9rem;
}

@media (max-width: 768px) {
	.sa-step__hint {
		margin-left: 0;
	}
}

/* #endregion */

/* #region Bootstrap Datepicker Overrides*/
.datepicker.dropdown-menu {
	z-index: 1060;
	border: 1px solid var(--bs-border-color, #d7dde2);
	border-radius: 0;
	box-shadow: var(--bs-box-shadow-lg, 0 12px 28px rgba(15, 23, 42, 0.18));
	padding: 10px;
}

.datepicker {
	font-size: 0.9rem;
}

.datepicker table th,
.datepicker table td {
	width: 32px;
	height: 32px;
}

.datepicker table th {
	font-weight: 600;
	color: var(--sa-muted, var(--bs-gray-700, #524A45));
}

.datepicker table td.day {
	border-radius: 0;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.datepicker table tr td.day:hover,
.datepicker table tr td span:hover {
	background-color: var(--sa-seconday-color, var(--bs-gray-200, #D8D0C3));
}

.datepicker table tr td.active.active,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.focused:hover {
	background-color: var(--sa-primary-color);
	color: var(--bs-white, #ffffff);
	box-shadow: var(--bs-box-shadow, 0 6px 12px rgba(15, 23, 42, 0.18));
	background-image: none;
}

.datepicker table tr td.today,
.datepicker table tr td.today:hover:hover {
	position: relative;
	color: var(--sa-primary-color);
	background-color: var(--sa-seconday-color, var(--bs-gray-200, #e8f4f1));
	background-image: none;
}

.datepicker table tr td.today:before {
	content: "";
	position: absolute;
	inset: 6px;
	border: 1px solid var(--sa-primary-color);
	border-radius: 0;
	background-image: none !important;
}

.datepicker .datepicker-switch,
.datepicker .prev,
.datepicker .next {
	border-radius: 0;
}

.datepicker .datepicker-switch:hover,
.datepicker .prev:hover,
.datepicker .next:hover {
	background-color: var(--sa-seconday-color, var(--bs-gray-200, #D8D0C3));
}

/* #endregion */

/* #region */
.sa-back-to-clinic-btn {
	color: var(--sa-primary-color);
}

.sa-back-to-clinic-btn:hover {
	background-color: var(--sa-primary-color);
	color: var(--white-9);
}

/* #endregion */
.home-block {
	background: #fff;
	border: 1px solid #e9ecef;
}

.home-block i {
	color: var(--sa-primary-color);
	font-size: 1.2rem;
}

.header-element.d-none.d-lg-block {
	padding: 25px 20px;
}

/* Login Page Styles */
.login-hero-wrapper {
	min-height: 100vh;
}

.login-hero-wrapper .row {
	min-height: 100vh;
}

.login-hero-wrapper .col-lg-6 {
	min-height: 100vh;
}

.login-hero-section {
	background: linear-gradient(135deg, rgba(28, 113, 130, 0.95) 0%, rgba(76, 133, 152, 0.93) 50%, rgba(62, 188, 216, 0.91) 100%),
		radial-gradient(circle at 20% 50%, transparent 0%, rgba(255, 255, 255, 0.03) 2%, transparent 3%),
		radial-gradient(circle at 80% 20%, transparent 0%, rgba(255, 255, 255, 0.03) 2%, transparent 3%),
		radial-gradient(circle at 40% 80%, transparent 0%, rgba(255, 255, 255, 0.03) 2%, transparent 3%),
		#1C7182;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem 3rem;
	min-height: 100vh;
}

.login-hero-content {
	position: relative;
	color: white;
	max-width: 500px;
}

.login-hero-icon {
	font-size: 3rem;
	margin-bottom: 2rem;
}

.login-hero-title {
	font-size: 2.5rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	line-height: 1.2;
}

.login-hero-description {
	font-size: 1rem;
	line-height: 1.6;
	margin-bottom: 2rem;
	color: #e0e0e0;
}

.login-hero-features {
	list-style: none;
	padding: 0;
	margin: 2rem 0 0 0;
}

.login-hero-features li {
	padding: 0.75rem 0;
	display: flex;
	align-items: center;
	font-size: 0.95rem;
	color: #e0e0e0;
}

.login-hero-features li i {
	margin-right: 1rem;
	font-size: 1rem;
	color: #ffffff;
}

.login-form-section {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem 2rem;
	background: #FAFBFC;
	min-height: 100vh;
}

.login-form-container {
	width: 100%;
	max-width: 500px;
}

.login-form-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1B203E;
	margin-bottom: 0.5rem;
	text-align: center;
}

.login-form-subtitle {
	color: #626262;
	text-align: center;
	margin-bottom: 2.5rem;
	font-size: 0.9rem;
}

.login-card {
	background: white;
	padding: 20px;
}

.form-floating-custom {
	position: relative;
	margin-bottom: 1.25rem;
}

.form-floating-custom input {
	border-radius: 0;
	border: 1px solid #E4E9ED;
	padding: 0.875rem 1rem;
	font-size: 0.95rem;
	transition: border-color 0.2s;
}

.form-floating-custom input:focus {
	border-color: #4C8598;
	outline: none;
}

.login-actions {
	margin-bottom: 1.5rem;
}

.forgot-link {
	color: #4C8598;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 500;
}

.forgot-link:hover {
	text-decoration: underline;
}

.btn-login {
	width: 100%;
	padding: 0.875rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 0;
	background: #4C8598;
	border: none;
	color: white;
	margin-top: 1rem;
	transition: background-color 0.2s;
}

.btn-login:hover {
	background: #1C7182;
}

.btn-login:disabled {
	background: #4C8598;
	color: white;
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-clinic-login {
	width: 100%;
	padding: 0.875rem;
	font-size: 0.95rem;
	font-weight: 600;
	border-radius: 0;
	background: white;
	border: 1px solid #CBD5E0;
	color: #1B203E;
	transition: all 0.2s;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.btn-clinic-login:hover {
	border-color: #4C8598;
	background: #EDF2F7;
}

.divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 1.5rem 0;
	color: #999999;
	font-size: 0.8rem;
}

.divider::before,
.divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid #e0e0e0;
}

.divider span {
	padding: 0 1rem;
}

@media (max-width: 991px) {
	.login-hero-section {
		display: none;
	}

	.login-form-section {
		min-height: 100vh;
	}
}

@media (max-width: 576px) {
	.login-card {
		padding: 1.5rem 0;
	}

	.login-hero-title {
		font-size: 2rem;
	}
}

.login-help-text {
	font-size: 0.8rem;
}

.login-help-link {
	color: #4C8598;
	text-decoration: none;
}

.login-help-link:hover {
	text-decoration: underline;
}

.login-toggle-wrapper {
	text-align: center;
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e0e0e0;
}

.login-toggle-link {
	color: #666666;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: color 0.2s;
	display: inline-flex;
	align-items: center;
}

.login-toggle-link:hover {
	color: #4C8598;
}

.login-toggle-link i {
	font-size: 0.75rem;
}

/* Make toggle less noticeable - override previous styles */
.login-toggle-wrapper {
	text-align: right;
	margin-bottom: 1.5rem;
	padding-bottom: 0;
	border-bottom: none;
}

.login-toggle-link {
	color: #999999;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 400;
	transition: color 0.2s;
	display: inline-flex;
	align-items: center;
}

.login-toggle-link:hover {
	color: #666666;
}

.login-toggle-link i {
	font-size: 0.7rem;
}

/* Login Type Selector */
.login-type-selector {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2.5rem;
	border: none;
	border-radius: 0;
	overflow: hidden;
}

.login-type-btn {
	flex: 1;
	padding: 0.875rem 1rem;
	background: #ffffff;
	border: none;
	color: #718096;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	border-radius: 0.375rem;
}

.login-type-btn:last-child {
	border-right: none;
}

.login-type-btn i {
	font-size: 1.25rem;
	margin-bottom: 0.25rem;
}

.login-type-btn:hover {
	background: #EDF2F7;
	color: #1B203E;
}

.login-type-btn.active {
	background: #4C8598;
	color: #ffffff;
}

.login-type-btn.active:hover {
	background: #3EBCD8;
}

@media (max-width: 576px) {
	.login-type-btn {
		font-size: 0.75rem;
		padding: 0.75rem 0.5rem;
	}

	.login-type-btn i {
		font-size: 1rem;
	}

	.login-type-btn span {
		font-size: 0.7rem;
	}
}

/* Table Style Overrides */

table.dataTable tr td.dt-type-numeric,
table.dataTable tr td.dt-type-date {
	text-align: left !important;
}

table.dataTable.sa-comfortable td,
table.dataTable.sa-comfortable th,
table.sa-table td,
table.sa-table th {
	padding: 0.75rem 0.75rem;
	white-space: nowrap;
}

.sa-truncate-cell {
	display: inline-block;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: middle;
}

/* Directory table: stacked name+email cell */
.sa-cell-stack {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.sa-cell-stack__primary {
	font-weight: 600;
	white-space: nowrap;
}
.sa-cell-stack__secondary {
	font-size: 0.78rem;
	color: #8c8c8c;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 220px;
}

/* Directory table: pill badges */
.sa-pill {
	display: inline-block;
	padding: 0.15rem 0.5rem;
	border-radius: 50px;
	font-size: 0.75rem;
	font-weight: 500;
	white-space: nowrap;
	line-height: 1.4;
}
.sa-pill--info {
	background-color: rgba(var(--primary-rgb), 0.1);
	color: var(--sa-primary-color, #5b6abf);
}
.sa-pill--warning {
	background-color: rgba(245, 158, 11, 0.12);
	color: #b45309;
}
.sa-pill--subtle {
	background-color: rgba(107, 114, 128, 0.1);
	color: #6E6660;
}
.sa-pill--muted {
	background-color: transparent;
	color: #847C70;
	font-size: 0.72rem;
	padding: 0;
}
.sa-pill--outline {
	background-color: transparent;
	border: 1px solid #D8D0C3;
	color: #3D3833;
}
.sa-pill--success {
	background-color: rgba(16, 185, 129, 0.12);
	color: #047857;
}
.sa-pill--purple {
	background-color: rgba(139, 92, 246, 0.12);
	color: #6d28d9;
}
.sa-pill--danger {
	background-color: rgba(239, 68, 68, 0.1);
	color: #dc2626;
}

/* Dark mode pill overrides */
[data-theme-mode="dark"] .sa-cell-stack__secondary { color: #847C70; }
[data-theme-mode="dark"] .sa-pill--info { background-color: rgba(var(--primary-rgb), 0.2); color: #93a4f5; }
[data-theme-mode="dark"] .sa-pill--warning { background-color: rgba(245, 158, 11, 0.2); color: #fbbf24; }
[data-theme-mode="dark"] .sa-pill--subtle { background-color: rgba(156, 163, 175, 0.15); color: #847C70; }
[data-theme-mode="dark"] .sa-pill--muted { color: #6E6660; }
[data-theme-mode="dark"] .sa-pill--outline { border-color: #3D3833; color: #B5AB9D; }
[data-theme-mode="dark"] .sa-pill--success { background-color: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
[data-theme-mode="dark"] .sa-pill--purple { background-color: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
[data-theme-mode="dark"] .sa-pill--danger { background-color: rgba(239, 68, 68, 0.2); color: #fca5a5; }

/* Header styling lives in assets/css/components/table.css (modern light/quiet
   pattern). Previous navy rule removed as part of the platform-wide rollout. */

.sa-table+.dt-container .dt-processing,
.sa-table.dt-table .dt-processing,
.dt-container .dt-processing {
	background: none;
	border: 0;
	box-shadow: none;
	display: flex;
	justify-content: center;
	margin-top: 1rem;
}

.dt-processing>div:not(.sa-spinner) {
	display: none;
}

/* table-responsive rules moved to components/table.css */
.card-body {
	overflow: hidden;
}

/* Sticky first column for wide tables (e.g. email preferences) */
.sa-sticky-col-table {
	border-collapse: separate;
	border-spacing: 0;
}
.sa-sticky-col {
	position: sticky;
	left: 0;
	z-index: 1;
	background: #fff !important;
}
thead .sa-sticky-col,
.sa-table thead .sa-sticky-col {
	z-index: 2;
	background: #f6f7f9 !important;
	color: #6E6660 !important;
}
.table-responsive tbody tr:nth-child(even) .sa-sticky-col {
	background: #f4f4f4 !important;
}

.dt-info {
	text-align: center;
	padding: 10px 0;
}

.dt-search {
	text-align: left !important;
}

.dt-paging,
div.dt-container div.row div.col-md-7 {
	text-align: center !important;
}

/* ==============================================
   Border Radius Overrides - Interactive Elements
   ============================================== */

/* Buttons — zero border-radius everywhere */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-link,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark,
button[type="button"],
button[type="submit"] {
	border-radius: 0 !important;
}

.btn-sm {
	border-radius: 0 !important;
}

.btn-lg {
	border-radius: 0 !important;
}

/* Alerts — zero border-radius */
.alert,
.alert-primary,
.alert-secondary,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info,
.alert-light,
.alert-dark {
	border-radius: 0 !important;
}

/* Badges and pills */
.badge,
.badge-primary,
.badge-secondary,
.badge-success,
.badge-danger,
.badge-warning,
.badge-info,
.badge-light,
.badge-dark {
	border-radius: 0 !important;
}

.badge-pill,
.rounded-pill {
	border-radius: 0 !important;
}

/* Radio buttons and checkboxes */
.form-check-input[type="radio"] {
	border-radius: 50% !important;
}

.form-check-input[type="checkbox"] {
	border-radius: 0 !important;
}

/* Toast notifications */
.toast,
.toast-header,
.toast-body {
	border-radius: 0 !important;
}

/* Progress bars */
.progress {
	border-radius: 0 !important;
}

.progress-bar {
	border-radius: 0 !important;
}

/* Pagination */
.page-link {
	border-radius: 0 !important;
}

.pagination .page-item:first-child .page-link {
	border-radius: 0 !important;
}

.pagination .page-item:last-child .page-link {
	border-radius: 0 !important;
}

/* Step indicators / stepper badges */
.sa-step__badge,
.step-badge,
.stepper-badge {
	border-radius: 50% !important;
}

/* Circular icons and avatars */
.rounded-circle,
.avatar,
.avatar-circle {
	border-radius: 50% !important;
}

/* Status badges in forms */
.sa-section-status {
	border-radius: 0 !important;
}

/* Tooltips and popovers */
.tooltip,
.tooltip-inner,
.popover,
.popover-header,
.popover-body {
	border-radius: 0 !important;
}

/* Dropdown menus */
.dropdown-menu {
	border-radius: 0 !important;
}

.dropdown-item:first-child {
	border-radius: 0 !important;
}

.dropdown-item:last-child {
	border-radius: 0 !important;
}

/* List group items at edges */
.list-group-item:first-child {
	border-radius: 0 !important;
}

.list-group-item:last-child {
	border-radius: 0 !important;
}

/* Keep these flat - explicitly set to 0 */
.card,
.card-header,
.card-body,
.card-footer,
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea,
select,
.form-select,
.input-group,
.modal-content,
.modal-header,
.modal-body,
.modal-footer {
	border-radius: 0 !important;
}

/* ==============================================
   Order Form - Minimal Redesigned Styles
   ============================================== */

/* Order Type Selector */
.sa-order-type-selector {
	padding: 1.5rem;
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 0;
}

.sa-order-type-header h5 {
	font-size: 0.875rem;
	font-weight: 600;
	color: #525252;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.sa-order-type-header p {
	color: #737373;
}

.sa-order-type-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 0.75rem;
}

.sa-order-type-card {
	position: relative;
	display: block;
	cursor: pointer;
	margin: 0;
	transition: all 0.2s ease;
}

.sa-order-type-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sa-order-type-content {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 0;
	transition: all 0.2s ease;
}

.sa-order-type-card:hover .sa-order-type-content {
	border-color: var(--brand-color, #0d6efd);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sa-order-type-card.active .sa-order-type-content {
	border-color: var(--brand-color, #0d6efd);
	background: white;
	box-shadow: 0 1px 4px rgba(13, 110, 253, 0.15);
}

.sa-order-type-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	border-radius: 0;
	font-size: 1.25rem;
	color: #6c757d;
	transition: all 0.2s ease;
}

.sa-order-type-card.active .sa-order-type-icon {
	background: var(--brand-color, #0d6efd);
	color: white;
}

.sa-order-type-info {
	flex: 1;
}

.sa-order-type-title {
	font-size: 1.0625rem;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 0.25rem;
}

.sa-order-type-desc {
	font-size: 0.875rem;
	color: #6c757d;
	line-height: 1.4;
}

.sa-order-type-check {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #dee2e6;
	border-radius: 50%;
	color: transparent;
	font-size: 0.75rem;
	transition: all 0.2s ease;
}

.sa-order-type-card.active .sa-order-type-check {
	border-color: var(--brand-color, #0d6efd);
	background: var(--brand-color, #0d6efd);
	color: white;
}

/* Form Sections */
.sa-form-section {
	padding: 1.5rem;
	background: #fafafa;
	border: 1px solid #e5e5e5;
	border-radius: 0;
	transition: all 0.2s ease;
}

.sa-form-section:hover {
	border-color: #d4d4d4;
}

.sa-section-title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #525252;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e5e5e5;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.sa-section-title > span:first-child {
	display: flex;
	align-items: center;
}

.sa-section-title i {
	color: #737373;
	font-size: 0.875rem;
}

/* Section Status Badge */
.sa-section-status {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	font-weight: 500;
	padding: 0.25rem 0.625rem;
	border-radius: 1rem;
	transition: all 0.2s ease;
}

.sa-section-status.incomplete {
	background: #fee2e2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.sa-section-status.incomplete i {
	color: #ef4444;
}

.sa-section-status.complete {
	background: #d1fae5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.sa-section-status.complete i {
	color: #5F7058;
}

/* Signature Options */
.sa-signature-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 0.75rem;
}

.sa-signature-card {
	position: relative;
	display: block;
	cursor: pointer;
	margin: 0;
}

.sa-signature-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.sa-signature-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1rem;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 0;
	transition: all 0.2s ease;
}

.sa-signature-card:hover .sa-signature-content {
	border-color: var(--brand-color, #0d6efd);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.sa-signature-card.active .sa-signature-content {
	border-color: var(--brand-color, #0d6efd);
	background: white;
	box-shadow: 0 1px 4px rgba(13, 110, 253, 0.15);
}

.sa-signature-icon {
	font-size: 1.5rem;
	color: #6c757d;
	margin-bottom: 0.5rem;
	transition: all 0.2s ease;
}

.sa-signature-card.active .sa-signature-icon {
	color: var(--brand-color, #0d6efd);
}

.sa-signature-label {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #495057;
	margin-bottom: 0.25rem;
}

.sa-signature-desc {
	display: block;
	font-size: 0.8125rem;
	color: #6c757d;
}

/* Liability Section */
.sa-liability-section {
	padding: 1rem;
	background: #fff9f5;
	border: 1px solid #fee;
	border-radius: 0;
	animation: slideDown 0.2s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sa-liability-section .alert {
	border-radius: 0;
	border-width: 1px;
}

.sa-liability-section .form-check-input {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.125rem;
}

.sa-liability-section .form-check-label {
	font-size: 0.875rem;
	color: #495057;
}

/* Expedited Section */
.sa-expedited-section {
	animation: slideDown 0.2s ease;
}

.sa-fee-acceptance {
	padding: 0.875rem;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 0;
}

.sa-fee-acceptance .form-check-input {
	width: 1.125rem;
	height: 1.125rem;
	margin-top: 0.125rem;
}

.sa-fee-acceptance .form-check-label {
	font-size: 0.875rem;
}

/* Expedited Shipping Options */
.sa-expedited-options {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0;
}

.sa-expedited-option {
	flex: 1;
	border: 1px solid #d4d4d4;
	border-radius: 0;
	background: #fff;
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
}

.sa-expedited-option:hover {
	border-color: #a3a3a3;
}

.sa-expedited-option--selected {
	border-color: #404040;
	background: #fafafa;
	box-shadow: inset 0 0 0 1px #404040;
}

.sa-expedited-option__header {
	padding: 1rem 1.25rem;
	cursor: pointer;
}

.sa-expedited-option__header .form-check {
	margin-bottom: 0;
}

.sa-expedited-option__header .form-check-input {
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.125rem;
}

.sa-expedited-option__header .form-check-label {
	cursor: pointer;
}

.sa-expedited-option__body {
	padding: 0 1.25rem 1.25rem 2.75rem;
	display: none;
}

.sa-expedited-option--selected .sa-expedited-option__body {
	display: block;
}

.sa-expedited-divider {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 1.5rem;
}

.sa-expedited-divider::before,
.sa-expedited-divider::after {
	content: '';
	width: 1px;
	flex: 1;
	background: #d4d4d4;
}

.sa-expedited-divider span {
	padding: 0.5rem 0.75rem;
	font-weight: 700;
	font-size: 0.75rem;
	color: #525252;
	background: #f5f5f5;
	border-radius: 0;
	border: 1px solid #d4d4d4;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

@media (max-width: 992px) {
	.sa-expedited-options {
		flex-direction: column;
	}

	.sa-expedited-divider {
		flex-direction: row;
		padding: 1rem 0;
	}

	.sa-expedited-divider::before,
	.sa-expedited-divider::after {
		width: auto;
		height: 1px;
		flex: 1;
	}

	.sa-expedited-divider span {
		padding: 0.5rem 1rem;
	}
}

/* Form Labels with Icons */
.form-label i.text-primary {
	font-size: 0.9375rem;
}

/* Responsive */
@media (max-width: 768px) {
	.sa-order-type-grid {
		grid-template-columns: 1fr;
	}

	.sa-signature-options {
		grid-template-columns: 1fr;
	}

	.sa-form-section {
		padding: 1rem;
	}

	.sa-order-type-selector {
		padding: 1rem;
	}
}

/* Animation for conditional fields */
[data-container="container-patientName"],
[data-container="container-serviceDate"],
[data-container="container-requestedDeliveryDate"],
[data-container="container-shipping-method"],
[data-container="container-shipping-expedited"],
[data-container="container-liability-ack"] {
	transition: all 0.3s ease;
}

/* Alert Styling Improvements */
.sa-form-section .alert {
	border-radius: 0;
	border-left-width: 3px;
	font-size: 0.875rem;
}

.sa-form-section .alert-warning {
	background-color: #fff9f5;
	border-left-color: #fd7e14;
	border-color: #fee;
}

.sa-form-section .alert-info {
	background-color: #f8f9fa;
	border-left-color: #0d6efd;
	border-color: #e9ecef;
}

/* Small helper text */
small.text-muted {
	display: block;
	margin-top: 0.375rem;
	font-size: 0.8125rem;
}

small.text-muted i {
	font-size: 0.75rem;
}

/* NuVida Biosciences Alert Styles */
.nuvida-alert-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 9999;
	animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideInRight {
	from {
		transform: translateX(120%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.nuvida-alert {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-width: 350px;
	max-width: 500px;
	padding: 1rem 1.25rem;
	background: white;
	border-radius: 0.5rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
	border-left: 4px solid;
	position: relative;
	overflow: hidden;
}

.nuvida-alert::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.6;
	}
}

.nuvida-alert-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	flex-shrink: 0;
	font-size: 1.25rem;
}

.nuvida-alert-content {
	flex: 1;
	font-size: 0.95rem;
	line-height: 1.5;
	font-weight: 500;
}

.nuvida-alert-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border: none;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	opacity: 0.5;
	transition: all 0.2s;
	flex-shrink: 0;
}

.nuvida-alert-close:hover {
	opacity: 1;
	background: rgba(0, 0, 0, 0.05);
	transform: rotate(90deg);
}

/* Success Alert - NuVida Teal */
.nuvida-alert-success {
	border-left-color: #4C8598;
	color: #1B203E;
}

.nuvida-alert-success::before {
	background: linear-gradient(to bottom, #1C7182, #4C8598);
}

.nuvida-alert-success .nuvida-alert-icon {
	background: linear-gradient(135deg, #4C8598, #3EBCD8);
	color: white;
}

/* Error Alert - Medical Red */
.nuvida-alert-error {
	border-left-color: #dc2626;
	color: #1B203E;
}

.nuvida-alert-error::before {
	background: linear-gradient(to bottom, #b91c1c, #dc2626);
}

.nuvida-alert-error .nuvida-alert-icon {
	background: linear-gradient(135deg, #dc2626, #ef4444);
	color: white;
}

/* Responsive adjustments */
@media (max-width: 576px) {
	.nuvida-alert-container {
		top: 10px;
		right: 10px;
		left: 10px;
	}

	.nuvida-alert {
		min-width: auto;
		max-width: 100%;
	}
}

/* ==========================================================================
   Table Row Actions - Hover to reveal
   ========================================================================== */

.sa-row-actions-cell {
	width: 1%;
	white-space: nowrap;
	padding-right: 1rem !important;
}

.sa-row-actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	opacity: 0;
	transition: opacity 0.15s ease;
}

/* Show actions on row hover */
tr:hover .sa-row-actions {
	opacity: 1;
}

.sa-row-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.375rem 0.5rem;
	border-radius: 0.375rem;
	color: #6c757d;
	text-decoration: none;
	font-size: 0.75rem;
	font-weight: 500;
	background: transparent;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.sa-row-action i {
	font-size: 0.875rem;
}

.sa-row-action span {
	display: none;
	margin-left: 0.375rem;
}

.sa-row-action:hover {
	background: #EFEBE5;
	color: #0d6efd;
}

.sa-row-action:hover span {
	display: inline;
}

/* Alternative: Always show text but more compact */
@media (min-width: 1400px) {
	.sa-row-action {
		padding: 0.25rem 0.5rem;
		background: #f8f9fa;
		border: 1px solid #e9ecef;
	}

	.sa-row-action span {
		display: inline;
	}

	.sa-row-action:hover {
		background: #e7f1ff;
		border-color: #0d6efd;
		color: #0d6efd;
	}
}

/* ==========================================================================
   Dashboard Stats Cards
   ========================================================================== */

.sa-stats-dashboard {
	margin-bottom: 1.5rem;
}

.sa-stats-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.sa-stat-card {
	flex: 1;
	min-width: 180px;
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 0.5rem;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.sa-stat-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	border-color: #dee2e6;
}

.sa-stat-card--highlight {
	background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
	border-color: #fdba74;
}

.sa-stat-card--highlight:hover {
	border-color: #f97316;
}

.sa-stat-card--success {
	background: linear-gradient(135deg, #F2F5EE 0%, #DFE5D6 100%);
	border-color: #B5C5A8;
}

.sa-stat-card--success:hover {
	border-color: #7A8C6E;
}

.sa-stat-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.sa-stat-card__title {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #6E6660;
	margin: 0;
}

.sa-stat-card__icon {
	width: 36px;
	height: 36px;
	border-radius: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	background: #EFEBE5;
	color: #6E6660;
}

.sa-stat-card--highlight .sa-stat-card__icon {
	background: #fed7aa;
	color: #ea580c;
}

.sa-stat-card--success .sa-stat-card__icon {
	background: #C7D2B7;
	color: #5F7058;
}

.sa-stat-card--danger {
	background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
	border-color: #fca5a5;
}

.sa-stat-card--danger:hover {
	border-color: #ef4444;
}

.sa-stat-card--danger .sa-stat-card__icon {
	background: #fecaca;
	color: #dc2626;
}

.sa-stat-card__value {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1A1715;
	line-height: 1;
	margin-bottom: 0.5rem;
}

.sa-stat-card--highlight .sa-stat-card__value {
	color: #c2410c;
}

.sa-stat-card--success .sa-stat-card__value {
	color: #506046;
}

.sa-stat-card--danger .sa-stat-card__value {
	color: #b91c1c;
}

.sa-stat-card__subtitle {
	font-size: 0.8rem;
	color: #847C70;
}

.sa-stat-card__breakdown {
	display: flex;
	gap: 1rem;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #D8D0C3;
}

.sa-stat-card__breakdown-item {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.sa-stat-card__breakdown-label {
	font-size: 0.7rem;
	color: #847C70;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.sa-stat-card__breakdown-value {
	font-size: 1.125rem;
	font-weight: 600;
	color: #3D3833;
}

/* Carrier badges */
.sa-stat-card__carriers {
	display: flex;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.sa-carrier-badge {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 0.375rem;
	flex: 1;
}

.sa-carrier-badge__logo {
	font-weight: 700;
	font-size: 0.7rem;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
}

.sa-carrier-badge__logo--fedex {
	background: #4d148c;
	color: #fff;
}

.sa-carrier-badge__logo--ups {
	background: #351c15;
	color: #ffb500;
}

.sa-carrier-badge__count {
	font-size: 1rem;
	font-weight: 600;
	color: #3D3833;
}

.sa-carrier-badge__period {
	font-size: 0.7rem;
	color: #847C70;
}

/* Loading state */
.sa-stat-card--loading .sa-stat-card__value {
	background: linear-gradient(90deg, #D8D0C3 25%, #EFEBE5 50%, #D8D0C3 75%);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
	border-radius: 0.25rem;
	color: transparent;
	min-width: 60px;
}

@keyframes shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.sa-stat-card {
		min-width: 140px;
	}

	.sa-stat-card__value {
		font-size: 1.5rem;
	}

	.sa-stats-row {
		gap: 0.75rem;
	}
}

/* Wide stat card variant */
.sa-stat-card--wide {
	flex: 2;
	min-width: 320px;
}

/* Top Clinics List */
.sa-top-clinics__loading,
.sa-top-clinics__empty {
	text-align: center;
	color: #847C70;
	padding: 1rem;
	font-size: 0.875rem;
}

.sa-top-clinics__list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sa-top-clinics__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem;
	background: #F8F6F3;
	border-radius: 0.375rem;
	transition: background 0.15s ease;
}

.sa-top-clinics__item:hover {
	background: #EFEBE5;
}

.sa-top-clinics__rank {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
	background: #D8D0C3;
	color: #6E6660;
	flex-shrink: 0;
}

.sa-top-clinics__rank--gold {
	background: linear-gradient(135deg, #fbbf24, #C68A3A);
	color: #fff;
	box-shadow: 0 2px 4px rgba(251, 191, 36, 0.4);
}

.sa-top-clinics__rank--silver {
	background: linear-gradient(135deg, #B5AB9D, #847C70);
	color: #fff;
	box-shadow: 0 2px 4px rgba(156, 163, 175, 0.4);
}

.sa-top-clinics__rank--bronze {
	background: linear-gradient(135deg, #A87825, #b45309);
	color: #fff;
	box-shadow: 0 2px 4px rgba(180, 83, 9, 0.4);
}

.sa-top-clinics__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.sa-top-clinics__name {
	font-weight: 600;
	font-size: 0.875rem;
	color: #1A1715;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-top-clinics__meta {
	display: flex;
	gap: 0.75rem;
	font-size: 0.7rem;
	color: #6E6660;
}

.sa-top-clinics__stat {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.sa-top-clinics__stat i {
	font-size: 0.625rem;
}

.sa-top-clinics__total {
	font-size: 1.125rem;
	font-weight: 700;
	color: #1A1715;
	padding: 0.25rem 0.5rem;
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 0.375rem;
	min-width: 48px;
	text-align: center;
}

/* Full-width stat card */
.sa-stat-card--full-width {
	flex: 100%;
	min-width: 100%;
}

/* Map Container */
.sa-map-container {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.sa-map {
	width: 100%;
	height: 400px;
	border-radius: 0.5rem;
	border: 1px solid #D8D0C3;
	background: #EFEBE5;
}

.sa-map__error {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #847C70;
	font-size: 0.875rem;
}

/* Map Controls */
.sa-map-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.sa-map-toggle {
	display: flex;
	background: #EFEBE5;
	border-radius: 0.5rem;
	padding: 0.25rem;
	gap: 0.25rem;
}

.sa-map-toggle__btn {
	padding: 0.5rem 1rem;
	border: none;
	background: transparent;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #6E6660;
	cursor: pointer;
	transition: all 0.15s ease;
}

.sa-map-toggle__btn:hover {
	color: #3D3833;
	background: #D8D0C3;
}

.sa-map-toggle__btn--active {
	background: #fff;
	color: #1A1715;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sa-map-toggle__btn--active:hover {
	background: #fff;
}

.sa-map-filter {
	min-width: 200px;
}

.sa-map-filter .form-select {
	border-color: #D8D0C3;
	font-size: 0.875rem;
}

/* Patient status colors in info window */
.sa-map-info__clinic {
	color: #6E6660;
	font-size: 0.8rem;
}

.sa-map-info__status {
	margin-top: 0.25rem;
	font-size: 0.8rem;
	color: #3D3833;
}

/* Responsive map controls */
@media (max-width: 576px) {
	.sa-map-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.sa-map-toggle {
		width: 100%;
	}

	.sa-map-toggle__btn {
		flex: 1;
		text-align: center;
	}

	.sa-map-filter {
		width: 100%;
		min-width: auto;
	}
}

.sa-map-stats {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	padding: 0.75rem 1rem;
	background: #F8F6F3;
	border-radius: 0.375rem;
	border: 1px solid #D8D0C3;
}

.sa-map-stats__total {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-right: 1.5rem;
	border-right: 1px solid #D8D0C3;
}

.sa-map-stats__count {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1A1715;
	line-height: 1;
}

.sa-map-stats__label {
	font-size: 0.7rem;
	color: #6E6660;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sa-map-stats__breakdown {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	flex: 1;
}

.sa-map-stats__state {
	font-size: 0.8rem;
	color: #3D3833;
	white-space: nowrap;
}

.sa-map-stats__state strong {
	color: #1A1715;
}

/* Map Info Window */
.sa-map-info {
	padding: 0.5rem;
	max-width: 250px;
	font-size: 0.875rem;
	line-height: 1.5;
}

.sa-map-info strong {
	font-size: 0.9375rem;
	color: #1A1715;
}

.sa-map-info__location {
	color: #6E6660;
	font-style: italic;
}

.sa-map-info__address,
.sa-map-info__city {
	color: #3D3833;
}

.sa-map-info__phone {
	color: #3D3833;
	margin-top: 0.25rem;
	display: inline-block;
}

.sa-map-info__phone i {
	margin-right: 0.25rem;
}

/* Map Responsive */
@media (max-width: 768px) {
	.sa-map {
		height: 300px;
	}

	.sa-map-stats {
		flex-direction: column;
		align-items: flex-start;
	}

	.sa-map-stats__total {
		flex-direction: row;
		gap: 0.5rem;
		padding-right: 0;
		padding-bottom: 0.5rem;
		border-right: none;
		border-bottom: 1px solid #D8D0C3;
		width: 100%;
	}
}

/* ============================================
   Order Analytics Dashboard
   ============================================ */

.sa-analytics-summary {
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 0.5rem;
	padding: 1.25rem;
	text-align: center;
}

.sa-analytics-summary__value {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1A1715;
	line-height: 1.2;
}

.sa-analytics-summary__label {
	font-size: 0.8rem;
	color: #6E6660;
	margin-top: 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sa-analytics-chart-container {
	position: relative;
	height: 350px;
	width: 100%;
}

#clinicAnalyticsTable {
	margin-bottom: 0;
}

#clinicAnalyticsTable th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #6E6660;
	font-weight: 600;
	border-bottom-width: 2px;
}

#clinicAnalyticsTable td {
	vertical-align: middle;
}

.clinic-row {
	cursor: pointer;
	transition: background 0.15s ease;
}

.clinic-row:hover {
	background: #EFEBE5;
}

/* Drill-down modal styles */
#orderDrillDownModal .table th,
#orderItemsModal .table th {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #6E6660;
	font-weight: 600;
}

#orderDrillDownModal .badge,
#orderItemsModal .badge {
	font-weight: 500;
}

/* Responsive analytics */
@media (max-width: 768px) {
	.sa-analytics-summary__value {
		font-size: 1.5rem;
	}

	.sa-analytics-chart-container {
		height: 280px;
	}
}

/* ============================================
   Email Template Cards
   ============================================ */

.sa-template-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1rem;
}

.sa-template-cards__empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 3rem 2rem;
	text-align: center;
}

.sa-template-card {
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 0.5rem;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	transition: all 0.2s ease;
}

.sa-template-card:hover {
	border-color: #463C37;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.sa-template-card--inactive {
	opacity: 0.7;
	background: #F8F6F3;
}

.sa-template-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
}

.sa-template-card__name {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #1A1715;
	line-height: 1.3;
}

.sa-template-card__status {
	font-size: 0.7rem;
	font-weight: 500;
	padding: 0.25rem 0.5rem;
	border-radius: 9999px;
	white-space: nowrap;
	flex-shrink: 0;
}

.sa-template-card__status--active {
	background: #DFE5D6;
	color: #3F4D3A;
}

.sa-template-card__status--inactive {
	background: #EFEBE5;
	color: #6E6660;
}

.sa-template-card__key {
	font-size: 0.75rem;
}

.sa-template-card__key code {
	background: #EFEBE5;
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	color: #463C37;
	font-size: 0.7rem;
}

.sa-template-card__subject {
	font-size: 0.813rem;
	color: #6E6660;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-template-card__meta {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	min-height: 1.5rem;
}

.sa-template-card__actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid #D8D0C3;
}

.sa-template-card__actions .btn {
	flex: 1;
	font-size: 0.75rem;
	padding: 0.375rem 0.5rem;
}

/* Email Preview Frame */
.sa-preview-frame {
	min-height: 400px;
	background: #F8F6F3;
}

.login-hero-content * {
	color: #fff;
}

/* ============================================
   Admin Dashboard Stats
   ============================================ */

.sa-stats-dashboard {
	padding: 0;
}

/* Stats Row - Flex grid for stat cards */
.sa-stats-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

/* Individual Stat Card */
.sa-stat-card {
	flex: 1;
	min-width: 220px;
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 0;
	padding: 1rem;
	transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	display: flex;
	flex-direction: column;
}

.sa-stat-card:hover {
	border-color: #B5AB9D;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Wide stat card (for leaderboards) */
.sa-stat-card--wide {
	flex: 1 1 calc(50% - 0.5rem);
	min-width: 320px;
}

/* Card header with title and icon */
.sa-stat-card__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 0.5rem;
}

.sa-stat-card__title {
	font-size: 0.8rem;
	font-weight: 600;
	color: #6E6660;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	margin: 0;
}

.sa-stat-card__icon {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EFEBE5;
	border-radius: 0;
	color: #6E6660;
	font-size: 0.875rem;
}

/* Main stat value */
.sa-stat-card__value {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1A1715;
	line-height: 1.2;
	margin-bottom: 0.25rem;
}

/* Loading state */
.sa-stat-card--loading {
	color: #B5AB9D;
}

/* Subtitle under the value */
.sa-stat-card__subtitle {
	font-size: 0.75rem;
	color: #847C70;
	margin-bottom: 0;
}

/* Breakdown section (sub-stats) */
.sa-stat-card__breakdown {
	margin-top: auto;
	padding-top: 0.75rem;
	border-top: 1px solid #EFEBE5;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.sa-stat-card__breakdown-item {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.sa-stat-card__breakdown-label {
	font-size: 0.7rem;
	color: #847C70;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.sa-stat-card__breakdown-value {
	font-size: 1rem;
	font-weight: 600;
	color: #3D3833;
}

/* Card color variants */

/* Highlight - action needed / attention (amber tint) */
.sa-stat-card--highlight {
	border-left: 3px solid var(--sa-primary-color, #305e6d);
	background: #fffbeb;
}

.sa-stat-card--highlight .sa-stat-card__icon {
	background: rgba(var(--primary-rgb, 48, 94, 109), 0.1);
	color: var(--sa-primary-color, #305e6d);
}

.sa-stat-card--highlight .sa-stat-card__breakdown {
	border-top-color: #fef3c7;
}

/* Danger - urgent / negative (red tint) */
.sa-stat-card--danger {
	border-left: 3px solid #ef4444;
	background: #fef2f2;
}

.sa-stat-card--danger .sa-stat-card__icon {
	background: #fee2e2;
	color: #ef4444;
}

.sa-stat-card--danger .sa-stat-card__breakdown {
	border-top-color: #fecaca;
}

/* Success - positive / completed (green tint) */
.sa-stat-card--success {
	border-left: 3px solid #7A8C6E;
	background: #F2F5EE;
}

.sa-stat-card--success .sa-stat-card__icon {
	background: #DFE5D6;
	color: #7A8C6E;
}

.sa-stat-card--success .sa-stat-card__breakdown {
	border-top-color: #C7D2B7;
}

/* Info - in progress / informational (blue tint) */
.sa-stat-card--info {
	border-left: 3px solid #463C37;
	background: #EFEBE5;
}

.sa-stat-card--info .sa-stat-card__icon {
	background: #E8E0D4;
	color: #463C37;
}

.sa-stat-card--info .sa-stat-card__breakdown {
	border-top-color: #E8E0D4;
}

/* Muted - inactive / paused (gray tint) */
.sa-stat-card--muted {
	border-left: 3px solid #847C70;
	background: #F8F6F3;
}

.sa-stat-card--muted .sa-stat-card__icon {
	background: #EFEBE5;
	color: #6E6660;
}

.sa-stat-card--muted .sa-stat-card__breakdown {
	border-top-color: #D8D0C3;
}

/* Primary - brand accent (alias to info blue) */
.sa-stat-card--primary {
	border-left: 3px solid #463C37;
	background: #EFEBE5;
}

.sa-stat-card--primary .sa-stat-card__icon {
	background: #E8E0D4;
	color: #463C37;
}

.sa-stat-card--primary .sa-stat-card__breakdown {
	border-top-color: #E8E0D4;
}

/* ============================================
   Carrier Badges (Shipping Stats)
   ============================================ */

.sa-stat-card__carriers {
	display: flex;
	gap: 1rem;
	margin-top: 0.5rem;
}

.sa-carrier-badge {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 0;
	flex: 1;
}

.sa-carrier-badge__logo {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.25rem 0.5rem;
	border-radius: 0;
}

.sa-carrier-badge__logo--fedex {
	background: #4d148c;
	color: #fff;
}

.sa-carrier-badge__logo--ups {
	background: #351c15;
	color: #ffb500;
}

.sa-carrier-badge__count {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1A1715;
}

/* ============================================
   Top Clinics Leaderboard
   ============================================ */

.sa-top-clinics__loading {
	padding: 1rem;
	text-align: center;
	color: #847C70;
	font-size: 0.875rem;
}

.sa-top-clinics__empty {
	padding: 1.5rem 1rem;
	text-align: center;
	color: #847C70;
	font-size: 0.875rem;
}

.sa-top-clinics__list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sa-top-clinics__item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.625rem 0;
	border-bottom: 1px solid #EFEBE5;
}

.sa-top-clinics__item:last-child {
	border-bottom: none;
}

.sa-top-clinics__rank {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 700;
	color: #6E6660;
	background: #EFEBE5;
	border-radius: 0;
	flex-shrink: 0;
}

.sa-top-clinics__rank--gold {
	background: #fef3c7;
	color: #92400e;
}

.sa-top-clinics__rank--silver {
	background: #D8D0C3;
	color: #3D3833;
}

.sa-top-clinics__rank--bronze {
	background: #fed7aa;
	color: #9a3412;
}

.sa-top-clinics__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.sa-top-clinics__name {
	font-size: 0.875rem;
	font-weight: 500;
	color: #1A1715;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-top-clinics__meta {
	display: flex;
	gap: 0.75rem;
}

.sa-top-clinics__stat {
	font-size: 0.75rem;
	color: #6E6660;
}

.sa-top-clinics__stat i {
	margin-right: 0.125rem;
	font-size: 0.7rem;
}

.sa-top-clinics__total {
	font-size: 1.125rem;
	font-weight: 700;
	color: #1A1715;
	flex-shrink: 0;
}

/* ============================================
   Dashboard Responsive
   ============================================ */

@media (max-width: 768px) {
	.sa-stats-row {
		flex-direction: column;
	}

	.sa-stat-card {
		min-width: 100%;
	}

	.sa-stat-card--wide {
		flex: 1 1 100%;
		min-width: 100%;
	}

	.sa-stat-card__carriers {
		flex-direction: column;
	}

	.sa-stat-card__breakdown {
		flex-direction: column;
		gap: 0.5rem;
	}
}

/* ============================================
   Clinic Dashboard Styles
   ============================================ */

.sa-clinic-dashboard {
	padding-top: 1.5rem;
}

/* Welcome Header */
.sa-welcome-header {
	padding: 1.25rem 1.5rem;
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 6px;
}

.sa-welcome-header__logo {
	width: 56px;
	height: 56px;
	object-fit: contain;
	border-radius: 6px;
	background: #F8F6F3;
	padding: 6px;
	border: 1px solid #D8D0C3;
}

.sa-welcome-header__title {
	font-size: 1.375rem;
	font-weight: 600;
	color: #1A1715;
	margin: 0;
}

.sa-welcome-header__subtitle {
	font-size: 0.8125rem;
	color: #6E6660;
	margin: 0.25rem 0 0;
}

.sa-welcome-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.sa-header-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 6px;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #3D3833;
	text-decoration: none;
	transition: all 0.15s ease;
}

.sa-header-btn:hover {
	background: #EFEBE5;
	border-color: #B5AB9D;
	color: #1A1715;
	text-decoration: none;
}

.sa-header-btn i {
	font-size: 0.875rem;
	color: #6E6660;
}

.sa-header-btn--primary {
	background: #3D3833;
	border-color: #3D3833;
	color: #fff;
}

.sa-header-btn--primary:hover {
	background: #282320;
	border-color: #282320;
	color: #fff;
}

.sa-header-btn--primary i {
	color: #fff;
}

.sa-header-divider {
	width: 1px;
	height: 24px;
	background: #D8D0C3;
	margin: 0 0.5rem;
}

.sa-header-contact {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.8125rem;
	color: #6E6660;
	text-decoration: none;
	padding: 0.375rem 0.5rem;
	border-radius: 4px;
	transition: all 0.15s ease;
}

.sa-header-contact:hover {
	background: #EFEBE5;
	color: #1A1715;
	text-decoration: none;
}

.sa-header-contact i {
	font-size: 0.75rem;
}

.sa-header-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 6px;
	color: #6E6660;
	text-decoration: none;
	transition: all 0.15s ease;
}

.sa-header-icon-btn:hover {
	background: #EFEBE5;
	border-color: #B5AB9D;
	color: #3D3833;
	text-decoration: none;
}

.sa-header-icon-btn i {
	font-size: 0.875rem;
}

/* Clinic Header */
.sa-clinic-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.5rem;
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 8px;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.sa-clinic-header__info {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.sa-clinic-header__logo {
	width: 52px;
	height: 52px;
	object-fit: contain;
	border-radius: 8px;
	background: #F8F6F3;
	padding: 6px;
	border: 1px solid #D8D0C3;
}

.sa-clinic-header__text {
	display: flex;
	flex-direction: column;
}

.sa-clinic-header__name {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1A1715;
	margin: 0;
	line-height: 1.3;
}

.sa-clinic-header__website {
	font-size: 0.8125rem;
	color: #6E6660;
	text-decoration: none;
}
.sa-clinic-header__website:hover {
	color: var(--brand-color, #3D3833);
	text-decoration: underline;
}

.sa-clinic-header__date {
	font-size: 0.8125rem;
	color: #6E6660;
	margin: 0;
}

.sa-clinic-header__stats {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.sa-mini-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.5rem 1rem;
	background: #F8F6F3;
	border-radius: 6px;
	min-width: 70px;
	position: relative;
}

.sa-mini-stat__add {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #0d6efd;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.5rem;
	text-decoration: none;
	opacity: 0;
	transform: scale(0.8);
	transition: all 0.15s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.sa-mini-stat:hover .sa-mini-stat__add {
	opacity: 1;
	transform: scale(1);
}

.sa-mini-stat__add:hover {
	background: #0b5ed7;
	color: #fff;
	text-decoration: none;
	transform: scale(1.1);
}

.sa-mini-stat__value {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1A1715;
	line-height: 1;
}

.sa-mini-stat__label {
	font-size: 0.6875rem;
	color: #6E6660;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	margin-top: 0.25rem;
}

.sa-clinic-header__phone {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	background: #EFEBE5;
	border: 1px solid #E8E0D4;
	border-radius: 6px;
	color: #282320;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.15s ease;
}

.sa-clinic-header__phone:hover {
	background: #E8E0D4;
	color: #1A1715;
	text-decoration: none;
}

/* Actions Row */
.sa-actions-row {
	display: flex;
	gap: 0.75rem;
	align-items: stretch;
}

/* Primary CTA - Uses Clinic Brand Colors */
.sa-primary-cta {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 1rem 1.25rem;
	background: var(--brand-color, #0d6efd);
	border-radius: 0;
	text-decoration: none;
	color: #fff;
	transition: all 0.2s ease;
}

.sa-primary-cta:hover {
	filter: brightness(0.9);
	color: #fff;
	text-decoration: none;
}

.sa-primary-cta__icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255,255,255,0.15);
	border-radius: 0;
	font-size: 1rem;
	flex-shrink: 0;
}

.sa-primary-cta__content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.sa-primary-cta__title {
	font-size: 1rem;
	font-weight: 600;
}

.sa-primary-cta__desc {
	font-size: 0.75rem;
	opacity: 0.8;
}

.sa-primary-cta__arrow {
	font-size: 0.875rem;
	opacity: 0.6;
}

.sa-quick-actions-mini {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.sa-quick-action-mini {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 1rem;
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #3D3833;
	text-decoration: none;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.sa-quick-action-mini:hover {
	background: #F8F6F3;
	border-color: #B5AB9D;
	color: #1A1715;
	text-decoration: none;
}

.sa-quick-action-mini i {
	width: 16px;
	text-align: center;
	color: #6E6660;
}

/* Map Card Styles */
.sa-dashboard-card--map {
	height: 100%;
}

.sa-location-map--tall {
	height: 220px;
}

.sa-location-list--compact {
	padding: 0.5rem;
	max-height: 150px;
	overflow-y: auto;
}

.sa-location-item-inline {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.5rem 0.625rem;
	border-radius: 4px;
	transition: background 0.15s ease;
}

.sa-location-item-inline:hover {
	background: #F8F6F3;
}

.sa-location-item-inline--primary {
	background: #f0f9ff;
}

.sa-location-item-inline__marker {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #E8E0D4;
	border-radius: 50%;
	color: #282320;
	font-size: 0.75rem;
	flex-shrink: 0;
}

.sa-location-item-inline__marker--patient {
	background: #DFE5D6;
	color: #5F7058;
}

.sa-location-item-inline__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.sa-location-item-inline__name {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #1A1715;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-location-item-inline__address {
	font-size: 0.75rem;
	color: #6E6660;
}

.sa-location-item-inline__phone {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EFEBE5;
	border-radius: 50%;
	color: #6E6660;
	text-decoration: none;
	font-size: 0.75rem;
	transition: all 0.15s ease;
}

.sa-location-item-inline__phone:hover {
	background: #0d6efd;
	color: #fff;
}

/* Fixed Height Card Body */
.sa-dashboard-card__body--fixed {
	min-height: 280px;
	max-height: 280px;
	overflow-y: auto;
}

/* Empty State Compact */
.sa-empty-state--compact {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	text-align: center;
	min-height: 200px;
}

.sa-empty-state__icon-inline {
	font-size: 2rem;
	color: #B5AB9D;
	margin-bottom: 0.75rem;
}

/* Compact Activity Feed */
.sa-activity-feed--compact {
	display: flex;
	flex-direction: column;
}

.sa-activity-item-compact {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.75rem 0;
	border-bottom: 1px solid #EFEBE5;
}

.sa-activity-item-compact:last-child {
	border-bottom: none;
}

.sa-activity-item-compact__icon {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 0.75rem;
	flex-shrink: 0;
}

.sa-activity-item-compact__icon--info {
	background: #E8E0D4;
	color: #282320;
}

.sa-activity-item-compact__icon--success {
	background: #DFE5D6;
	color: #5F7058;
}

.sa-activity-item-compact__content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sa-activity-item-compact__title {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #1A1715;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-activity-item-compact__time {
	font-size: 0.6875rem;
	color: #847C70;
}

/* Horizontal Activity Feed - Full Width Layout */
.sa-activity-feed--horizontal {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.75rem;
}

.sa-activity-feed--horizontal .sa-activity-item-compact {
	padding: 0.75rem;
	background: #F8F6F3;
	border-radius: 6px;
	border-bottom: none;
}

.sa-activity-feed--horizontal .sa-activity-item-compact:last-child {
	border-bottom: none;
}

/* Onboarding Wizard */
.sa-onboarding-wizard {
	background: #fff;
	border-radius: 12px;
	border: 2px solid #dc2626;
	box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
	overflow: hidden;
}

.sa-onboarding-wizard__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.75rem;
	background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
	border-bottom: none;
}

.sa-onboarding-wizard__header-text {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.sa-onboarding-wizard__header-icon {
	font-size: 1.75rem;
	color: #fff;
}

.sa-onboarding-wizard__header-text strong {
	display: block;
	font-size: 1.2rem;
	color: #fff;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.sa-onboarding-wizard__header-text span {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 500;
}

/* Stepper Progress Bar */
.sa-onboarding-wizard__stepper {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem 1.5rem;
	gap: 0;
	border-bottom: 1px solid #D8D0C3;
}

.sa-wizard-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	outline: none;
	flex: 1;
	max-width: 200px;
}

.sa-wizard-step__circle {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	font-weight: 800;
	background: #fee2e2;
	color: #dc2626;
	border: 3px solid #fca5a5;
	transition: all 0.2s ease;
}

.sa-wizard-step--active .sa-wizard-step__circle {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
	box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.2);
	animation: sa-wizard-pulse 2s ease-in-out infinite;
}

@keyframes sa-wizard-pulse {
	0%, 100% { box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.2); }
	50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0.1); }
}

.sa-wizard-step--complete .sa-wizard-step__circle {
	background: #5F7058;
	color: #fff;
	border-color: #5F7058;
	animation: none;
}

.sa-wizard-step__label {
	font-size: 0.8rem;
	font-weight: 700;
	color: #847C70;
	text-align: center;
	line-height: 1.3;
	transition: color 0.2s ease;
}

.sa-wizard-step--active .sa-wizard-step__label {
	color: #dc2626;
	font-weight: 800;
}

.sa-wizard-step--complete .sa-wizard-step__label {
	color: #5F7058;
}

.sa-wizard-connector {
	flex: 1;
	height: 3px;
	background: #fca5a5;
	min-width: 40px;
	max-width: 120px;
	margin-bottom: 2rem;
	transition: background 0.2s ease;
}

.sa-wizard-connector--complete {
	background: #5F7058;
}

/* Wizard Step Content Panels */
.sa-onboarding-wizard__panels {
	padding: 0;
}

.sa-wizard-panel {
	display: none;
	padding: 1.5rem;
}

.sa-wizard-panel--active {
	display: block;
}

.sa-wizard-panel__complete {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: #F2F5EE;
	border-radius: 8px;
	border: 1px solid #C7D2B7;
}

.sa-wizard-panel__complete strong {
	display: block;
	color: #3F4D3A;
	font-size: 0.9375rem;
}

.sa-wizard-panel__complete p {
	margin: 0;
	font-size: 0.8125rem;
	color: #506046;
}

.sa-wizard-panel__check-circle {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #5F7058;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	flex-shrink: 0;
}

.sa-wizard-panel__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
}

.sa-wizard-panel__icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: #fef2f2;
	color: #dc2626;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	flex-shrink: 0;
	border: 1px solid #fecaca;
}

.sa-wizard-panel__info h6 {
	margin: 0 0 0.35rem 0;
	font-size: 1.05rem;
	font-weight: 800;
	color: #2A2622;
}

.sa-wizard-panel__info p {
	margin: 0 0 1rem 0;
	font-size: 0.875rem;
	color: #524A45;
	line-height: 1.6;
}

.sa-wizard-panel__actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	justify-content: center;
}

.sa-wizard-panel__actions .btn-primary {
	background: #dc2626 !important;
	border-color: #dc2626 !important;
	font-weight: 700;
	font-size: 0.9rem;
	padding: 0.5rem 1.25rem;
	box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.sa-wizard-panel__actions .btn-primary:hover {
	background: #b91c1c !important;
	border-color: #b91c1c !important;
	box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.sa-wizard-panel__nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #D8D0C3;
}

.sa-wizard-panel__nav .btn {
	font-weight: 600;
	font-size: 0.85rem;
	padding: 0.5rem 1.25rem;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.sa-wizard-panel__nav .btn-light {
	background: #EFEBE5;
	border: 1px solid #D8D0C3;
	color: #524A45;
}

.sa-wizard-panel__nav .btn-light:hover {
	background: #D8D0C3;
	color: #2A2622;
	transform: translateX(-2px);
}

.sa-wizard-panel__nav .btn-primary {
	background: #6E6660 !important;
	border-color: #6E6660 !important;
	color: #fff !important;
	box-shadow: none;
}

.sa-wizard-panel__nav .btn-primary:hover {
	background: #524A45 !important;
	border-color: #524A45 !important;
	transform: translateX(2px);
}

/* Onboarding Complete Banner */
.sa-onboarding-complete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.875rem 1.25rem;
	background: #F2F5EE;
	border: 1px solid #C7D2B7;
	border-radius: 8px;
}

.sa-onboarding-complete__content {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.sa-onboarding-complete__icon {
	font-size: 1.5rem;
	color: #5F7058;
}

.sa-onboarding-complete__content strong {
	display: block;
	color: #3F4D3A;
	font-size: 0.9375rem;
}

.sa-onboarding-complete__content span {
	font-size: 0.8125rem;
	color: #506046;
}

/* Quick Actions */
.sa-quick-actions {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
}

@media (max-width: 992px) {
	.sa-quick-actions {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	.sa-quick-actions {
		grid-template-columns: 1fr;
	}
}

.sa-quick-action {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border-radius: 4px;
	text-decoration: none;
	transition: all 0.15s ease;
	border: 1px solid #D8D0C3;
}

.sa-quick-action:hover {
	background: #F8F6F3;
	border-color: #B5AB9D;
}

.sa-quick-action--primary {
	background: #282320;
	border-color: #282320;
}

.sa-quick-action--primary:hover {
	background: #1A1715;
	border-color: #1A1715;
}

.sa-quick-action--primary .sa-quick-action__icon {
	background: rgba(255,255,255,0.15);
	color: #fff;
}

.sa-quick-action--primary .sa-quick-action__title,
.sa-quick-action--primary .sa-quick-action__desc {
	color: #fff;
}

.sa-quick-action--primary .sa-quick-action__desc {
	opacity: 0.8;
}

.sa-quick-action__icon {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EFEBE5;
	border-radius: 4px;
	font-size: 1.125rem;
	color: #524A45;
	flex-shrink: 0;
}

.sa-quick-action__content {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sa-quick-action__title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #1A1715;
}

.sa-quick-action__desc {
	font-size: 0.75rem;
	color: #6E6660;
}

/* Dashboard Card */
.sa-dashboard-card {
	background: #fff;
	border-radius: 4px;
	border: 1px solid #D8D0C3;
	overflow: hidden;
}

.sa-dashboard-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.875rem 1rem;
	background: #F8F6F3;
	border-bottom: 1px solid #D8D0C3;
}

.sa-dashboard-card__header--collapsible {
	cursor: pointer;
	transition: background 0.15s ease;
}

.sa-dashboard-card__header--collapsible:hover {
	background: #EFEBE5;
}

.sa-dashboard-card__title {
	font-size: 0.875rem;
	font-weight: 600;
	color: #1A1715;
	margin: 0;
	display: flex;
	align-items: center;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.sa-dashboard-card__title i {
	color: #6E6660;
}

.sa-dashboard-card__link {
	font-size: 0.75rem;
	color: #3D3833;
	text-decoration: none;
	font-weight: 500;
}

.sa-dashboard-card__link:hover {
	text-decoration: underline;
}

.sa-dashboard-card__toggle {
	color: #847C70;
	transition: transform 0.2s ease;
}

.sa-dashboard-card__body {
	padding: 1rem;
}

/* Empty State */
.sa-empty-state {
	text-align: center;
	padding: 2rem 1rem;
}

.sa-empty-state__icon {
	font-size: 2.5rem;
	color: #B5AB9D;
	margin-bottom: 0.75rem;
}

.sa-empty-state__text {
	font-size: 0.9375rem;
	color: #6E6660;
	margin-bottom: 1rem;
}

/* Shipment Cards */
.sa-shipments-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-height: 320px;
	overflow-y: auto;
}

.sa-shipment-card {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.75rem 1rem;
	background: #fff;
	border-radius: 4px;
	border: 1px solid #D8D0C3;
}

.sa-shipment-card__carrier {
	padding: 0.375rem 0.625rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	flex-shrink: 0;
}

.sa-shipment-card__carrier--fedex {
	background: #4d148c;
	color: #fff;
}

.sa-shipment-card__carrier--ups {
	background: #351c15;
	color: #ffb500;
}

.sa-shipment-card__carrier--other {
	background: #6E6660;
	color: #fff;
}

.sa-shipment-card__details {
	flex: 1;
	min-width: 0;
}

.sa-shipment-card__tracking {
	font-size: 0.875rem;
	font-weight: 500;
	color: #2A2622;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-shipment-card__tracking a {
	color: #0d6efd;
	text-decoration: none;
}

.sa-shipment-card__tracking a:hover {
	text-decoration: underline;
}

.sa-shipment-card__meta {
	font-size: 0.75rem;
	color: #6E6660;
	margin-top: 0.125rem;
}

.sa-shipment-card__status {
	text-align: right;
	flex-shrink: 0;
}

.sa-shipment-card__eta {
	font-size: 0.75rem;
	color: #6E6660;
	margin-top: 0.25rem;
}

/* Order Pipeline Cards */
.sa-pipeline-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-height: 520px;
	overflow-y: auto;
	padding-right: 0.25rem;
}

.sa-pipeline-list::-webkit-scrollbar {
	width: 4px;
}

.sa-pipeline-list::-webkit-scrollbar-track {
	background: transparent;
}

.sa-pipeline-list::-webkit-scrollbar-thumb {
	background: #B5AB9D;
	border-radius: 4px;
}

.sa-pipeline-card {
	border: 1px solid #D8D0C3;
	border-radius: 6px;
	overflow: hidden;
	transition: border-color 0.15s ease;
	flex-shrink: 0;
}

.sa-pipeline-card:hover {
	border-color: #B5AB9D;
}

.sa-pipeline-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.375rem 0.75rem;
	background: #F8F6F3;
	border-bottom: 1px solid #D8D0C3;
}

.sa-pipeline-card__badges {
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.sa-pipeline-card__date {
	font-size: 0.6875rem;
	color: #6E6660;
	font-weight: 500;
}

.sa-pipeline-card__body {
	padding: 0.5rem 0.75rem;
}

.sa-pipeline-card__main {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.sa-pipeline-card__patient {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #2A2622;
}

.sa-pipeline-card__location {
	font-size: 0.6875rem;
	color: #6E6660;
}

.sa-pipeline-card__products {
	font-size: 0.75rem;
	color: #524A45;
	margin-top: 0.125rem;
}

/* Pipeline Contents Accordion */
.sa-pipeline-contents {
	margin-top: 0.375rem;
}

.sa-pipeline-contents__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.6875rem;
	color: #6E6660;
	text-decoration: none;
	cursor: pointer;
	padding: 0.1875rem 0;
	transition: color 0.15s ease;
}

.sa-pipeline-contents__toggle:hover {
	color: #0d6efd;
	text-decoration: none;
}

.sa-pipeline-contents__arrow {
	font-size: 0.5rem;
	transition: transform 0.2s ease;
	margin-left: 0.125rem;
}

.sa-pipeline-contents__toggle[aria-expanded="true"] .sa-pipeline-contents__arrow {
	transform: rotate(180deg);
}

.sa-pipeline-contents__body {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin-top: 0.375rem;
	padding: 0.5rem;
	background: #F8F6F3;
	border-radius: 5px;
	border: 1px solid #D8D0C3;
}

/* Pipeline Product Items */
.sa-pipeline-product {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sa-pipeline-product + .sa-pipeline-product {
	padding-top: 0.375rem;
	border-top: 1px dashed #D8D0C3;
}

.sa-pipeline-product__header {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.375rem;
}

.sa-pipeline-product__lots {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	padding-left: 0.25rem;
}

.sa-pipeline-product__name {
	font-size: 0.75rem;
	font-weight: 600;
	color: #2A2622;
	display: inline-flex;
	align-items: center;
}

.sa-pipeline-product__qty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #0d6efd;
	color: #fff;
	font-size: 0.5625rem;
	font-weight: 700;
	padding: 0.0625rem 0.3125rem;
	border-radius: 9999px;
	margin-left: 0.25rem;
	min-width: 1rem;
	line-height: 1;
}

.sa-pipeline-product__tags {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.sa-pipeline-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.0625rem 0.375rem;
	border-radius: 3px;
	font-size: 0.625rem;
	font-weight: 500;
	font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
	letter-spacing: 0.01em;
}

.sa-pipeline-tag i {
	font-size: 0.5rem;
}

.sa-pipeline-tag--sku {
	background: #EFEBE5;
	color: #282320;
	border: 1px solid #E8E0D4;
}

.sa-pipeline-tag--lot {
	background: #F2F5EE;
	color: #506046;
	border: 1px solid #C7D2B7;
}

.sa-pipeline-card__tracking {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	margin-top: 0.375rem;
	padding-top: 0.375rem;
	border-top: 1px solid #EFEBE5;
}

.sa-pipeline-card__carrier {
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	flex-shrink: 0;
}

.sa-pipeline-card__carrier--fedex {
	background: #4d148c;
	color: #fff;
}

.sa-pipeline-card__carrier--ups {
	background: #351c15;
	color: #ffb500;
}

.sa-pipeline-card__carrier--usps {
	background: #004b87;
	color: #fff;
}

.sa-pipeline-card__tracking-link {
	font-size: 0.8125rem;
	color: #0d6efd;
	text-decoration: none;
}

.sa-pipeline-card__tracking-link:hover {
	text-decoration: underline;
}

@media (max-width: 576px) {
	.sa-pipeline-card__header {
		flex-wrap: wrap;
		gap: 0.375rem;
	}
	.sa-pipeline-card__date {
		flex: 1 1 100%;
	}
}

/* Status Pills */
.sa-status-pill {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 9999px;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.sa-status-pill--transit {
	background: #E8E0D4;
	color: #1A1715;
}

.sa-status-pill--delivered {
	background: #DFE5D6;
	color: #3F4D3A;
}

/* Location Map */
.sa-location-map {
	width: 100%;
	height: 200px;
	background: #EFEBE5;
}

.sa-location-list {
	padding: 0.75rem;
}

.sa-location-list--scrollable {
	max-height: 200px;
	overflow-y: auto;
}

.sa-location-item {
	padding: 0.75rem;
	border-radius: 6px;
	transition: background 0.2s ease;
}

.sa-location-item:hover {
	background: #F8F6F3;
}

.sa-location-item--primary {
	background: #f0f9ff;
	border-left: 3px solid #0d6efd;
}

.sa-location-item__name {
	font-size: 0.875rem;
	font-weight: 600;
	color: #2A2622;
	margin-bottom: 0.25rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.sa-location-item__address {
	font-size: 0.8125rem;
	color: #6E6660;
	line-height: 1.4;
}

.sa-location-item__phone {
	font-size: 0.8125rem;
	color: #6E6660;
	margin-top: 0.25rem;
}

.sa-location-item__phone a {
	color: #0d6efd;
	text-decoration: none;
}

.sa-location-item__sublabel {
	font-size: 0.75rem;
	color: #0d6efd;
	margin-top: 0.25rem;
}

.sa-location-item__phone a:hover {
	text-decoration: underline;
}

/* Badges */
.sa-badge {
	display: inline-block;
	padding: 0.125rem 0.5rem;
	border-radius: 4px;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	background: #D8D0C3;
	color: #524A45;
}

.sa-badge--primary {
	background: #E8E0D4;
	color: #282320;
}

.sa-badge--admin {
	background: #fef3c7;
	color: #b45309;
}

.sa-badge--provider {
	background: #DFE5D6;
	color: #3F4D3A;
}

/* Staff Grid */
.sa-staff-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.75rem;
}

@media (max-width: 1400px) {
	.sa-staff-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 1200px) {
	.sa-staff-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	.sa-staff-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.sa-staff-grid {
		grid-template-columns: 1fr;
	}
}

.sa-staff-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem;
	background: #F8F6F3;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.sa-staff-card:hover {
	background: #EFEBE5;
}

.sa-staff-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: #fff;
	flex-shrink: 0;
	overflow: hidden;
}

.sa-staff-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sa-staff-card__info {
	flex: 1;
	min-width: 0;
}

.sa-staff-card__name {
	font-size: 0.875rem;
	font-weight: 600;
	color: #2A2622;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-staff-card__role {
	display: flex;
	gap: 0.25rem;
	flex-wrap: wrap;
	margin-top: 0.25rem;
}

.sa-staff-card__contact {
	display: flex;
	gap: 0.5rem;
	flex-shrink: 0;
}

.sa-staff-card__contact a {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border-radius: 6px;
	color: #6E6660;
	transition: all 0.2s ease;
}

.sa-staff-card__contact a:hover {
	background: #0d6efd;
	color: #fff;
}

/* Warning stat card */
.sa-stat-card--warning {
	border-left: 3px solid #C68A3A;
	background: #fffbeb;
}

.sa-stat-card--warning .sa-stat-card__icon {
	background: #fef3c7;
	color: #C68A3A;
}

/* Clinic Dashboard Responsive */
@media (max-width: 768px) {
	.sa-welcome-header {
		padding: 1rem;
	}

	.sa-welcome-header__logo {
		width: 48px;
		height: 48px;
	}

	.sa-welcome-header__title {
		font-size: 1.25rem;
	}

	.sa-welcome-header__actions {
		justify-content: flex-start;
		margin-top: 1rem;
		padding-top: 1rem;
		border-top: 1px solid #D8D0C3;
	}

	.sa-header-btn span {
		display: none;
	}

	.sa-header-btn {
		padding: 0.5rem;
		min-width: 36px;
		justify-content: center;
	}

	.sa-header-btn--primary span {
		display: inline;
	}

	.sa-header-btn--primary {
		padding: 0.5rem 1rem;
	}

	.sa-header-divider {
		display: none;
	}

	.sa-header-contact span {
		display: none;
	}

	.sa-onboarding-wizard__stepper {
		padding: 1rem;
		gap: 0;
	}

	.sa-wizard-step__label {
		font-size: 0.625rem;
	}

	.sa-wizard-step__circle {
		width: 30px;
		height: 30px;
		font-size: 0.75rem;
	}

	.sa-wizard-connector {
		min-width: 20px;
		margin-bottom: 1.25rem;
	}

	.sa-wizard-panel {
		padding: 1rem;
	}

	.sa-wizard-panel__content {
		flex-direction: column;
		gap: 0.75rem;
	}

	.sa-onboarding-complete {
		flex-direction: column;
		gap: 0.75rem;
		text-align: center;
	}

	.sa-shipment-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.sa-shipment-card__status {
		text-align: left;
		display: flex;
		align-items: center;
		gap: 0.75rem;
	}

	/* New Clinic Header Responsive */
	.sa-clinic-header {
		flex-direction: column;
		padding: 1rem;
		gap: 1rem;
	}

	.sa-clinic-header__info {
		flex-direction: column;
		text-align: center;
	}

	.sa-clinic-header__logo {
		width: 56px;
		height: 56px;
	}

	.sa-clinic-header__name {
		font-size: 1.25rem;
	}

	.sa-clinic-header__date {
		font-size: 0.8rem;
	}

	.sa-clinic-header__stats {
		width: 100%;
		justify-content: center;
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.sa-mini-stat {
		flex: 1 1 45%;
		min-width: 100px;
		padding: 0.75rem;
		justify-content: center;
	}

	.sa-mini-stat__value {
		font-size: 1.25rem;
	}

	/* Actions Row Responsive */
	.sa-actions-row {
		flex-direction: column;
		gap: 0.75rem;
	}

	.sa-primary-cta {
		width: 100%;
		padding: 0.875rem 1rem;
	}

	.sa-primary-cta__icon {
		width: 36px;
		height: 36px;
		font-size: 0.9rem;
	}

	.sa-primary-cta__title {
		font-size: 0.9375rem;
	}

	.sa-quick-actions-mini {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.5rem;
		width: 100%;
	}

	.sa-quick-action-mini {
		flex: 1 1 calc(33.33% - 0.375rem);
		min-width: 100px;
		padding: 0.625rem 0.75rem;
		justify-content: center;
	}

	/* Maps Responsive */
	.sa-location-map--tall {
		min-height: 250px;
	}

	/* Location List Responsive */
	.sa-location-item-inline {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.sa-location-item-inline__badge {
		width: 100%;
		display: flex;
		justify-content: space-between;
	}

	/* Fixed Height Cards Responsive */
	.sa-dashboard-card__body--fixed {
		max-height: 280px;
	}

	.sa-shipments-list,
	.sa-delivery-calendar {
		max-height: 260px;
	}

	/* Staff Grid Responsive */
	.sa-staff-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 0.75rem;
	}

	.sa-staff-member__avatar {
		width: 48px;
		height: 48px;
		font-size: 1rem;
	}

	/* Compact Activity Feed Responsive */
	.sa-activity-item-compact {
		padding: 0.625rem 0;
	}

	.sa-activity-item-compact__icon {
		width: 28px;
		height: 28px;
		font-size: 0.7rem;
	}

	.sa-activity-item-compact__title {
		font-size: 0.8rem;
	}

	/* Empty State Compact */
	.sa-empty-state--compact {
		padding: 1.5rem;
	}

	.sa-empty-state--compact i {
		font-size: 2rem;
	}
}

/* Smaller mobile screens */
@media (max-width: 480px) {
	.sa-clinic-header__stats {
		flex-direction: column;
	}

	.sa-mini-stat {
		flex: 1 1 100%;
	}

	/* Quick Actions - Stack on very small screens */
	.sa-quick-actions-mini {
		flex-direction: column;
	}

	.sa-quick-action-mini {
		flex: 1 1 100%;
	}

	.sa-staff-grid {
		grid-template-columns: 1fr;
	}

	.sa-location-map--tall {
		min-height: 200px;
	}

	.sa-dashboard-card__header {
		padding: 0.75rem 1rem;
	}

	.sa-dashboard-card__body {
		padding: 0.75rem;
	}
}

/* Recent Activity Feed */
.sa-activity-feed {
	display: flex;
	flex-direction: column;
}

.sa-activity-item {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	padding: 0.875rem 0;
	border-bottom: 1px solid #f0f0f0;
}

.sa-activity-item:last-child {
	border-bottom: none;
}

.sa-activity-item__icon {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	flex-shrink: 0;
	font-size: 0.875rem;
	background: #EFEBE5;
	color: #6E6660;
}

.sa-activity-item__icon--info {
	background: #E8E0D4;
	color: #282320;
}

.sa-activity-item__icon--success {
	background: #DFE5D6;
	color: #3F4D3A;
}

.sa-activity-item__icon--warning {
	background: #fef3c7;
	color: #A87825;
}

.sa-activity-item__content {
	flex: 1;
	min-width: 0;
}

.sa-activity-item__title {
	font-size: 0.875rem;
	font-weight: 500;
	color: #1A1715;
	line-height: 1.4;
}

.sa-activity-item__subtitle {
	font-size: 0.75rem;
	color: #6E6660;
	margin-top: 0.125rem;
}

.sa-activity-item__time {
	font-size: 0.6875rem;
	color: #847C70;
	white-space: nowrap;
	flex-shrink: 0;
	text-align: right;
}

/* Upcoming Deliveries Calendar */
.sa-delivery-calendar {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sa-delivery-date-group {
	border: 1px solid #D8D0C3;
	border-radius: 4px;
	overflow: hidden;
}

.sa-delivery-date-group__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.625rem 0.875rem;
	background: #F8F6F3;
	border-bottom: 1px solid #D8D0C3;
}

.sa-delivery-date-group__date {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #1A1715;
}

.sa-delivery-date-group__count {
	font-size: 0.6875rem;
	color: #6E6660;
	text-transform: uppercase;
	letter-spacing: 0.025em;
}

.sa-delivery-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.625rem 0.875rem;
	border-bottom: 1px solid #f0f0f0;
}

.sa-delivery-item:last-child {
	border-bottom: none;
}

.sa-delivery-item__info {
	flex: 1;
	min-width: 0;
	overflow: hidden;
}

.sa-delivery-item__patient {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #2A2622;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-delivery-item__location {
	font-size: 0.6875rem;
	color: #6E6660;
	margin-top: 0.125rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sa-delivery-item__status {
	flex-shrink: 0;
	text-align: right;
}

@media (max-width: 576px) {
	.sa-delivery-item {
		flex-wrap: wrap;
		gap: 0.25rem;
	}

	.sa-delivery-item__info {
		flex: 1 1 100%;
	}

	.sa-delivery-item__status {
		flex: 1 1 100%;
		text-align: left;
	}
}

/* Status pill for pending */
.sa-status-pill--pending {
	background: #fef3c7;
	color: #b45309;
}

/* Responsive for activity and deliveries */
@media (max-width: 768px) {
	.sa-activity-item {
		flex-wrap: wrap;
	}

	.sa-activity-item__time {
		width: 100%;
		text-align: left;
		margin-top: 0.25rem;
		padding-left: 2.875rem;
	}
}

/* ============================================
   RELEASE NOTES PAGE
   ============================================ */
.release-hero {
	background: var(--sa-primary-color);
	position: relative;
	overflow: hidden;
}
.release-version-badge {
	font-size: 3rem;
	font-weight: 700;
	color: #fff;
	line-height: 1;
}
.release-version-sub {
	color: rgba(255,255,255,0.7);
	font-size: 0.875rem;
}
.release-highlight-pill {
	display: inline-flex;
	align-items: center;
	background: rgba(255,255,255,0.15);
	color: #fff;
	padding: 0.35rem 0.75rem;
	font-size: 0.8rem;
	margin: 0.25rem;
}
.release-highlight-pill i {
	margin-right: 0.4rem;
	opacity: 0.8;
}
.feature-card {
	border: 1px solid #e9ecef;
	background: #fff;
}
.feature-card-header {
	display: flex;
	align-items: center;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #f0f0f0;
	background: #fafafa;
}
.feature-card-icon {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 0.75rem;
	font-size: 1rem;
}
.feature-card-body {
	padding: 1rem 1.25rem;
}
.feature-item {
	display: flex;
	align-items: flex-start;
	padding: 0.4rem 0;
	font-size: 0.875rem;
	color: #666;
}
.feature-item i {
	margin-right: 0.6rem;
	margin-top: 0.15rem;
	font-size: 0.7rem;
}
.timeline-item {
	position: relative;
	padding-left: 1.5rem;
	padding-bottom: 1rem;
	border-left: 2px solid #e9ecef;
}
.timeline-item:last-child {
	border-left-color: transparent;
	padding-bottom: 0;
}
.timeline-item::before {
	content: '';
	position: absolute;
	left: -5px;
	top: 0;
	width: 10px;
	height: 10px;
	background: var(--sa-primary-color);
	border: 2px solid #fff;
}
.coming-soon-card {
	background: #f8f9fa;
	border: 1px dashed #dee2e6;
}
.stat-mini {
	text-align: center;
	padding: 1rem;
}
.stat-mini-value {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--sa-primary-color);
}
.stat-mini-label {
	font-size: 0.75rem;
	color: #6c757d;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.portal-section-title {
	display: flex;
	align-items: center;
	padding: 0.75rem 1rem;
	background: #f8f9fa;
	margin-bottom: 1rem;
}
.portal-section-title i {
	font-size: 1.25rem;
	margin-right: 0.75rem;
}

/* ============================================
   HELP CENTER PAGE
   ============================================ */
/* Tab Navigation */
.hc-tabs {
	display: inline-flex;
	background: #f5f5f5;
	padding: 4px;
	padding-bottom: 0;
	gap: 2px;
	border: 1px solid #e5e5e5;
	border-bottom: none;
	position: relative;
	list-style: none;
	margin: 0;
}
.hc-tabs .nav-item {
	display: flex;
}
.hc-tabs::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: #fff;
	z-index: 1;
	pointer-events: none;
}
.hc-tab {
	padding: 0.625rem 1.25rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #666;
	background: transparent;
	border: none;
	border-radius: 0;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: -1px;
	position: relative;
	z-index: 2;
}
.hc-tab:hover {
	color: #333;
	background: rgba(255,255,255,0.5);
}
.hc-tab.active {
	background: #fff;
	color: #1a1a1a;
	z-index: 3;
}
.hc-tab i {
	font-size: 0.75rem;
	opacity: 0.7;
}
.hc-tab.active i {
	opacity: 1;
}
.hc-card-container {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-top: none;
	padding: 1.5rem;
}
.hc-card {
	border: 1px solid #e5e5e5;
	padding: 1.5rem;
	margin-bottom: 1rem;
	background: #fff;
}
.hc-card-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	color: #666;
	margin-right: 1rem;
	flex-shrink: 0;
}
.hc-card-title {
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 0.25rem;
}
.hc-card-desc {
	font-size: 0.875rem;
	color: #666;
	line-height: 1.5;
}
.hc-steps {
	margin-top: 1rem;
	padding-left: 3.5rem;
}
.hc-step {
	display: flex;
	align-items: center;
	padding: 0.5rem 0;
	font-size: 0.875rem;
	color: #444;
}
.hc-step-num {
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	color: #666;
	font-size: 0.75rem;
	font-weight: 500;
	margin-right: 0.75rem;
	flex-shrink: 0;
}
.hc-video {
	border: 1px solid #e5e5e5;
	background: #fff;
	margin-bottom: 1rem;
	cursor: pointer;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.hc-video:hover {
	border-color: #ccc;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.hc-video-thumb {
	background: #f0f0f0;
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.hc-video-thumb i {
	color: #999;
	font-size: 1.5rem;
	transition: transform 0.15s;
}
.hc-video:hover .hc-video-thumb i {
	transform: scale(1.1);
	color: #666;
}
.hc-video-duration {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: #1a1a1a;
	color: #fff;
	padding: 2px 6px;
	font-size: 0.6875rem;
}
.hc-video-info {
	padding: 1rem;
}
.hc-video-cat {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	margin-bottom: 0.5rem;
}
.hc-video-title {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #1a1a1a;
	margin-bottom: 0.375rem;
}
.hc-video-desc {
	font-size: 0.8125rem;
	color: #666;
	line-height: 1.4;
}
#videoModal .modal-content {
	background: #000;
	border: none;
}
#videoModal .modal-header {
	border-bottom: none;
	padding: 0.75rem 1rem;
}
#videoModal .modal-title {
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 500;
}
#videoModal .btn-close {
	filter: invert(1);
	opacity: 0.7;
}
#videoModal .btn-close:hover {
	opacity: 1;
}
#videoModal .modal-body {
	padding: 0;
}
.video-container {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}
.video-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}
.hc-form {
	width: 100%;
}
.hc-form-label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
	display: block;
}
.hc-form-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #e5e5e5;
	font-size: 0.9375rem;
	background: #fff;
}
.hc-form-input:focus {
	outline: none;
	border-color: #1a1a1a;
}
.hc-form-input::placeholder {
	color: #aaa;
}
.hc-form-textarea {
	resize: vertical;
	min-height: 120px;
}
.hc-form-hint {
	font-size: 0.75rem;
	color: #888;
	margin-top: 0.375rem;
}
.hc-form-row {
	margin-bottom: 1.25rem;
}
.hc-cat-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}
.hc-cat-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border: 1px solid #e5e5e5;
	cursor: pointer;
	background: #fff;
	transition: all 0.15s;
}
.hc-cat-btn:hover {
	border-color: #ccc;
	background: #fafafa;
}
.hc-cat-btn.active {
	border-color: #1a1a1a;
	background: #1a1a1a;
}
.hc-cat-btn i {
	font-size: 0.875rem;
	color: #666;
}
.hc-cat-btn.active i {
	color: #fff;
}
.hc-cat-btn span {
	font-size: 0.8125rem;
	color: #444;
}
.hc-cat-btn.active span {
	color: #fff;
}
.hc-priority {
	display: flex;
	gap: 1.5rem;
}
.hc-priority label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #444;
	cursor: pointer;
}
.hc-priority input {
	accent-color: #1a1a1a;
}
.hc-btn {
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	border: none;
	cursor: pointer;
	transition: background 0.15s;
}
.hc-btn-primary {
	background: #1a1a1a;
	color: #fff;
}
.hc-btn-primary:hover {
	background: #333;
}
.hc-btn-secondary {
	background: #f5f5f5;
	color: #444;
}
.hc-btn-secondary:hover {
	background: #e5e5e5;
}
.hc-readonly {
	display: flex;
	gap: 1rem;
}
.hc-readonly-field {
	flex: 1;
}
.hc-readonly-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #e5e5e5;
	font-size: 0.9375rem;
	background: #f9f9f9;
	color: #666;
}
.hc-success {
	text-align: center;
	padding: 3rem 1rem;
}
.hc-success-icon {
	width: 56px;
	height: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	margin: 0 auto 1.5rem;
}
.hc-success-icon i {
	font-size: 1.25rem;
	color: #1a1a1a;
}
.hc-success h3 {
	font-size: 1.125rem;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
}
.hc-success p {
	font-size: 0.875rem;
	color: #666;
	margin-bottom: 1.5rem;
}

/* Wiki Layout */
.wiki-container {
	display: flex;
	gap: 0;
	min-height: calc(100vh - 250px);
	max-height: calc(100vh - 250px);
	border: 1px solid #e5e5e5;
	border-top: none;
	background: #fff;
	overflow: hidden;
}
.wiki-sidebar {
	width: 280px;
	flex-shrink: 0;
	border-right: 1px solid #e5e5e5;
	background: #fafafa;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}
.wiki-content {
	flex: 1;
	padding: 2rem;
	overflow-y: auto;
}
.wiki-nav-category {
	border-bottom: 1px solid #e5e5e5;
}
.wiki-nav-category:last-child {
	border-bottom: none;
}
.wiki-nav-header {
	display: flex;
	align-items: center;
	padding: 0.875rem 1rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #1a1a1a;
	cursor: pointer;
	transition: background 0.15s;
}
.wiki-nav-header:hover {
	background: #f0f0f0;
}
.wiki-nav-header i {
	width: 20px;
	margin-right: 0.625rem;
	color: #666;
	font-size: 0.75rem;
}
.wiki-nav-header .wiki-chevron {
	margin-left: auto;
	font-size: 0.625rem;
	color: #999;
	transition: transform 0.2s;
}
.wiki-nav-category.open .wiki-nav-header .wiki-chevron {
	transform: rotate(90deg);
}
.wiki-nav-items {
	display: none;
	padding-bottom: 0.5rem;
}
.wiki-nav-category.open .wiki-nav-items {
	display: block;
}
.wiki-nav-item {
	display: block;
	padding: 0.5rem 1rem 0.5rem 2.75rem;
	font-size: 0.8125rem;
	color: #555;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.15s;
	border-left: 2px solid transparent;
	line-height: 1.3;
	word-wrap: break-word;
}
.wiki-nav-item:hover {
	background: #f0f0f0;
	color: #1a1a1a;
}
.wiki-nav-item.active {
	background: #fff;
	color: #1a1a1a;
	border-left-color: #1a1a1a;
	font-weight: 500;
}
.wiki-section {
	display: none;
}
.wiki-section.active {
	display: block;
}
.wiki-section-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 0.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid #e5e5e5;
}
.wiki-section-category {
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	margin-bottom: 0.5rem;
}
.wiki-section-content {
	font-size: 0.9375rem;
	color: #444;
	line-height: 1.7;
	margin-bottom: 1.5rem;
}
.wiki-steps {
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	padding: 1.25rem;
	margin-top: 1.5rem;
}
.wiki-steps-title {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
	margin-bottom: 1rem;
}
.wiki-step {
	display: flex;
	align-items: flex-start;
	padding: 0.5rem 0;
	font-size: 0.875rem;
	color: #444;
	line-height: 1.5;
}
.wiki-step-num {
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1a1a1a;
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 600;
	margin-right: 0.75rem;
	flex-shrink: 0;
}
.wiki-nav-footer {
	padding: 1rem;
	border-top: 1px solid #e5e5e5;
	background: #f5f5f5;
	margin-top: auto;
}
.wiki-nav-footer-text {
	font-size: 0.75rem;
	color: #888;
	text-align: center;
}
@media (max-width: 992px) {
	.wiki-container {
		flex-direction: column;
		max-height: none;
	}
	.wiki-sidebar {
		width: 100%;
		max-height: 250px;
		border-right: none;
		border-bottom: 1px solid #e5e5e5;
	}
	.wiki-content {
		max-height: none;
	}
}

/* Search Styles */
.wiki-search-box {
	padding: 0.75rem;
	border-bottom: 1px solid #e5e5e5;
	background: #fff;
}
.wiki-search-box .hc-search-wrapper {
	margin-bottom: 0;
}
.wiki-search-box .hc-search-input {
	font-size: 0.8125rem;
	padding: 0.5rem 0.75rem 0.5rem 2rem;
}
.wiki-search-box .hc-search-icon {
	left: 0.625rem;
	font-size: 0.75rem;
}
.hc-search-wrapper {
	position: relative;
	margin-bottom: 1rem;
}
.hc-search-input {
	width: 100%;
	padding: 0.625rem 1rem 0.625rem 2.5rem;
	border: 1px solid #e5e5e5;
	font-size: 0.875rem;
	background: #fff;
	transition: border-color 0.15s;
}
.hc-search-input:focus {
	outline: none;
	border-color: #1a1a1a;
}
.hc-search-input::placeholder {
	color: #999;
}
.hc-search-icon {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
	font-size: 0.8125rem;
	pointer-events: none;
}
.hc-search-clear {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: #999;
	font-size: 0.75rem;
	cursor: pointer;
	display: none;
	padding: 0.25rem;
}
.hc-search-clear:hover {
	color: #666;
}
.hc-search-wrapper.has-value .hc-search-clear {
	display: block;
}
.hc-no-results {
	text-align: center;
	padding: 2rem;
	color: #888;
	font-size: 0.875rem;
	display: none;
}
.hc-video.hidden,
.video-item.hidden,
.wiki-nav-item.hidden,
.wiki-nav-category.hidden {
	display: none !important;
}

/* ============================================
   CONSOLIDATED PAGE-SPECIFIC STYLES
   ============================================ */

/* ENTITY ADMIN CLINIC EMAIL PREFERENCES PAGE */
.sa-underline-tabs {
	border-bottom: 2px solid #dee2e6;
	gap: 0;
	border-radius: 0;
}

.sa-underline-tabs .nav-item {
	margin-bottom: -2px;
}

.sa-underline-tabs .nav-link {
	border: none;
	border-bottom: 2px solid transparent;
	border-radius: 0 !important;
	color: #6c757d;
	font-weight: 500;
	padding: 0.75rem 1rem;
	transition: all 0.2s ease;
}

.sa-underline-tabs .nav-link:hover {
	color: var(--sa-primary-color, #0d6efd);
	border-bottom-color: #dee2e6;
}

.sa-underline-tabs .nav-link.active {
	color: var(--sa-primary-color, #0d6efd);
	border-bottom-color: var(--sa-primary-color, #0d6efd);
	background: transparent;
}

#emailPrefsTable .form-check-input {
	border: 2px solid #dee2e6;
	transition: all 0.2s ease;
}

#emailPrefsTable .form-check-input:checked {
	background-color: var(--sa-primary-color, #0d6efd);
	border-color: var(--sa-primary-color, #0d6efd);
}

#emailPrefsTable .form-check-input:focus {
	box-shadow: 0 0 0 0.2rem rgba(var(--sa-primary-rgb, 13, 110, 253), 0.25);
}

#emailPrefsTable .form-check-input:disabled {
	opacity: 0.5;
	cursor: wait;
}

#emailPrefsTable tbody tr:hover {
	background-color: #f8f9fa !important;
}

#emailPrefsTable thead th {
	font-size: 0.8rem;
	font-weight: 600;
	vertical-align: middle;
	text-transform: none;
	letter-spacing: 0;
}

/* ENTITY ADMIN EMAIL ENGINE PAGE */
.sa-recipient-option {
	display: flex;
	align-items: center;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s;
}
.sa-recipient-option:hover {
	background: #f8f9fa;
}
.sa-recipient-option input {
	margin-right: 0.5rem;
}
.sa-recipient-option .badge {
	margin-left: auto;
	font-size: 0.7rem;
}

/* ENTITY ADMIN CLINIC SIGNUPS PAGE */
.sa-copy-url-box {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: 1px solid #dee2e6;
	border-radius: 4px;
	padding: 0.25rem 0.5rem;
}

.sa-copy-url-text {
	font-size: 0.75rem;
	color: #495057;
	background: transparent;
}

.sa-copy-url-box .btn {
	padding: 0.15rem 0.4rem;
	font-size: 0.75rem;
}

/* DOCUMENT LIBRARY FILE ICONS */
.file-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 1.25rem;
}
.file-icon.pdf { background: #ffebee; color: #c62828; }
.file-icon.doc { background: #e3f2fd; color: #1565c0; }
.file-icon.xls { background: #e8f5e9; color: #2e7d32; }
.file-icon.img { background: #fff3e0; color: #ef6c00; }
.file-icon.default { background: #f5f5f5; color: #757575; }

/* ENTITY ADMIN DOCUMENT LIBRARY PAGE */
.sa-file-icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 1.25rem;
}
.sa-file-icon.pdf { background: #ffebee; color: #c62828; }
.sa-file-icon.doc { background: #e3f2fd; color: #1565c0; }
.sa-file-icon.xls { background: #e8f5e9; color: #2e7d32; }
.sa-file-icon.img { background: #fff3e0; color: #ef6c00; }
.sa-file-icon.default { background: #f5f5f5; color: #757575; }

.sa-doc-lib-tabs .nav-link {
	color: #6c757d;
	border: none !important;
	border-bottom: 2px solid transparent !important;
	border-radius: 0 !important;
	padding: 0.75rem 1rem;
	font-weight: 500;
	background: transparent !important;
}
.sa-doc-lib-tabs .nav-link:hover {
	color: var(--sa-primary-color, #0d6efd);
	border-bottom-color: #dee2e6;
}
.sa-doc-lib-tabs .nav-link.active {
	color: var(--sa-primary-color, #0d6efd);
	border-bottom-color: var(--sa-primary-color, #0d6efd) !important;
	background: transparent !important;
}

.sa-clinic-select-wrapper {
	min-width: 250px;
}
.sa-clinic-select-wrapper .form-select {
	border-color: #dee2e6;
	font-size: 0.875rem;
}
.sa-clinic-select-wrapper .form-select:focus {
	border-color: var(--sa-primary-color, #0d6efd);
	box-shadow: 0 0 0 0.2rem rgba(var(--sa-primary-rgb, 13, 110, 253), 0.15);
}

/* ENTITY ADMIN ALL PURCHASE AGREEMENTS PAGE */

/* Agreement details summary */
.sa-status-details {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	background: #f8f9fa;
	border-radius: 8px;
	padding: 0.75rem;
	margin-bottom: 1.25rem;
	border: 1px solid #e9ecef;
}
.sa-status-details__item {
	padding: 0.5rem 0.75rem;
}
.sa-status-details__label {
	display: block;
	font-size: 0.75rem;
	color: #6c757d;
	margin-bottom: 2px;
}
.sa-status-details__value {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #212529;
}

/* Status radio options */
.sa-status-options {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.sa-status-option {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.15s ease;
	margin: 0;
}
.sa-status-option:hover {
	border-color: #adb5bd;
	background: #f8f9fa;
}
.sa-status-option:has(input:checked) {
	border-color: var(--sa-primary-color, #667eea);
	background: rgba(102, 126, 234, 0.04);
}
.sa-status-option .form-check-input {
	margin: 0;
	flex-shrink: 0;
}
.sa-status-option__body {
	display: flex;
	align-items: center;
	gap: 0.625rem;
}
.sa-status-option__desc {
	font-size: 0.813rem;
	color: #6c757d;
}

/* INTACCT IMPORT PAGE */
.intacct-import-status {
	font-size: 0.875rem;
}
.intacct-import-status .progress-bar {
	transition: width 0.3s ease;
}

/* CLINICS DOCUMENT LIBRARY PAGE */
.sa-file-icon-clinic {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 1.25rem;
}
.sa-file-icon-clinic.pdf { background: #ffebee; color: #c62828; }
.sa-file-icon-clinic.doc { background: #e3f2fd; color: #1565c0; }
.sa-file-icon-clinic.xls { background: #e8f5e9; color: #2e7d32; }
.sa-file-icon-clinic.img { background: #fff3e0; color: #ef6c00; }
.sa-file-icon-clinic.default { background: #f5f5f5; color: #757575; }

/* CLINICS RESOURCES PAGE */
.sa-resource-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1.5rem;
	margin-bottom: 1rem;
	background: #fff;
}
.sa-resource-card h5 {
	margin-bottom: 0.75rem;
}
.sa-download-item {
	display: flex;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f0f0f0;
}
.sa-download-item:last-child {
	border-bottom: none;
}
.sa-code-table {
	font-size: 0.875rem;
}
.sa-criteria-list {
	padding-left: 1.25rem;
	margin-bottom: 0;
}
.sa-criteria-list li {
	margin-bottom: 0.25rem;
}

/* CLINICS RELEASE NOTES PAGE */
.sa-release-hero {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	padding: 3rem 2rem;
	border-radius: 12px;
	margin-bottom: 2rem;
}
.sa-release-hero h1 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}
.sa-release-hero p {
	opacity: 0.9;
	margin-bottom: 0;
}
.sa-feature-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 1.5rem;
	height: 100%;
	transition: box-shadow 0.2s, transform 0.2s;
}
.sa-feature-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}
.sa-feature-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	margin-bottom: 1rem;
}
.sa-feature-icon.purple { background: #ede7f6; color: #7c4dff; }
.sa-feature-icon.blue { background: #e3f2fd; color: #2196f3; }
.sa-feature-icon.green { background: #e8f5e9; color: #4caf50; }
.sa-feature-icon.orange { background: #fff3e0; color: #ff9800; }
.sa-timeline {
	position: relative;
	padding-left: 2rem;
}
.sa-timeline::before {
	content: '';
	position: absolute;
	left: 0.5rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #e5e5e5;
}
.sa-timeline-item {
	position: relative;
	padding-bottom: 1.5rem;
}
.sa-timeline-item::before {
	content: '';
	position: absolute;
	left: -1.5rem;
	top: 0.25rem;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #667eea;
	border: 2px solid #fff;
	box-shadow: 0 0 0 2px #667eea;
}
.sa-timeline-date {
	font-size: 0.75rem;
	color: #888;
	margin-bottom: 0.25rem;
}
.sa-timeline-content {
	font-size: 0.875rem;
}

/* CLINICS SET PASSWORD PAGE */
.password-checklist {
	margin: 0.75rem 0 0;
	padding: 0;
}
.checklist-item {
	display: flex;
	align-items: center;
	padding: 0.3rem 0;
	font-size: 0.85rem;
	color: #6c757d;
	transition: color 0.3s;
}
.checklist-icon {
	width: 20px;
	margin-right: 0.5rem;
	font-size: 0.7rem;
	transition: color 0.3s;
}
.checklist-item.completed {
	color: #198754;
}
.checklist-item.completed .checklist-icon {
	color: #198754;
	font-size: 0.85rem;
}
.password-success {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem;
	margin-top: 0.75rem;
	background: #d1e7dd;
	color: #198754;
	border-radius: 6px;
	font-weight: 600;
	font-size: 0.9rem;
}
.sa-password-strength {
	height: 4px;
	border-radius: 0;
	background: #e9ecef;
	overflow: hidden;
	margin-top: 0.5rem;
}
.sa-password-strength-bar {
	height: 100%;
	width: 0;
	transition: width 0.3s, background-color 0.3s;
}
.sa-password-strength-bar.weak { width: 25%; background: #dc3545; }
.sa-password-strength-bar.fair { width: 50%; background: #ffc107; }
.sa-password-strength-bar.good { width: 75%; background: #20c997; }
.sa-password-strength-bar.strong { width: 100%; background: #198754; }
.sa-password-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #6c757d;
	cursor: pointer;
	padding: 0.25rem;
}
.sa-password-toggle:hover {
	color: #495057;
}

/* CLINICS ORDERS INDEX PAGE */
.sa-pending-approval-card {
	border-left: 4px solid #ffc107;
}
.sa-pending-approval-card .card-header {
	background: #fff8e1;
}

/* CLINICS PURCHASE AGREEMENTS VIEW PAGE */
.sa-agreement-type-selector {
	padding: 2rem 1rem;
	max-width: 700px;
	margin: 0 auto;
}

.sa-agreement-type-header {
	margin-bottom: 2rem;
}

.sa-agreement-type-header h5 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #212529;
	margin-bottom: 0.25rem;
}

.sa-agreement-type-header p {
	font-size: 0.9375rem;
	margin-bottom: 0;
}

.sa-agreement-type-grid {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.sa-agreement-type-card {
	position: relative;
	display: block;
	cursor: pointer;
	margin: 0;
	text-decoration: none;
	color: inherit;
}

.sa-agreement-type-card:hover {
	text-decoration: none;
	color: inherit;
}

.sa-agreement-type-content {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem;
	background: white;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	transition: all 0.15s ease;
}

.sa-agreement-type-card:hover .sa-agreement-type-content {
	border-color: var(--brand-color, #0d6efd);
	background: #fafbff;
}

.sa-agreement-type-card.active .sa-agreement-type-content {
	border-color: var(--brand-color, #0d6efd);
	background: #f0f6ff;
	box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.sa-agreement-type-icon {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f3f5;
	border-radius: 8px;
	font-size: 1.25rem;
	color: #6c757d;
	transition: all 0.15s ease;
}

.sa-agreement-type-card.active .sa-agreement-type-icon {
	background: var(--brand-color, #0d6efd);
	color: white;
}

.sa-agreement-type-info {
	flex: 1;
	min-width: 0;
}

.sa-agreement-type-title {
	font-size: 1rem;
	font-weight: 600;
	color: #212529;
	margin-bottom: 0.25rem;
}

.sa-agreement-type-desc {
	font-size: 0.875rem;
	color: #6c757d;
	line-height: 1.4;
}

.sa-agreement-type-check {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	color: #dee2e6;
	transition: all 0.15s ease;
}

.sa-agreement-type-card.active .sa-agreement-type-check {
	color: var(--brand-color, #0d6efd);
}

.sa-agreement-type-actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 1rem;
	border-top: 1px solid #e9ecef;
}

.sa-agreement-type-actions .btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── Purchase Agreement: Form Hero Header ──────────────────────────── */
.pa-form-hero {
	display: flex;
	align-items: center;
	gap: 1.1rem;
	padding: 1.25rem 1.5rem;
	background: linear-gradient(135deg, #F8F6F3 0%, #EFEBE5 100%);
	border: 1px solid #D8D0C3;
	border-left: 4px solid var(--sa-primary-color, #305e6d);
	border-radius: 8px;
}
.pa-form-hero__icon {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--sa-primary-color, #305e6d);
	color: #fff;
	font-size: 1.4rem;
	border-radius: 10px;
	flex-shrink: 0;
	box-shadow: 0 4px 8px rgba(48,94,109,0.2);
}
.pa-form-hero__text {
	flex: 1;
	min-width: 0;
}
.pa-form-hero__eyebrow {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6E6660;
	margin-bottom: 0.15rem;
}
.pa-form-hero__title {
	font-size: 1.4rem;
	font-weight: 800;
	color: #1A1715;
	margin: 0;
	letter-spacing: -0.01em;
}
.pa-form-hero__status {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.85rem;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-radius: 6px;
	flex-shrink: 0;
}
.pa-form-hero__status--active   { background: #DFE5D6; color: #3F4D3A; border: 1px solid #C7D2B7; }
.pa-form-hero__status--draft    { background: #EFEBE5; color: #524A45; border: 1px solid #D8D0C3; }
.pa-form-hero__status--expired  { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.pa-form-hero__status--pending  { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

@media (max-width: 576px) {
	.pa-form-hero { padding: 1rem; gap: 0.75rem; }
	.pa-form-hero__icon { width: 42px; height: 42px; font-size: 1.1rem; }
	.pa-form-hero__title { font-size: 1.1rem; }
	.pa-form-hero__status { padding: 0.3rem 0.6rem; font-size: 0.62rem; }
}

/* ── Purchase Agreement: Form Section Container ────────────────────── */
#purchaseAgreementForm .sa-form-section {
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
	transition: box-shadow 0.15s ease;
}
#purchaseAgreementForm .sa-form-section:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* ── Purchase Agreement: Section Headers + Bulk Toolbar ────────────── */
.pa-section-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding-bottom: 0.85rem;
	margin-bottom: 0.75rem;
	border-bottom: 1px solid #D8D0C3;
}
.pa-section-header__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: #2A2622;
	flex-shrink: 0;
}
.pa-section-header__icon {
	color: var(--sa-primary-color, #305e6d);
	font-size: 1rem;
}
.pa-section-header__add {
	margin-left: 0.85rem;
}
.pa-section-header__actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-left: auto;
}
.pa-section-header__status {
	flex-shrink: 0;
	margin-left: auto;
}
/* When actions exist, they own margin-left:auto, so reset on status */
.pa-section-header__actions ~ .pa-section-header__status {
	margin-left: 0;
}

.pa-bulk-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 0.85rem;
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 8px;
	margin-bottom: 1rem;
}
.pa-bulk-toolbar__group {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}
.pa-bulk-toolbar__divider {
	width: 1px;
	height: 22px;
	background: #B5AB9D;
}
.pa-bulk-toolbar__label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #6E6660;
	margin-right: 0.15rem;
}
.pa-bulk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	height: 32px;
	padding: 0 0.85rem;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1;
	color: #524A45;
	background: #fff;
	border: 1px solid #B5AB9D;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.12s ease;
	white-space: nowrap;
}
.pa-bulk-btn:hover {
	border-color: var(--sa-primary-color, #305e6d);
	color: var(--sa-primary-color, #305e6d);
	background: #fff;
}
.pa-bulk-btn--primary {
	background: #524A45;
	color: #fff;
	border-color: #524A45;
}
.pa-bulk-btn--primary:hover {
	background: #3D3833;
	color: #fff;
	border-color: #3D3833;
}
.pa-bulk-btn i { font-size: 0.7rem; }

.pa-state-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.32rem 0.65rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--sa-primary-color, #305e6d);
	background: #fff;
	border: 1px solid #c7d2fe;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.12s ease;
	letter-spacing: 0.02em;
}
.pa-state-chip:hover {
	background: var(--sa-primary-color, #305e6d);
	color: #fff;
	border-color: var(--sa-primary-color, #305e6d);
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.pa-state-chip i { font-size: 0.62rem; opacity: 0.7; }
.pa-state-chip:hover i { opacity: 1; }

/* Form actions footer */
.pa-form-actions {
	margin-top: 1.5rem;
	padding: 1.25rem 1.5rem;
	background: #F8F6F3;
	border: 1px solid #D8D0C3;
	border-radius: 10px;
}

/* Cancel button (greyscale, not theme orange) */
.pa-cancel-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.35rem !important;
	height: 40px !important;
	padding: 0 1.2rem !important;
	background: #fff !important;
	color: #524A45 !important;
	border: 1px solid #B5AB9D !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	font-size: 0.85rem !important;
	transition: all 0.12s ease !important;
}
.pa-cancel-btn:hover {
	background: #EFEBE5 !important;
	color: #2A2622 !important;
	border-color: #847C70 !important;
}

/* Primary/success action buttons (consistent height with cancel) */
.pa-action-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.35rem !important;
	height: 40px !important;
	padding: 0 1.2rem !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	font-size: 0.85rem !important;
	border: 1px solid transparent !important;
	transition: all 0.12s ease !important;
}
.pa-action-btn--primary {
	background: var(--sa-primary-color, #305e6d) !important;
	color: #fff !important;
	border-color: var(--sa-primary-color, #305e6d) !important;
}
.pa-action-btn--primary:hover {
	background: #244850 !important;
	border-color: #244850 !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(48,94,109,0.15);
}
.pa-action-btn--success {
	background: #5F7058 !important;
	color: #fff !important;
	border-color: #5F7058 !important;
}
.pa-action-btn--success:hover {
	background: #506046 !important;
	border-color: #506046 !important;
	color: #fff !important;
}

@media (max-width: 768px) {
	.pa-section-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}
	.pa-section-header__actions {
		width: 100%;
		justify-content: space-between;
	}
}

/* ── Purchase Agreement: Selection Tile Grid ────────────────────────── */
.pa-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.85rem;
}

.pa-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.1rem 0.85rem 0.95rem;
	background: #fff;
	border: 1.5px solid #D8D0C3;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.15s ease;
	min-height: 150px;
	margin-bottom: 0;
	overflow: hidden;
}
.pa-tile:hover {
	border-color: #847C70;
	background: #F8F6F3;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.pa-tile__check {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}
.pa-tile__icon {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EFEBE5;
	color: #6E6660;
	border-radius: 50%;
	font-size: 0.95rem;
	margin-bottom: 0.55rem;
	transition: all 0.15s ease;
}
.pa-tile__avatar {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #D8D0C3 0%, #B5AB9D 100%);
	color: #524A45;
	border-radius: 50%;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin-bottom: 0.55rem;
	transition: all 0.15s ease;
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
.pa-tile__name {
	font-size: 0.85rem;
	font-weight: 700;
	color: #2A2622;
	line-height: 1.25;
	margin-bottom: 0.25rem;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}
.pa-tile__primary-star {
	color: #C68A3A;
	font-size: 0.65rem;
	margin-left: 0.25rem;
	vertical-align: middle;
}
.pa-tile__sub {
	font-size: 0.7rem;
	color: #6E6660;
	line-height: 1.3;
	margin-top: 1px;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.pa-tile__check-indicator {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 1.5px solid #B5AB9D;
	display: flex;
	align-items: center;
	justify-content: center;
	color: transparent;
	font-size: 0.65rem;
	transition: all 0.15s ease;
}

/* Selected state — works via JS class OR via :has() (modern browsers) */
.pa-tile--selected,
.pa-tile:has(.pa-tile__check:checked) {
	border-color: var(--sa-primary-color, #305e6d);
	background: linear-gradient(180deg, rgba(48,94,109,0.05) 0%, rgba(48,94,109,0.02) 100%);
	box-shadow: 0 2px 8px rgba(48,94,109,0.1);
}
.pa-tile--selected .pa-tile__icon,
.pa-tile:has(.pa-tile__check:checked) .pa-tile__icon {
	background: var(--sa-primary-color, #305e6d);
	color: #fff;
}
.pa-tile--selected .pa-tile__avatar,
.pa-tile:has(.pa-tile__check:checked) .pa-tile__avatar {
	background: linear-gradient(135deg, var(--sa-primary-color, #305e6d) 0%, #244850 100%);
	color: #fff;
}
.pa-tile--selected .pa-tile__check-indicator,
.pa-tile:has(.pa-tile__check:checked) .pa-tile__check-indicator {
	background: var(--sa-primary-color, #305e6d);
	border-color: var(--sa-primary-color, #305e6d);
	color: #fff;
}

@media (max-width: 576px) {
	.pa-card-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 0.6rem;
	}
	.pa-tile {
		padding: 0.85rem 0.5rem 0.7rem;
		min-height: 130px;
	}
	.pa-tile__name { font-size: 0.78rem; }
	.pa-tile__sub { font-size: 0.65rem; }
}

.sa-selection-card {
	padding: 1rem;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	transition: all 0.15s ease;
	cursor: pointer;
}
.sa-selection-card:hover {
	border-color: #adb5bd;
	background-color: #f8f9fa;
}
.sa-selection-card--selected {
	border-color: var(--brand-color, #0d6efd);
	background-color: #f0f6ff;
}
.sa-selection-card .form-check-input {
	margin-top: 0.15rem;
}
.sa-selection-card--view-only {
	cursor: default;
	pointer-events: none;
}
.sa-selection-card--view-only:hover {
	border-color: #dee2e6;
	background-color: transparent;
}

/* CLINICS ORDERS VIEW PAGE - Confirmation Styles */
.sa-confirm-hero {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	margin-bottom: 1.5rem;
}
.sa-confirm-hero__icon {
	width: 64px;
	height: 64px;
	background: #198754;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1rem;
}
.sa-confirm-hero__icon i {
	font-size: 28px;
	color: #fff;
}
.sa-confirm-hero__title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #212529;
	margin-bottom: 0.5rem;
}
.sa-confirm-hero__subtitle {
	color: #6c757d;
	margin-bottom: 0;
}
.sa-confirm-stats {
	display: flex;
	justify-content: center;
	gap: 2rem;
	margin-top: 1.5rem;
}
.sa-confirm-stat {
	text-align: center;
}
.sa-confirm-stat__value {
	font-size: 1.75rem;
	font-weight: 700;
	color: #0d6efd;
}
.sa-confirm-stat__label {
	font-size: 0.875rem;
	color: #6c757d;
}
.sa-confirm-details {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	margin-bottom: 1.5rem;
}
.sa-confirm-details__header {
	background: #f8f9fa;
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #dee2e6;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}
.sa-confirm-details__body {
	padding: 1rem;
}
.sa-confirm-row {
	display: flex;
	padding: 0.5rem 0;
	border-bottom: 1px solid #f1f3f4;
}
.sa-confirm-row:last-child {
	border-bottom: none;
}
.sa-confirm-row__label {
	width: 140px;
	color: #6c757d;
	font-size: 0.875rem;
}
.sa-confirm-row__value {
	flex: 1;
	font-weight: 500;
}
.sa-confirm-products {
	max-height: 250px;
	overflow-y: auto;
}
.sa-confirm-product {
	display: flex;
	align-items: center;
	padding: 0.75rem;
	background: #f8f9fa;
	border-radius: 6px;
	margin-bottom: 0.5rem;
}
.sa-confirm-product:last-child {
	margin-bottom: 0;
}
.sa-confirm-product__sku {
	background: #0d6efd;
	color: #fff;
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	margin-right: 0.75rem;
}
.sa-confirm-product__name {
	flex: 1;
	font-weight: 500;
}
.sa-confirm-product__qty {
	background: #198754;
	color: #fff;
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-weight: 600;
	font-size: 0.875rem;
}
.sa-confirm-action {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border: 2px solid #28a745;
	border-radius: 12px;
	padding: 1.5rem;
	text-align: center;
}
.sa-confirm-checkbox {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	cursor: pointer;
}
.sa-confirm-checkbox input[type="checkbox"] {
	width: 28px;
	height: 28px;
	cursor: pointer;
	accent-color: #198754;
}
.sa-confirm-checkbox__label {
	font-size: 1.1rem;
	font-weight: 600;
	color: #155724;
	cursor: pointer;
	user-select: none;
}
.sa-confirm-action__buttons {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 1rem;
}
.sa-confirm-action__buttons .btn-place-order {
	padding: 0.75rem 2rem;
	font-size: 1.1rem;
	font-weight: 600;
}

/* CLINICS ORDERS VIEW PAGE - Success Styles */
.sa-order-success {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 380px;
	padding: 2rem;
}
.sa-order-success__card {
	text-align: center;
	max-width: 420px;
	background: #fff;
	border-radius: 16px;
	padding: 2.5rem 2rem;
	box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.sa-order-success__icon-wrapper {
	position: relative;
	width: 72px;
	height: 72px;
	margin: 0 auto 1.5rem;
}
.sa-order-success__icon-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	border-radius: 50%;
	animation: successScale 0.5s ease-out;
}
.sa-order-success__icon {
	position: relative;
	font-size: 2rem;
	color: #198754;
	line-height: 72px;
	animation: successCheck 0.3s ease-out 0.2s both;
}
@keyframes successScale {
	0% { transform: scale(0); }
	60% { transform: scale(1.1); }
	100% { transform: scale(1); }
}
@keyframes successCheck {
	0% { opacity: 0; transform: scale(0.5); }
	100% { opacity: 1; transform: scale(1); }
}
.sa-order-success__title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #212529;
	margin-bottom: 0.5rem;
}
.sa-order-success__message {
	font-size: 0.95rem;
	color: #6c757d;
	margin-bottom: 1.75rem;
	line-height: 1.5;
}
.sa-order-success__pdf-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #0d6efd;
	color: #fff;
	padding: 0.75rem 1.75rem;
	border-radius: 8px;
	font-weight: 500;
	font-size: 1rem;
	text-decoration: none;
	transition: all 0.2s ease;
	margin-bottom: 1.5rem;
}
.sa-order-success__pdf-btn:hover {
	background: #0b5ed7;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}
.sa-order-success__pdf-btn i {
	font-size: 1.1rem;
}
.sa-order-success__links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.75rem;
}
.sa-order-success__link {
	color: #6c757d;
	font-size: 0.875rem;
	text-decoration: none;
	transition: color 0.2s;
}
.sa-order-success__link:hover {
	color: #0d6efd;
}
.sa-order-success__divider {
	color: #dee2e6;
}

/* ==========================================================================
   Admin Customer Cards Grid
   ========================================================================== */

.sa-customer-cards-count {
	font-size: 0.8rem;
	color: #6c757d;
	margin-left: auto;
	white-space: nowrap;
}

.sa-customer-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
	gap: 1.25rem;
}

.sa-customer-card {
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 0;
	overflow: visible;
	position: relative;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.sa-customer-card:hover {
	box-shadow: 0 8px 24px rgba(0,0,0,0.08);
	border-color: #dee2e6;
	transform: translateY(-2px);
}

.sa-customer-card__accent {
	height: 4px;
	background: var(--sa-primary-color);
}

.sa-customer-card__header {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.875rem 1rem 0.75rem;
}

.sa-customer-card__logo {
	width: 52px;
	height: 52px;
	border-radius: 0.625rem;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	flex-shrink: 0;
	border: 1px solid #e9ecef;
	background: #f8f9fa;
}

.sa-customer-card__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 4px;
}

.sa-customer-card__logo-initials {
	font-size: 1.125rem;
	font-weight: 700;
	color: #fff;
	text-transform: uppercase;
	line-height: 1;
}

.sa-customer-card__info {
	flex: 1;
	min-width: 0;
}

.sa-customer-card__name {
	font-size: 1rem;
	font-weight: 600;
	color: #212529;
	margin: 0;
	line-height: 1.4;
	min-height: 2.8rem;
}

.sa-customer-card__website {
	font-size: 0.75rem;
	margin-top: 0.125rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sa-customer-card__website a {
	color: #6c757d;
	text-decoration: none;
}
.sa-customer-card__website a:hover {
	color: #333;
	text-decoration: underline;
}
.sa-customer-card__date {
	font-size: 0.75rem;
	color: #adb5bd;
	margin-top: 0.125rem;
}

.sa-customer-card__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.375rem;
	flex-shrink: 0;
	margin-left: auto;
	padding-top: 0.125rem;
}

.sa-customer-card__discount {
	display: inline-flex;
	align-items: center;
	padding: 0.15rem 0.5rem;
	border-radius: 2rem;
	font-size: 0.675rem;
	font-weight: 600;
	background: #e7f5ee;
	color: #198754;
	white-space: nowrap;
	line-height: 1.3;
}

.sa-customer-card__stats {
	display: flex;
	gap: 0;
	padding: 0;
	margin: 0;
	border-top: 1px solid #f0f0f0;
	border-radius: 0 0 0.75rem 0.75rem;
	overflow: hidden;
}

.sa-customer-card__stat {
	flex: 1;
	text-align: center;
	padding: 0.625rem 0.25rem;
}

.sa-customer-card__stat + .sa-customer-card__stat {
	border-left: 1px solid #f0f0f0;
}

.sa-customer-card__stat-value {
	font-size: 1.125rem;
	font-weight: 700;
	color: #212529;
	line-height: 1;
}

.sa-customer-card__stat-label {
	font-size: 0.675rem;
	color: #adb5bd;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-top: 0.25rem;
	font-weight: 500;
}

.sa-customer-card__stat--link {
	text-decoration: none;
	position: relative;
	cursor: pointer;
	transition: background 0.15s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.sa-customer-card__stat--link:hover {
	background: #f0f7ff;
}
.sa-customer-card__stat--link:hover .sa-customer-card__stat-value {
	color: #0d6efd;
}
.sa-customer-card__stat--link:hover .sa-customer-card__stat-label {
	color: #6c757d;
}

.sa-customer-card__stat-add {
	display: none;
	position: absolute;
	top: 2px;
	right: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #0d6efd;
	color: #fff;
	font-size: 0.5rem;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.sa-customer-card__stat--link:hover .sa-customer-card__stat-add {
	display: flex;
}

.sa-customer-card__menu {
	flex-shrink: 0;
}
.sa-customer-card__menu a.sa-customer-card__menu-btn {
	text-decoration: none;
	color: #6c757d;
	display: flex;
}
.sa-customer-card__menu-btn {
	background: #f0f2f5;
	border: none;
	color: #6c757d;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	cursor: pointer;
	font-size: 0.8rem;
	line-height: 1;
	padding: 0;
	vertical-align: middle;
	transition: all 0.15s ease;
}
.sa-customer-card__menu-btn:hover {
	background: #e2e6ea;
	color: #495057;
}

.sa-customer-card__actions-group {
	padding: 0.5rem 1.25rem 0;
}
.sa-customer-card__actions-group:last-child {
	padding-bottom: 0.75rem;
}
.sa-customer-card__actions-label {
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #adb5bd;
	margin-bottom: 0.25rem;
}
.sa-customer-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	padding-bottom: 0.5rem;
}

.sa-customer-card__action {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.375rem 0.625rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: #6c757d;
	text-decoration: none;
	background: #f8f9fa;
	border: 1px solid transparent;
	transition: all 0.15s ease;
	white-space: nowrap;
}

.sa-customer-card__action:hover {
	background: #e7f1ff;
	color: #0d6efd;
	border-color: #bbd6fe;
}

.sa-customer-card__action i {
	font-size: 0.8rem;
}

.sa-customer-cards-empty {
	text-align: center;
	padding: 3rem 1rem;
	color: #adb5bd;
}

.sa-customer-cards-empty__icon {
	font-size: 2.5rem;
	margin-bottom: 0.75rem;
	opacity: 0.5;
}

.sa-customer-cards-empty__text {
	font-size: 0.95rem;
	font-weight: 500;
}

.sa-customer-cards-loading {
	text-align: center;
	padding: 3rem 1rem;
	color: #6c757d;
}

@media (max-width: 576px) {
	.sa-customer-cards-grid {
		grid-template-columns: 1fr;
	}

	.sa-customer-cards-count {
		margin-left: 0;
		text-align: center;
	}
}

/* ---- HCO Section Cards ---- */
.sa-hco-section {
	overflow: visible;
}
.sa-hco-section__header {
	background: #fff;
	padding: 1rem 1.25rem;
}
.sa-hco-section__toggle {
	cursor: pointer;
	flex: 1;
	min-width: 0;
}
.sa-hco-section__name {
	font-size: 0.95rem;
	font-weight: 600;
	color: #212529;
	margin: 0;
	line-height: 1.3;
}
.sa-hco-section__body {
	padding-top: 0;
}

/* HCO Icon */
.sa-hco-icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	flex-shrink: 0;
}
.sa-hco-icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 2px;
}
.sa-hco-icon--initials {
	color: #fff;
	font-weight: 700;
	font-size: 0.8rem;
	text-transform: uppercase;
	border: none;
}

/* HCO Chevron */
.sa-hco-chevron {
	font-size: 0.6rem;
	color: #adb5bd;
	transition: transform 0.25s ease;
	width: 12px;
	flex-shrink: 0;
}
[aria-expanded="false"] .sa-hco-chevron {
	transform: rotate(-90deg);
}
[aria-expanded="true"] .sa-hco-chevron {
	transform: rotate(0deg);
}

/* HCO Stats Meta Row */
.sa-hco-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 0.25rem;
}
.sa-hco-meta__item {
	font-size: 0.72rem;
	color: #6c757d;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	white-space: nowrap;
}
.sa-hco-meta__item i {
	font-size: 0.6rem;
	opacity: 0.5;
}

/* HCO Actions */
.sa-hco-section__actions {
	flex-shrink: 0;
	margin-left: 0.5rem;
}
.sa-hco-section__actions .btn-icon {
	width: 32px;
	height: 32px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
}

/* Ghost "Add Location" card */
.sa-customer-card--add {
	border: 2px dashed #dee2e6;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	transition: border-color 0.2s ease, background 0.2s ease;
	box-shadow: none;
}
.sa-customer-card--add:hover {
	border-color: #0d6efd;
	background: #f0f7ff;
	transform: none;
	box-shadow: none;
}
.sa-customer-card--add__inner {
	text-align: center;
	color: #adb5bd;
	transition: color 0.2s ease;
}
.sa-customer-card--add:hover .sa-customer-card--add__inner {
	color: #0d6efd;
}
.sa-customer-card--add__icon {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}
.sa-customer-card--add__label {
	font-size: 0.82rem;
	font-weight: 500;
}

@media (max-width: 576px) {
	.sa-hco-meta {
		gap: 0.5rem;
	}
	.sa-hco-section__header {
		padding: 0.75rem 1rem;
	}
}

/* Google Places Autocomplete - ensure dropdown appears above modals */
.pac-container {
	z-index: 10000 !important;
}

/* ===========================================
   SA GLOBAL OVERRIDES — Flat, Minimal, Brand-Aware
   Production push: zero border-radius everywhere,
   zero gradients (except auth pages), brand colors everywhere
   =========================================== */

/* --- Flatten all Bootstrap components --- */
.alert { border-radius: 0 !important; }
.badge { border-radius: 0 !important; }
.toast { border-radius: 0 !important; }
.page-link { border-radius: 0 !important; }
.modal-content { border-radius: 0 !important; }
.popover { border-radius: 0 !important; }
.tooltip-inner { border-radius: 0 !important; }
.dropdown-menu { border-radius: 0 !important; }
.accordion-item { border-radius: 0 !important; }
.accordion-button { border-radius: 0 !important; }
.list-group-item { border-radius: 0 !important; }
.card { border-radius: 0 !important; }
.card-header { border-radius: 0 !important; }
.card-footer { border-radius: 0 !important; }
.nav-tabs .nav-link { border-radius: 0 !important; }
.breadcrumb { border-radius: 0 !important; }
.progress { border-radius: 0 !important; }
.progress-bar { border-radius: 0 !important; }
.input-group-text { border-radius: 0 !important; }

/* Buttons & inputs — fully flat */
.btn { border-radius: 0 !important; }
.form-control { border-radius: 0 !important; }
.form-select { border-radius: 0 !important; }

/* --- Page Header — reduce height --- */
.page-header-breadcrumb {
	min-height: 80px !important;
	padding-block-start: 1.5rem !important;
	padding-block-end: 1.5rem !important;
}

/* --- App content — remove max-height constraint causing white gap --- */
.app-content {
	max-height: none !important;
}

/* --- Card — tighter/flatter --- */
.card.custom-card {
	box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.card.custom-card .card-header {
	padding: 10px 12px !important;
}

/* --- Button hover — brand-aware --- */
.btn-primary:hover {
	background-color: var(--sa-primary-color) !important;
	filter: brightness(0.85);
}

/* --- Focus rings — brand color --- */
.form-control:focus {
	border-color: var(--sa-primary-color) !important;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08) !important;
}

.form-select:focus {
	border-color: var(--sa-primary-color) !important;
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08) !important;
}

/* --- Toast Redesign: Flat, white, colored left border --- */
.toast,
.toast.toast-success,
.toast.toast-error,
.toast.toast-danger,
.toast.toast-warning,
.toast.toast-info,
.toast.toast-primary,
.toast.bg-success,
.toast.bg-danger,
.toast.bg-warning,
.toast.bg-info,
.toast.bg-primary,
.toast[class*="success"],
.toast[class*="danger"],
.toast[class*="error"],
.toast[class*="warning"],
.toast[class*="info"],
.toast[class*="primary"] {
	background: #fff !important;
	border: 1px solid #e9ecef !important;
	border-left: 4px solid #6c757d !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
	overflow: hidden !important;
}

/* Remove the animated ::before pseudo-element */
.toast::before,
.toast.toast-success::before,
.toast.bg-success::before,
.toast[class*="success"]::before,
.toast.toast-error::before,
.toast.toast-danger::before,
.toast.bg-danger::before,
.toast[class*="danger"]::before,
.toast[class*="error"]::before,
.toast.toast-warning::before,
.toast.bg-warning::before,
.toast[class*="warning"]::before,
.toast.toast-info::before,
.toast.bg-info::before,
.toast[class*="info"]::before,
.toast.toast-primary::before,
.toast.bg-primary::before,
.toast[class*="primary"]::before {
	display: none !important;
}

/* Toast header — dark text, type-colored title */
.toast .toast-header,
.toast.toast-success .toast-header,
.toast.bg-success .toast-header,
.toast[class*="success"] .toast-header,
.toast.toast-error .toast-header,
.toast.toast-danger .toast-header,
.toast.bg-danger .toast-header,
.toast[class*="danger"] .toast-header,
.toast[class*="error"] .toast-header,
.toast.toast-warning .toast-header,
.toast.bg-warning .toast-header,
.toast[class*="warning"] .toast-header,
.toast.toast-info .toast-header,
.toast.bg-info .toast-header,
.toast[class*="info"] .toast-header,
.toast.toast-primary .toast-header,
.toast.bg-primary .toast-header,
.toast[class*="primary"] .toast-header {
	background: transparent !important;
	color: #333 !important;
	border-bottom: 1px solid #f0f0f0 !important;
	padding: 0.75rem 1rem !important;
}

/* Toast body — all types get dark body text */
.toast .toast-body,
.toast.toast-success .toast-body,
.toast.bg-success .toast-body,
.toast[class*="success"] .toast-body,
.toast.toast-error .toast-body,
.toast.toast-danger .toast-body,
.toast.bg-danger .toast-body,
.toast[class*="danger"] .toast-body,
.toast[class*="error"] .toast-body,
.toast.toast-warning .toast-body,
.toast.bg-warning .toast-body,
.toast[class*="warning"] .toast-body,
.toast.toast-info .toast-body,
.toast.bg-info .toast-body,
.toast[class*="info"] .toast-body,
.toast.toast-primary .toast-body,
.toast.bg-primary .toast-body,
.toast[class*="primary"] .toast-body {
	color: #495057 !important;
	font-size: 0.875rem !important;
	padding: 0.625rem 1rem !important;
	line-height: 1.5 !important;
}

/* Close button — dark for white bg */
.toast .btn-close,
.toast.toast-success .btn-close,
.toast.bg-success .btn-close,
.toast[class*="success"] .btn-close,
.toast.toast-error .btn-close,
.toast.toast-danger .btn-close,
.toast.bg-danger .btn-close,
.toast[class*="danger"] .btn-close,
.toast[class*="error"] .btn-close,
.toast.toast-warning .btn-close,
.toast.bg-warning .btn-close,
.toast[class*="warning"] .btn-close,
.toast.toast-info .btn-close,
.toast.bg-info .btn-close,
.toast[class*="info"] .btn-close,
.toast.toast-primary .btn-close,
.toast.bg-primary .btn-close,
.toast[class*="primary"] .btn-close {
	filter: none !important;
	opacity: 0.5 !important;
}

/* Type-specific left border colors */
.toast.toast-success,
.toast.bg-success,
.toast[class*="success"] {
	border-left-color: #5F7058 !important;
}

.toast.toast-success .toast-header,
.toast.bg-success .toast-header,
.toast[class*="success"] .toast-header {
	color: #5F7058 !important;
}

.toast.toast-error,
.toast.toast-danger,
.toast.bg-danger,
.toast[class*="danger"],
.toast[class*="error"] {
	border-left-color: #dc2626 !important;
}

.toast.toast-error .toast-header,
.toast.toast-danger .toast-header,
.toast.bg-danger .toast-header,
.toast[class*="danger"] .toast-header,
.toast[class*="error"] .toast-header {
	color: #dc2626 !important;
}

.toast.toast-warning,
.toast.bg-warning,
.toast[class*="warning"] {
	border-left-color: #A87825 !important;
}

.toast.toast-warning .toast-header,
.toast.bg-warning .toast-header,
.toast[class*="warning"] .toast-header {
	color: #A87825 !important;
}

.toast.toast-info,
.toast.bg-info,
.toast[class*="info"] {
	border-left-color: #3D3833 !important;
}

.toast.toast-info .toast-header,
.toast.bg-info .toast-header,
.toast[class*="info"] .toast-header {
	color: #3D3833 !important;
}

.toast.toast-primary,
.toast.bg-primary,
.toast[class*="primary"] {
	border-left-color: var(--sa-primary-color) !important;
}

.toast.toast-primary .toast-header,
.toast.bg-primary .toast-header,
.toast[class*="primary"] .toast-header {
	color: var(--sa-primary-color) !important;
}

/* --- Remove gradients from custom alerts (solid colors) --- */
.nuvida-alert-success::before {
	background: #1C7182 !important;
}

.nuvida-alert-success .nuvida-alert-icon {
	background: #4C8598 !important;
}

.nuvida-alert-error::before {
	background: #b91c1c !important;
}

.nuvida-alert-error .nuvida-alert-icon {
	background: #dc2626 !important;
}

/* --- Remove gradients from stat cards (solid tint) --- */
.sa-stat-card--highlight {
	background: #fff7ed !important;
}

.sa-stat-card--success {
	background: #F2F5EE !important;
}

.sa-stat-card--danger {
	background: #fef2f2 !important;
}

/* Stat card icon - flatten */
.sa-stat-card__icon {
	border-radius: 0 !important;
}

/* --- Replace Bootstrap blue (#0d6efd) fallbacks --- */
.sa-customer-card__action:hover {
	background: #f0f1f3 !important;
	color: var(--sa-primary-color) !important;
	border-color: #dee2e6 !important;
}

/* --- Remove menu/sidebar gradients (solid brand) --- */
[data-menu-styles="gradient"] .app-sidebar {
	background: var(--sa-primary-color) !important;
}

[data-header-styles="gradient"] .app-header {
	background: var(--sa-primary-color) !important;
}

/* --- Responsive: Layout on tablet/mobile --- */
@media (max-width: 991.98px) {
	.app-content {
		margin-block-start: 4.25rem !important;
	}

	.page-header-breadcrumb {
		padding-inline-start: 1rem !important;
		min-height: 60px !important;
		padding-block-start: 1rem !important;
		padding-block-end: 1rem !important;
		top: 0 !important;
	}

	/* Hide search icon on mobile/tablet */
	.header-search {
		display: none !important;
	}
}

@media (max-width: 576px) {
	.page-header-breadcrumb {
		min-height: 50px !important;
		padding-block-start: 0.75rem !important;
		padding-block-end: 0.75rem !important;
	}

	/* Cards: full bleed on mobile */
	.card.custom-card {
		margin-bottom: 0.5rem !important;
	}

	.card.custom-card .card-header {
		padding: 8px 10px !important;
	}

	.card-body {
		padding: 0.5rem !important;
	}

	/* Modals: nearly full screen on mobile */
	.modal-dialog {
		margin: 0.5rem !important;
	}

	.modal-body {
		max-height: 80vh;
	}
}

/* --- Form Validation Error Styles --- */
.form-control.is-invalid,
.form-select.is-invalid {
	border-color: #dc2626 !important;
	box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
	border-color: #dc2626 !important;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

.invalid-feedback {
	font-size: 0.75rem;
	color: #dc2626;
	margin-top: 0.2rem;
}

.sa-validation-error {
	width: 100%;
	text-align: left;
	margin-bottom: 0.5rem;
	font-size: 0.8rem;
	color: #dc2626;
	padding: 0.5rem 0.75rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 0;
}

/* Clickable Stat Cards */
.sa-stat-card--clickable {
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
	user-select: none;
	position: relative;
}

.sa-stat-card--clickable:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sa-stat-card--clickable:active {
	transform: translateY(0);
}

.sa-stat-card--clickable.sa-stat-card--active {
	filter: brightness(0.92);
}

.sa-stat-card--clickable .sa-stat-card__subtitle::after {
	content: 'Click to view';
	display: block;
	font-size: 0.65rem;
	color: #847C70;
	margin-top: 0.25rem;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.sa-stat-card--clickable:hover .sa-stat-card__subtitle::after {
	opacity: 1;
}

.sa-stat-card--clickable.sa-stat-card--active .sa-stat-card__subtitle::after {
	content: 'Filtering';
	opacity: 1;
	font-weight: 600;
	color: var(--sa-primary-color, #305e6d);
}

/* (Sidebar Improvements + Mobile UX moved to Custom Sidebar Overrides section) */

/* Charts responsive utility */
@media (max-width: 768px) {
	canvas {
		max-height: 250px !important;
	}
}

/* ── Clinic Home v2 ──────────────────────────────────────────────── */

/* Welcome Header */
.sa-home-welcome {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 0;
	margin-bottom: 1rem;
	border-bottom: 1px solid #D8D0C3;
}
.sa-home-welcome__greeting { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 1rem; }
.sa-home-welcome__text h1 { font-size: 1.35rem; font-weight: 700; color: #2A2622; margin: 0; }
.sa-home-welcome__date { font-size: 0.8rem; color: #6E6660; margin-top: 2px; }
.sa-home-welcome__clinic { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.sa-home-welcome__logo { width: 36px; height: 36px; border-radius: 0; object-fit: contain; border: 1px solid #D8D0C3; background: #fff; padding: 3px; }
.sa-home-welcome__clinic span { font-size: 0.82rem; font-weight: 600; color: #524A45; white-space: nowrap; }

/* KPI Action Items Row */
.sa-home-kpi-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}
.sa-home-kpi-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	background: #fff;
	border: 1px solid #D8D0C3;
	border-radius: 0;
	cursor: pointer;
	transition: all 0.15s ease;
	min-width: 0;
}
.sa-home-kpi-card:hover {
	border-color: #B5AB9D;
	box-shadow: 0 2px 8px rgba(0,0,0,0.06);
	transform: translateY(-1px);
}
.sa-home-kpi-card__icon {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 0;
	flex-shrink: 0;
	font-size: 0.95rem;
}
.sa-home-kpi-card__data { min-width: 0; }
.sa-home-kpi-card__value {
	display: block;
	font-size: 1.35rem;
	font-weight: 800;
	color: #2A2622;
	line-height: 1.1;
}
.sa-home-kpi-card__label {
	display: block;
	font-size: 0.72rem;
	color: #6E6660;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sa-home-kpi-card__sub {
	display: block;
	font-size: 0.7rem;
	color: #847C70;
	margin-top: 1px;
}

/* KPI Color Variants */
/* Default (neutral) */
.sa-home-kpi-card__icon { background: #EFEBE5; color: #524A45; }

/* Danger (pending approval, expired) */
.sa-home-kpi-card--danger .sa-home-kpi-card__icon { background: #fef2f2; color: #dc2626; }
.sa-home-kpi-card--danger .sa-home-kpi-card__value { color: #dc2626; }

/* Warning (in transit, expiring) */
.sa-home-kpi-card--warning .sa-home-kpi-card__icon { background: #fffbeb; color: #A87825; }

/* Success (delivered) */
.sa-home-kpi-card--success .sa-home-kpi-card__icon { background: #F2F5EE; color: #5F7058; }
.sa-home-kpi-card--success .sa-home-kpi-card__value { color: #5F7058; }

/* Info (orders) */
.sa-home-kpi-card--info .sa-home-kpi-card__icon { background: #EFEBE5; color: #3D3833; }

/* Two-Column Grid */
.sa-home-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 1.25rem;
	align-items: start;
}
.sa-home-grid__main { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }
.sa-home-grid__side { min-width: 0; display: flex; flex-direction: column; gap: 1.25rem; }

/* Activity Feed Vertical */
.sa-activity-feed--vertical {
	display: flex;
	flex-direction: column;
	gap: 0;
}
.sa-activity-feed--vertical .sa-activity-item-compact {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid #EFEBE5;
}
.sa-activity-feed--vertical .sa-activity-item-compact:last-child { border-bottom: none; }

/* Locations Mini List */
.sa-location-item {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.6rem 0;
	border-bottom: 1px solid #EFEBE5;
}
.sa-location-item:last-child { border-bottom: none; }
.sa-location-item__icon {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #EFEBE5;
	color: #6E6660;
	border-radius: 0;
	flex-shrink: 0;
	font-size: 0.7rem;
}
.sa-location-item__icon--primary { background: #EFEBE5; color: #3D3833; }
.sa-location-item__name { font-size: 0.82rem; font-weight: 600; color: #2A2622; }
.sa-location-item__address { font-size: 0.75rem; color: #6E6660; margin-top: 1px; }
.sa-location-item__phone { font-size: 0.75rem; color: #6E6660; }
.sa-location-item__phone a { color: #3D3833; text-decoration: none; }
.sa-location-item__phone a:hover { text-decoration: underline; }

/* Pipeline list override for clinic dashboard (remove nested scroll) */
.sa-clinic-dashboard .sa-pipeline-list { max-height: none; overflow: visible; }

/* ── Clinic Home: Zero border-radius globally ────────────────────── */
.sa-clinic-dashboard .sa-dashboard-card,
.sa-clinic-dashboard .sa-dashboard-card__header,
.sa-clinic-dashboard .sa-dashboard-card__body,
.sa-clinic-dashboard .sa-pipeline-card,
.sa-clinic-dashboard .sa-pipeline-tag,
.sa-clinic-dashboard .sa-pipeline-card__carrier,
.sa-clinic-dashboard .sa-empty-state,
.sa-clinic-dashboard .sa-onboarding-wizard,
.sa-clinic-dashboard .sa-onboarding-wizard__header,
.sa-clinic-dashboard .sa-onboarding-wizard__panels,
.sa-clinic-dashboard .sa-wizard-panel,
.sa-clinic-dashboard .sa-onboarding-complete,
.sa-clinic-dashboard .sa-actions-row,
.sa-clinic-dashboard .alert,
.sa-clinic-dashboard .card,
.sa-clinic-dashboard .card-body,
.sa-clinic-dashboard .btn {
	border-radius: 0 !important;
}

/* ── Clinic Home v2 Responsive ───────────────────────────────────── */
@media (max-width: 991.98px) {
	.sa-home-grid { grid-template-columns: 1fr; }
	.sa-home-kpi-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 767.98px) {
	.sa-home-welcome__greeting { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
	.sa-home-welcome__clinic { display: none; } /* Clinic name already in header on mobile */
	.sa-home-welcome__text h1 { font-size: 1.15rem; }
	.sa-home-welcome { padding: 1rem 0; margin-bottom: 0.75rem; }
	.sa-home-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
	.sa-home-kpi-card { padding: 0.75rem; gap: 0.5rem; }
	.sa-home-kpi-card__icon { width: 34px; height: 34px; font-size: 0.82rem; }
	.sa-home-kpi-card__value { font-size: 1.15rem; }
	.sa-home-kpi-card__label { font-size: 0.7rem; white-space: normal; line-height: 1.25; }
	.sa-home-kpi-card__sub { display: none; } /* Hide sub-text on mobile to save space */
}

@media (max-width: 479.98px) {
	.sa-home-kpi-row { grid-template-columns: repeat(2, 1fr); }
	.sa-home-kpi-card__icon { width: 32px; height: 32px; font-size: 0.75rem; }
	.sa-home-kpi-card__value { font-size: 1rem; }
}

/* ── AtlasMPS Wordmark (used when no entity logo is set) ── */
.atlasmps-wordmark {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}
.atlasmps-wordmark--sidebar {
	display: block;
	padding: 1.25rem 0;
	text-align: center;
	font-size: 0.9rem;
	color: var(--menu-prime-color, #fff);
	overflow: hidden;
	text-overflow: ellipsis;
}
[data-toggled="icon-overlay-close"] .atlasmps-wordmark--sidebar,
[data-toggled="icon-text-close"] .atlasmps-wordmark--sidebar,
[data-toggled="close"] .atlasmps-wordmark--sidebar {
	font-size: 0;
	padding: 0.75rem 0;
}
[data-toggled="icon-overlay-close"] .atlasmps-wordmark--sidebar::first-letter,
[data-toggled="icon-text-close"] .atlasmps-wordmark--sidebar::first-letter {
	font-size: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   Module Switcher — header chip + wide modal with sidebar nav
   Minimal, sharp corners. Fixed modal height. Mobile-first.
   =================================================================*/

/* ── Header chip ──────────────────────────────────────────────
   AtlasMPS-Platform-branded: full 2px module-accent frame, larger icon
   tile, premium spacing, hover-glow in the module color. Sharp corners.
   The frame is the brand signal — visible at a glance from across the page. */
.sa-ms-chip-wrap { display: flex; align-items: center; padding: 0 0.4rem; }
.sa-ms-chip {
	--ms-accent: #305e6d;
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: transparent;
	border: none !important;
	box-sizing: border-box;
	color: #fff;
	padding: 0.4rem 0.7rem;
	line-height: 1.1 !important;
	font-size: 1rem;
	cursor: pointer;
	border-radius: 0;
	max-width: 320px;
	transition: background 0.15s ease, box-shadow 0.18s ease, transform 0.1s ease;
}
.sa-ms-chip:hover, .sa-ms-chip:focus-visible {
	background: color-mix(in srgb, var(--ms-accent) 14%, transparent);
	box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--ms-accent) 75%, transparent);
	outline: none;
}
.sa-ms-chip:active { transform: translateY(1px); }
.sa-ms-chip-text {
	display: flex; flex-direction: column;
	min-width: 0; gap: 0.1rem;
	text-align: left;
}
.sa-ms-chip-eyebrow {
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255,255,255,0.7);
	white-space: nowrap;
}
.sa-ms-chip-name {
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 240px;
}
.sa-ms-chip-caret {
	font-size: 0.6rem;
	color: rgba(255,255,255,0.65);
	margin-left: 0.25rem;
	transition: transform 0.15s ease, color 0.15s ease;
}
.sa-ms-chip:hover .sa-ms-chip-caret { color: #fff; transform: translateY(1px); }

@media (max-width: 575.98px) {
	.sa-ms-chip { max-width: 220px; gap: 0.4rem; padding: 0.3rem 0.55rem; }
	.sa-ms-chip-name { font-size: 0.82rem; max-width: 150px; }
	.sa-ms-chip-eyebrow { font-size: 0.54rem; }
}

/* ── Modal — fixed dimensions, no jitter ────────────────────────
   Hard cap at 640px regardless of viewport. The height is enforced on
   .sa-ms-content (the modal-content) rather than .modal-dialog because
   Bootstrap's .modal-dialog-centered uses flex centering that ignores
   explicit height on the dialog itself. !important pins the cap against
   any Bootstrap rule that might widen the modal-content to fit its children. */
.sa-ms-modal .modal-dialog {
	max-width: 920px;
}
.sa-ms-content {
	--ms-accent: #305e6d;
	position: relative;
	border-radius: 0 !important;
	border: 1px solid #ececec;
	box-shadow: 0 24px 60px -16px rgba(0,0,0,0.22);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	height: min(640px, calc(100vh - 2rem)) !important;
	max-height: 640px !important;
}
/* Top accent bar — module color spans the modal head, the AtlasMPS brand signal.
   Negative offsets cover the modal's 1px border so the bar sits flush at the edge. */
.sa-ms-content::before {
	content: "";
	position: absolute;
	top: -1px; left: -1px; right: -1px;
	height: 3px;
	background: var(--ms-accent);
	z-index: 2;
	pointer-events: none;
}

/* Topbar — minimal: just the title and close. The active workspace's
   identity is already conveyed by the top accent bar (module color) and
   by the row-level rail in the list below. */
.sa-ms-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem 1.5rem 0.85rem;
	flex-shrink: 0;
}
.sa-ms-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #1A1715;
	margin: 0;
	letter-spacing: -0.015em;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sa-ms-close {
	background: transparent;
	border: none;
	width: 30px; height: 30px;
	display: inline-flex; align-items: center; justify-content: center;
	color: #847C70;
	cursor: pointer;
	border-radius: 0;
	transition: background 0.15s ease, color 0.15s ease;
	font-size: 0.95rem;
	flex-shrink: 0;
}
.sa-ms-close:hover { background: #EFEBE5; color: #1A1715; }

/* Search row */
.sa-ms-search-row { padding: 0 1.5rem 0.7rem; flex-shrink: 0; }
.sa-ms-search-wrap { position: relative; }
.sa-ms-search-icon {
	position: absolute;
	left: 0.85rem; top: 50%;
	transform: translateY(-50%);
	color: #847C70;
	font-size: 0.85rem;
	pointer-events: none;
}
.sa-ms-search {
	width: 100%;
	padding: 0.7rem 0.85rem 0.7rem 2.3rem;
	font-size: 0.92rem;
	border: 1px solid #ececec;
	background: #fafafa;
	color: #1A1715;
	border-radius: 0;
	outline: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.sa-ms-search::placeholder { color: #b3b3b3; }
.sa-ms-search:focus { border-color: #1A1715; background: #fff; }
.sa-ms-search-clear {
	position: absolute;
	right: 0.4rem; top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #847C70;
	cursor: pointer;
	padding: 0.3rem 0.45rem;
	font-size: 0.85rem;
}
.sa-ms-search-clear:hover { color: #1A1715; }

/* Filter pills — horizontal row, scrolls on overflow. Replaces the old
   left-sidebar nav. Sharp corners, compact, neutral colors so the active
   pill is the only saturated thing in the row. */
.sa-ms-filters {
	display: flex;
	gap: 0.35rem;
	padding: 0 1.5rem 0.85rem;
	flex-shrink: 0;
	overflow-x: auto;
	scrollbar-width: thin;
	border-bottom: 1px solid #f5f5f5;
	padding-bottom: 0.85rem;
}
.sa-ms-filters::-webkit-scrollbar { height: 4px; }
.sa-ms-filters::-webkit-scrollbar-thumb { background: #D8D0C3; }
.sa-ms-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	flex-shrink: 0;
	background: transparent;
	border: 1px solid #ececec;
	border-radius: 0;
	padding: 0.35rem 0.7rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: #6E6660;
	cursor: pointer;
	letter-spacing: 0.005em;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.sa-ms-filter-pill:hover {
	background: #fafafa;
	border-color: #B5AB9D;
	color: #1A1715;
}
.sa-ms-filter-pill.is-active {
	background: #1A1715;
	border-color: #1A1715;
	color: #fff;
}
.sa-ms-filter-pill-count {
	font-size: 0.7rem;
	font-weight: 500;
	color: #847C70;
	letter-spacing: 0;
}
.sa-ms-filter-pill:hover .sa-ms-filter-pill-count { color: #6E6660; }
.sa-ms-filter-pill.is-active .sa-ms-filter-pill-count { color: rgba(255,255,255,0.7); }

/* ── Content pane ───────────────────────────────────────────── */
.sa-ms-content-pane {
	flex: 1;
	overflow-y: auto;
	padding: 0;
	min-height: 0;
}
.sa-ms-section { padding-top: 0; }
.sa-ms-rows { display: flex; flex-direction: column; }

/* ── Row — minimal, clean ───────────────────────────────────── */
.sa-ms-row {
	--ms-accent: #305e6d;
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.85rem;
	width: 100%;
	background: transparent;
	border: none;
	padding: 0.7rem 1.4rem;
	text-align: left;
	cursor: pointer;
	border-radius: 0;
	transition: background 0.12s ease;
	min-height: 60px;
}
.sa-ms-row:hover { background: #fafafa; }
.sa-ms-row:active { background: #f5f5f5; }
/* 3px left accent rail on the active row — mirrors the chip's brand signal.
   Implemented via inset box-shadow to avoid conflicting with the row's
   ::before (HCO tree connector) and ::after (loading spinner) pseudo-elements. */
.sa-ms-row.is-active {
	background: color-mix(in srgb, var(--ms-accent) 7%, #fff);
	box-shadow: inset 3px 0 0 var(--ms-accent);
	cursor: default;
}
.sa-ms-row.is-loading { opacity: 0.5; pointer-events: none; }
.sa-ms-row.is-loading::after {
	content: "";
	position: absolute;
	right: 1.4rem; top: 50%;
	width: 14px; height: 14px;
	margin-top: -7px;
	border: 2px solid #D8D0C3;
	border-top-color: #1A1715;
	border-radius: 50%;
	animation: sa-ms-spin 0.7s linear infinite;
}
@keyframes sa-ms-spin { to { transform: rotate(360deg); } }

/* Icon — clinic logo wins; FA fallback in module color (no tinted bg) */
.sa-ms-row-icon {
	display: inline-flex;
	align-items: center; justify-content: center;
	width: 36px; height: 36px;
	background: #fafafa;
	border: 1px solid #f0f0f0;
	color: var(--ms-accent);
	font-size: 0.95rem;
	flex-shrink: 0;
	overflow: hidden;
}
.sa-ms-row-icon img { width: 100%; height: 100%; object-fit: cover; }
.sa-ms-row-icon--logo { background: #fff; }

.sa-ms-row-text {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	min-width: 0;
	flex: 1;
}
.sa-ms-row-title {
	font-size: 0.93rem;
	font-weight: 600;
	color: #1A1715;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: -0.005em;
}

/* Right-side badges — keep role pill PROMINENT (sidebar-style) */
.sa-ms-row-badges {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
}
.sa-ms-role {
	--role-color: #6E6660;
	background: var(--role-color);
	color: #fff;
	font-size: 0.62rem;
	font-weight: 800;
	padding: 0.22rem 0.55rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 0;
	white-space: nowrap;
	line-height: 1;
}
.sa-ms-badge {
	font-size: 0.56rem;
	font-weight: 700;
	padding: 0.16rem 0.4rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 0;
	border: 1px solid;
	white-space: nowrap;
	line-height: 1;
}
.sa-ms-badge--hco { color: #282320; border-color: #c7d2fe; background: #eef2ff; }
.sa-ms-badge--demo { color: #b45309; border-color: #fde68a; background: #fef3c7; }

.sa-ms-row-current {
	display: inline-flex;
	align-items: center; justify-content: center;
	width: 20px; height: 20px;
	background: var(--ms-accent);
	color: #fff;
	font-size: 0.6rem;
	border-radius: 50%;
	flex-shrink: 0;
	margin-left: 0.2rem;
}

/* ── HCO grouping (only on HCOs tab) ───────────────────────── */
.sa-ms-hco-group {
	margin: 0.35rem 0 0.85rem;
	border-left: 1px solid #f0f0f0;
	margin-left: 1.4rem;
	padding-left: 0.1rem;
}
.sa-ms-hco-head {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0.85rem 0.45rem 0.7rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: #1A1715;
	letter-spacing: -0.005em;
}
.sa-ms-hco-icon {
	display: inline-flex;
	align-items: center; justify-content: center;
	width: 22px; height: 22px;
	background: #f5f5f5;
	color: #6E6660;
	font-size: 0.7rem;
	flex-shrink: 0;
	overflow: hidden;
}
.sa-ms-hco-icon img { width: 100%; height: 100%; object-fit: cover; }
.sa-ms-hco-name { flex: 1; }
.sa-ms-hco-count {
	font-size: 0.62rem;
	font-weight: 700;
	color: #847C70;
	background: #f5f5f5;
	padding: 0.1rem 0.5rem;
	letter-spacing: 0.04em;
}
.sa-ms-hco-body { display: flex; flex-direction: column; }

/* Child row tree-line indent inside HCO group */
.sa-ms-row--child { padding-left: 2.2rem; }
.sa-ms-row-tree {
	position: absolute;
	left: 0.95rem; top: 0; bottom: 0;
	width: 1px;
	background: #ececec;
	pointer-events: none;
}
.sa-ms-row--child::before {
	content: "";
	position: absolute;
	left: 0.95rem; top: 50%;
	width: 0.6rem; height: 1px;
	background: #ececec;
}

/* Empty state — text only, no icon */
.sa-ms-empty {
	text-align: center;
	color: #847C70;
	padding: 3rem 1rem;
	font-size: 0.9rem;
	letter-spacing: 0.005em;
}

/* ── Mobile (< 768px) ───────────────────────────────────────── */
@media (max-width: 767.98px) {
	/* Drop the fullscreen override — the 640px cap above applies on mobile too.
	   Removing border keeps the cap looking flush on small screens. */
	.sa-ms-content { border: none; }

	.sa-ms-topbar { padding: 0.9rem 1rem 0.6rem; }
	.sa-ms-search-row { padding: 0 1rem 0.6rem; }
	.sa-ms-filters { padding: 0 1rem 0.7rem; gap: 0.3rem; }
	.sa-ms-filter-pill { padding: 0.3rem 0.6rem; font-size: 0.74rem; }
	.sa-ms-filter-pill-count { font-size: 0.66rem; }

	.sa-ms-content-pane { padding-bottom: 1.5rem; }
	.sa-ms-row { padding: 0.7rem 1rem; gap: 0.7rem; min-height: 64px; }
	.sa-ms-row--child { padding-left: 2rem; }
	.sa-ms-row-icon { width: 34px; height: 34px; font-size: 0.88rem; }
	.sa-ms-row-title { font-size: 0.92rem; }
	.sa-ms-badge { display: none; }
	.sa-ms-role { font-size: 0.58rem; padding: 0.18rem 0.45rem; }
	.sa-ms-hco-group { margin-left: 1rem; }
	.sa-ms-row-tree { left: 0.6rem; }
	.sa-ms-row--child::before { left: 0.6rem; }
}

/* ══════════════════════════════════════════════════════════════
   DARK MODE — Premium Dark Theme
   ══════════════════════════════════════════════════════════════
   Color system:
     Base:    #09090b  (body)
     Surface: #111113  (sidebar, header)
     Card:    #18181b  (cards, panels)
     Raised:  #1f1f23  (dropdowns, modals, inputs)
     Border:  #27272a  (visible borders)
     Ghost:   rgba(255,255,255,.04)  (subtle separators)
     Text:    #fafafa / #a1a1aa / #52525b  (primary/secondary/muted)
     Accent:  inherit from entity brand color; white for generic
   ══════════════════════════════════════════════════════════════ */

/* ── Core CSS Variables ────────────────────────────────────── */
[data-theme-mode="dark"] {
    --body-bg-rgb: 9, 9, 11 !important;
    --default-body-bg-color: #09090b !important;
    --default-text-color: #d4d4d8 !important;
    --custom-white: #18181b !important;
    --custom-black: #fafafa !important;
    --menu-bg: #111113 !important;
    --menu-border-color: #27272a !important;
    --menu-prime-color: #a1a1aa !important;
    --header-bg: #111113 !important;
    --header-prime-color: #d4d4d8 !important;
    --header-border-color: #1f1f23 !important;
    --default-border: #27272a !important;
    --bootstrap-card-border: #27272a !important;
    --input-border: #27272a !important;
    --form-control-bg: #1f1f23 !important;
    --list-hover-focus-bg: rgba(255,255,255,.03) !important;
    --text-muted: #52525b !important;
    --sa-primary-color: #fafafa !important;
    --light-rgb: 24, 24, 27 !important;
    --dark-rgb: 250, 250, 250 !important;
    --primary-rgb: 250, 250, 250 !important;
    /* Bootstrap 5 card/body vars */
    --bs-card-bg: #18181b !important;
    --bs-card-border-color: #27272a !important;
    --bs-card-cap-bg: #111113 !important;
    --bs-card-color: #d4d4d8 !important;
    --bs-body-bg: #09090b !important;
    --bs-body-color: #d4d4d8 !important;
    --bs-border-color: #27272a !important;
    --bs-tertiary-bg: #18181b !important;
    --bs-secondary-bg: #111113 !important;
    --bs-emphasis-color: #fafafa !important;
    --bs-light: #18181b !important;
    --bs-light-rgb: 24, 24, 27 !important;
    --bs-white-rgb: 24, 24, 27 !important;
    --default-background: #111113 !important;
    --gray-1: #111113 !important;
    --gray-2: #18181b !important;
    --gray-3: #1f1f23 !important;
}

/* ── Body ──────────────────────────────────────────────────── */
[data-theme-mode="dark"] body {
    background: #09090b;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .main-content {
    background: #09090b;
}

/* ══════════════════════════════════════════════════════════════
   Sidebar
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .app-sidebar {
    background: #111113;
    border-right: 1px solid #1f1f23;
}
[data-theme-mode="dark"] .app-sidebar .main-sidebar-header {
    background: #111113;
    border-color: #1f1f23;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item {
    color: #c8c8cd;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__label,
[data-theme-mode="dark"] .app-sidebar .side-menu__icon,
[data-theme-mode="dark"] .app-sidebar .side-menu__angle {
    color: #c8c8cd;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover {
    background-color: rgba(255,255,255,.04) !important;
    background: rgba(255,255,255,.04) !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover .side-menu__label,
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover .side-menu__icon,
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover .side-menu__angle {
    color: #ffffff;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item.active {
    background-color: rgba(255,255,255,.06) !important;
    background: rgba(255,255,255,.06) !important;
    border-left-color: transparent !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item.active .side-menu__label,
[data-theme-mode="dark"] .app-sidebar .side-menu__item.active .side-menu__icon {
    color: #ffffff !important;
}
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item { color: #b4b4bb; }
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item:hover,
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item.active { color: #ffffff; }
[data-theme-mode="dark"] .app-sidebar .side-menu__label1 { color: #71717a; }

/* Sidebar groups */
[data-theme-mode="dark"] .sa-sb-group-toggle,
[data-theme-mode="dark"] .sa-sb-mod-toggle {
    background: rgba(255,255,255,.03) !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-sb-group-toggle:hover,
[data-theme-mode="dark"] .sa-sb-mod-toggle:hover {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-sidebar-footer {
    border-color: #1f1f23;
    color: #52525b;
}

/* ══════════════════════════════════════════════════════════════
   Header / Topbar
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .app-header {
    background: #111113;
    border-bottom: 1px solid #1f1f23;
}
[data-theme-mode="dark"] .app-header .sa-topbar-action { color: #a1a1aa; }
[data-theme-mode="dark"] .app-header .sa-topbar-action:hover { color: #fafafa; }
[data-theme-mode="dark"] .horizontal-logo .header-logo img { filter: brightness(2); }

/* ══════════════════════════════════════════════════════════════
   Cards — the primary surface
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .card,
[data-theme-mode="dark"] .card.custom-card {
    background: #18181b;
    border: 1px solid #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .card-header,
[data-theme-mode="dark"] .card-footer {
    border-color: #27272a;
    background: transparent;
}
[data-theme-mode="dark"] .card-title { color: #fafafa; }

/* ══════════════════════════════════════════════════════════════
   Forms
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .form-control,
[data-theme-mode="dark"] .form-select,
[data-theme-mode="dark"] input[type="text"],
[data-theme-mode="dark"] input[type="email"],
[data-theme-mode="dark"] input[type="password"],
[data-theme-mode="dark"] input[type="number"],
[data-theme-mode="dark"] input[type="tel"],
[data-theme-mode="dark"] input[type="url"],
[data-theme-mode="dark"] input[type="search"],
[data-theme-mode="dark"] input[type="date"],
[data-theme-mode="dark"] input[type="datetime-local"],
[data-theme-mode="dark"] input[type="time"],
[data-theme-mode="dark"] textarea,
[data-theme-mode="dark"] select {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
}
[data-theme-mode="dark"] .form-control:focus,
[data-theme-mode="dark"] .form-select:focus,
[data-theme-mode="dark"] input:focus,
[data-theme-mode="dark"] textarea:focus,
[data-theme-mode="dark"] select:focus {
    border-color: #3f3f46 !important;
    background: #18181b !important;
    box-shadow: 0 0 0 3px rgba(250,250,250,.04) !important;
}
[data-theme-mode="dark"] .form-control::placeholder,
[data-theme-mode="dark"] input::placeholder,
[data-theme-mode="dark"] textarea::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .form-label { color: #a1a1aa; }
[data-theme-mode="dark"] .form-check-label { color: #a1a1aa; }
[data-theme-mode="dark"] .input-group-text {
    background: #18181b;
    border-color: #27272a;
    color: #71717a;
}

/* ══════════════════════════════════════════════════════════════
   Tables & DataTables
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .table,
[data-theme-mode="dark"] table.dataTable,
[data-theme-mode="dark"] table.sa-table,
[data-theme-mode="dark"] .dataTables_wrapper table {
    color: #d4d4d8 !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .table > :not(caption) > * > *,
[data-theme-mode="dark"] table.dataTable td,
[data-theme-mode="dark"] table.sa-table td {
    background-color: transparent !important;
    border-color: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .table thead th,
[data-theme-mode="dark"] table.dataTable thead th,
[data-theme-mode="dark"] table.sa-table thead th,
[data-theme-mode="dark"] .dataTables_wrapper thead th {
    background: #111113 !important;
    color: #a1a1aa !important;
    border-color: #27272a !important;
    box-shadow: none !important;
}
/* Sort arrows on dark headers — DT 2.x classes. */
[data-theme-mode="dark"] table.sa-table.dataTable th.dt-orderable-asc .dt-column-order,
[data-theme-mode="dark"] table.sa-table.dataTable th.dt-orderable-desc .dt-column-order {
    color: #71717a !important;
}
[data-theme-mode="dark"] table.sa-table.dataTable th.dt-ordering-asc .dt-column-order,
[data-theme-mode="dark"] table.sa-table.dataTable th.dt-ordering-desc .dt-column-order {
    color: #93a4f5 !important;
}
/* Sticky column header in dark mode — match dark header band. */
[data-theme-mode="dark"] thead .sa-sticky-col,
[data-theme-mode="dark"] .sa-table thead .sa-sticky-col {
    background: #111113 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-sticky-col {
    background: #18181b !important;
}
[data-theme-mode="dark"] .table-responsive tbody tr:nth-child(even) .sa-sticky-col {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .table tbody tr:hover > *,
[data-theme-mode="dark"] table.dataTable tbody tr:hover td,
[data-theme-mode="dark"] table.sa-table tbody tr:hover td {
    background: rgba(255,255,255,.03) !important;
}
/* Table wrappers and containers — no borders, no outlines */
[data-theme-mode="dark"] .dataTables_wrapper,
[data-theme-mode="dark"] .dt-container,
[data-theme-mode="dark"] .table-responsive,
[data-theme-mode="dark"] [class*="table-wrap"] {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
/* Kill outer border on the table element itself */
[data-theme-mode="dark"] table.sa-table,
[data-theme-mode="dark"] table.sa-comfortable,
[data-theme-mode="dark"] table.dataTable,
[data-theme-mode="dark"] .table {
    border: none !important;
    border-collapse: collapse !important;
}
/* Kill ALL table borders — outer and cell */
[data-theme-mode="dark"] table.sa-table,
[data-theme-mode="dark"] table.sa-comfortable,
[data-theme-mode="dark"] table.dataTable,
[data-theme-mode="dark"] .table,
[data-theme-mode="dark"] .card table,
[data-theme-mode="dark"] .card .table-responsive,
[data-theme-mode="dark"] .card .dt-container,
[data-theme-mode="dark"] .card .dataTables_wrapper {
    border: none !important;
    outline: none !important;
}
[data-theme-mode="dark"] table.sa-table td,
[data-theme-mode="dark"] table.sa-table th,
[data-theme-mode="dark"] table.sa-comfortable td,
[data-theme-mode="dark"] table.sa-comfortable th,
[data-theme-mode="dark"] table.dataTable td,
[data-theme-mode="dark"] table.dataTable th,
[data-theme-mode="dark"] .table td,
[data-theme-mode="dark"] .table th,
[data-theme-mode="dark"] .card table td,
[data-theme-mode="dark"] .card table th {
    border-color: rgba(255,255,255,.04) !important;
    border-left: none !important;
    border-right: none !important;
}
/* First row top border — none */
[data-theme-mode="dark"] table thead tr:first-child th {
    border-top: none !important;
}
/* Last row bottom border — none */
[data-theme-mode="dark"] table tbody tr:last-child td {
    border-bottom: none !important;
}
/* DataTables scroll wrappers */
[data-theme-mode="dark"] .dt-scroll,
[data-theme-mode="dark"] .dt-scroll-body,
[data-theme-mode="dark"] .dt-scroll-head,
[data-theme-mode="dark"] .dataTables_scrollBody,
[data-theme-mode="dark"] .dataTables_scrollHead {
    border: none !important;
}
/* Striped rows — every possible selector the template and DataTables use */
[data-theme-mode="dark"] table tbody tr:nth-child(odd),
[data-theme-mode="dark"] table tbody tr:nth-child(odd) td,
[data-theme-mode="dark"] table tbody tr:nth-child(odd) th,
[data-theme-mode="dark"] table.dataTable tbody tr:nth-child(odd),
[data-theme-mode="dark"] table.dataTable tbody tr:nth-child(odd) td,
[data-theme-mode="dark"] table.dataTable tbody tr.odd,
[data-theme-mode="dark"] table.dataTable tbody tr.odd td,
[data-theme-mode="dark"] .table-striped tbody tr:nth-child(odd),
[data-theme-mode="dark"] .table-striped tbody tr:nth-child(odd) td,
[data-theme-mode="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
[data-theme-mode="dark"] .mb-table tbody tr:nth-child(odd),
[data-theme-mode="dark"] .mb-table tbody tr:nth-child(odd) td {
    background: rgba(255,255,255,.02) !important;
    background-color: rgba(255,255,255,.02) !important;
    --bs-table-striped-bg: rgba(255,255,255,.02) !important;
    --bs-table-bg: transparent !important;
}
[data-theme-mode="dark"] table tbody tr:nth-child(even),
[data-theme-mode="dark"] table tbody tr:nth-child(even) td,
[data-theme-mode="dark"] table.dataTable tbody tr:nth-child(even),
[data-theme-mode="dark"] table.dataTable tbody tr:nth-child(even) td,
[data-theme-mode="dark"] table.dataTable tbody tr.even,
[data-theme-mode="dark"] table.dataTable tbody tr.even td,
[data-theme-mode="dark"] .table-striped tbody tr:nth-child(even) td,
[data-theme-mode="dark"] .table-striped > tbody > tr:nth-of-type(even) > *,
[data-theme-mode="dark"] .mb-table tbody tr:nth-child(even),
[data-theme-mode="dark"] .mb-table tbody tr:nth-child(even) td {
    background: transparent !important;
    background-color: transparent !important;
    --bs-table-bg: transparent !important;
}
/* Bootstrap table accent variable override */
[data-theme-mode="dark"] .table {
    --bs-table-striped-bg: rgba(255,255,255,.02) !important;
    --bs-table-hover-bg: rgba(255,255,255,.03) !important;
    --bs-table-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .dataTables_wrapper .dataTables_filter input,
[data-theme-mode="dark"] .dataTables_wrapper .dataTables_length select {
    background: #111113;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .dataTables_info,
[data-theme-mode="dark"] .dataTables_paginate { color: #52525b; }
[data-theme-mode="dark"] .dataTables_paginate .paginate_button { color: #52525b !important; }
[data-theme-mode="dark"] .dataTables_paginate .paginate_button.current {
    background: #27272a !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .dataTables_paginate .paginate_button:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}

/* ══════════════════════════════════════════════════════════════
   Modals
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .modal-content {
    background: #18181b;
    border: 1px solid #27272a;
    color: #d4d4d8;
    box-shadow: 0 25px 60px rgba(0,0,0,.8);
}
[data-theme-mode="dark"] .modal-header,
[data-theme-mode="dark"] .modal-footer { border-color: #1f1f23; }
[data-theme-mode="dark"] .modal-title { color: #fafafa; }
[data-theme-mode="dark"] .btn-close { filter: invert(1); opacity: .5; }
[data-theme-mode="dark"] .modal-backdrop { background: #000; opacity: .8; }

/* ══════════════════════════════════════════════════════════════
   Dropdowns
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .dropdown-menu {
    background: #1f1f23;
    border: 1px solid #27272a;
    color: #d4d4d8;
    box-shadow: 0 12px 40px rgba(0,0,0,.7);
}
[data-theme-mode="dark"] .dropdown-item { color: #a1a1aa; }
[data-theme-mode="dark"] .dropdown-item:hover,
[data-theme-mode="dark"] .dropdown-item:focus {
    background: rgba(255,255,255,.04);
    color: #fafafa;
}
[data-theme-mode="dark"] .dropdown-divider { border-color: #27272a; }

/* ══════════════════════════════════════════════════════════════
   Dashboard / Home Page
   ══════════════════════════════════════════════════════════════ */

/* Hero */
[data-theme-mode="dark"] .sa-home-hero {
    background: linear-gradient(160deg, #09090b 0%, #111113 100%) !important;
}
[data-theme-mode="dark"] .sa-home-hero__search input {
    background: rgba(255,255,255,.04) !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-home-hero__search input::placeholder {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-home-hero__search input:focus {
    background: rgba(255,255,255,.06) !important;
    border-color: #3f3f46 !important;
}

/* Section headers */
[data-theme-mode="dark"] .sa-home-section-header { color: #fafafa; }
[data-theme-mode="dark"] .sa-home-section-header__count {
    background: #27272a !important;
    color: #a1a1aa !important;
}

/* Module cards */
[data-theme-mode="dark"] .sa-wk {
    background: #18181b;
    border: 1px solid #27272a;
    transition: all .25s ease;
}
[data-theme-mode="dark"] .sa-wk:hover {
    border-color: #3f3f46;
    box-shadow: 0 8px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03);
    transform: translateY(-2px);
}
[data-theme-mode="dark"] .sa-wk__brand {
    background: #111113;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-wk__icon img {
    filter: brightness(0) invert(1) !important;
}
[data-theme-mode="dark"] .sa-wk__name { color: #fafafa; }
[data-theme-mode="dark"] .sa-wk__desc { color: #71717a; }
[data-theme-mode="dark"] .sa-wk__data { border-color: #1f1f23; }
[data-theme-mode="dark"] .sa-wk__data-label { color: #52525b; }
[data-theme-mode="dark"] .sa-wk__data-value { color: #a1a1aa; }
[data-theme-mode="dark"] .sa-wk__entity { color: #52525b; }

/* Tags */
[data-theme-mode="dark"] .sa-wk__tag--admin {
    background: rgba(70,60,55,.12);
    color: #C5B9A7;
}
[data-theme-mode="dark"] .sa-wk__tag--customer {
    background: rgba(16,185,129,.12);
    color: #34d399;
}

/* Launch button */
[data-theme-mode="dark"] .sa-wk__launch {
    filter: brightness(1.1);
}
[data-theme-mode="dark"] .sa-wk:hover .sa-wk__launch {
    filter: brightness(1.2);
    box-shadow: 0 4px 15px rgba(0,0,0,.3);
}

/* List view rows */
[data-theme-mode="dark"] .sa-wk-list-row {
    background: #18181b;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-wk-list-row:hover {
    background: #1f1f23;
}

/* Filter pills */
[data-theme-mode="dark"] .sa-home-filter-btn,
[data-theme-mode="dark"] [class*="filter-btn"],
[data-theme-mode="dark"] [class*="filter-pill"] {
    background: #1f1f23;
    border-color: #27272a;
    color: #71717a;
}
[data-theme-mode="dark"] .sa-home-filter-btn:hover,
[data-theme-mode="dark"] [class*="filter-btn"]:hover {
    background: #27272a;
    color: #e4e4e7;
}
[data-theme-mode="dark"] .sa-home-filter-btn.active,
[data-theme-mode="dark"] [class*="filter-btn"].active {
    background: #fafafa;
    color: #09090b;
    border-color: #fafafa;
}

/* View toggle */
[data-theme-mode="dark"] .sa-home-view-btn,
[data-theme-mode="dark"] [class*="view-btn"]:not(.rn-view-btn) {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-home-view-btn.active,
[data-theme-mode="dark"] [class*="view-btn"].active:not(.rn-view-btn) {
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Notifications
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-notification-dropdown {
    background: #18181b;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.8);
}
[data-theme-mode="dark"] .sa-notif-item { border-color: #1f1f23; }
[data-theme-mode="dark"] .sa-notif-item:hover { background: #111113; }
[data-theme-mode="dark"] .sa-notif-tab { color: #52525b; }
[data-theme-mode="dark"] .sa-notif-tab.active { color: #fafafa; border-color: #fafafa; }
[data-theme-mode="dark"] .sa-notification-header { border-color: #27272a; }
[data-theme-mode="dark"] .sa-notification-footer { border-color: #1f1f23; }

/* ══════════════════════════════════════════════════════════════
   Customize Panel
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-customize-overlay {
    background: rgba(0,0,0,.6);
}
[data-theme-mode="dark"] .sa-customize-panel {
    background: #18181b;
    border-color: #27272a;
    box-shadow: -8px 0 30px rgba(0,0,0,.5);
}
[data-theme-mode="dark"] .sa-customize-panel__header {
    border-bottom-color: #27272a;
}
[data-theme-mode="dark"] .sa-customize-panel__title { color: #fafafa; }
[data-theme-mode="dark"] .sa-customize-panel__close { color: #52525b; }
[data-theme-mode="dark"] .sa-customize-panel__close:hover { color: #fafafa; }
[data-theme-mode="dark"] .sa-customize-group__label { color: #52525b; }
[data-theme-mode="dark"] .sa-customize-item { color: #d4d4d8; }
[data-theme-mode="dark"] .sa-customize-item:hover { background: #1f1f23; }
[data-theme-mode="dark"] .sa-customize-item__desc { color: #52525b; }
[data-theme-mode="dark"] .sa-customize-actions { border-top-color: #27272a; }
[data-theme-mode="dark"] .sa-customize-actions .sa-customize-reset {
    background: #27272a;
    color: #a1a1aa;
}
[data-theme-mode="dark"] .sa-customize-actions .sa-customize-reset:hover {
    background: #3f3f46;
}
[data-theme-mode="dark"] .sa-customize-btn {
    background: rgba(255,255,255,.04) !important;
    border-color: rgba(255,255,255,.08) !important;
    color: rgba(255,255,255,.5) !important;
}
[data-theme-mode="dark"] .sa-customize-btn:hover {
    background: rgba(255,255,255,.08) !important;
    color: #fafafa !important;
}

/* ══════════════════════════════════════════════════════════════
   Buttons
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .btn-light {
    background: #1f1f23;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .btn-light:hover {
    background: #27272a;
    color: #fafafa;
}
[data-theme-mode="dark"] .btn-outline-light {
    border-color: #27272a;
    color: #a1a1aa;
}
[data-theme-mode="dark"] .btn-outline-light:hover {
    background: #1f1f23;
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Typography & Misc
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .text-muted { color: #52525b !important; }
[data-theme-mode="dark"] h1, [data-theme-mode="dark"] h2,
[data-theme-mode="dark"] h3, [data-theme-mode="dark"] h4,
[data-theme-mode="dark"] h5, [data-theme-mode="dark"] h6 { color: #fafafa; }
[data-theme-mode="dark"] p { color: #a1a1aa; }
[data-theme-mode="dark"] a:not(.btn):not(.side-menu__item):not(.dropdown-item) { color: #d4d4d8; }
[data-theme-mode="dark"] a:not(.btn):not(.side-menu__item):not(.dropdown-item):hover { color: #fafafa; }
[data-theme-mode="dark"] hr { border-color: #1f1f23; }
[data-theme-mode="dark"] .border { border-color: #27272a !important; }
[data-theme-mode="dark"] .bg-light { background: #18181b !important; }
[data-theme-mode="dark"] .bg-white { background: #18181b !important; }
[data-theme-mode="dark"] .text-dark { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .list-group-item {
    background: #18181b;
    border-color: #1f1f23;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .breadcrumb-item a { color: #52525b; }
[data-theme-mode="dark"] .breadcrumb-item.active { color: #d4d4d8; }
[data-theme-mode="dark"] .page-header-breadcrumb { color: #52525b; }
[data-theme-mode="dark"] code { background: #1f1f23; color: #f87171; }
[data-theme-mode="dark"] pre { background: #111113; border-color: #27272a; }

/* ══════════════════════════════════════════════════════════════
   Tabs
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .nav-tabs { border-color: #1f1f23; }
[data-theme-mode="dark"] .nav-tabs .nav-link { color: #52525b; }
[data-theme-mode="dark"] .nav-tabs .nav-link:hover { color: #d4d4d8; background: rgba(255,255,255,.02); }
[data-theme-mode="dark"] .nav-tabs .nav-link.active {
    background: #18181b;
    border-color: #27272a;
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Alerts, Badges, Progress
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .alert {
    border-color: #27272a;
    background: #18181b;
}
[data-theme-mode="dark"] .badge { opacity: .85; }
[data-theme-mode="dark"] .progress { background: #1f1f23; }

/* ══════════════════════════════════════════════════════════════
   Tooltips, Popovers, Toasts
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .tooltip-inner { background: #27272a; color: #fafafa; }
[data-theme-mode="dark"] .popover { background: #1f1f23; border-color: #27272a; }
[data-theme-mode="dark"] .popover-body { color: #d4d4d8; }
[data-theme-mode="dark"] .toast { background: #18181b; border-color: #27272a; color: #d4d4d8; }

/* ══════════════════════════════════════════════════════════════
   Scrollbar — thin, dark
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] ::-webkit-scrollbar { background: #09090b; width: 5px; height: 5px; }
[data-theme-mode="dark"] ::-webkit-scrollbar-thumb { background: #27272a; }
[data-theme-mode="dark"] ::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* ══════════════════════════════════════════════════════════════
   Release Notes — dark mode
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .rn-view-toggle { background: #1f1f23; border-color: #27272a; }
[data-theme-mode="dark"] .rn-view-btn { color: #52525b; background: transparent; }
[data-theme-mode="dark"] .rn-view-btn:hover { color: #d4d4d8; background: rgba(255,255,255,.03); }
[data-theme-mode="dark"] .rn-view-btn.active { background: #18181b; color: #fafafa; box-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* ══════════════════════════════════════════════════════════════
   Page Headers & Breadcrumbs
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .page-header-breadcrumb {
    background: #111113 !important;
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .page-header-breadcrumb h4,
[data-theme-mode="dark"] .page-header-breadcrumb .fw-semibold { color: #fafafa; }
[data-theme-mode="dark"] .page-header-breadcrumb .text-muted { color: #52525b !important; }

/* ══════════════════════════════════════════════════════════════
   DataTables — Full Dark Treatment
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .dt-container,
[data-theme-mode="dark"] .dataTables_wrapper { color: #d4d4d8; }
[data-theme-mode="dark"] .dt-container .dt-search input,
[data-theme-mode="dark"] .dt-container .dt-length select {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .dt-container .dt-search label,
[data-theme-mode="dark"] .dt-container .dt-length label { color: #a1a1aa; }
[data-theme-mode="dark"] .dt-container .dt-info { color: #52525b; }
[data-theme-mode="dark"] .dt-container .dt-paging .dt-paging-button {
    color: #52525b !important;
    border-color: transparent !important;
}
[data-theme-mode="dark"] .dt-container .dt-paging .dt-paging-button:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .dt-container .dt-paging .dt-paging-button.current {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .dt-container .dt-paging .dt-paging-button.disabled {
    color: #3f3f46 !important;
}
/* DataTable button group (export, filters, etc.) */
[data-theme-mode="dark"] .dt-buttons .dt-button,
[data-theme-mode="dark"] .dt-buttons .btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .dt-buttons .dt-button:hover,
[data-theme-mode="dark"] .dt-buttons .btn:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
/* DataTable processing overlay */
[data-theme-mode="dark"] .dt-processing,
[data-theme-mode="dark"] .dataTables_processing {
    background: rgba(9,9,11,.9) !important;
    color: #a1a1aa !important;
}
/* DataTable empty row */
[data-theme-mode="dark"] .dataTables_empty,
[data-theme-mode="dark"] .dt-empty {
    color: #52525b;
}

/* ══════════════════════════════════════════════════════════════
   Stat Cards (KPI cards on dashboards)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-stat-card {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-stat-card:hover {
    border-color: #3f3f46;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
[data-theme-mode="dark"] .sa-stat-card__title { color: #71717a; }
[data-theme-mode="dark"] .sa-stat-card__value { color: #fafafa; }
[data-theme-mode="dark"] .sa-stat-card__icon {
    background: #1f1f23;
    color: #a1a1aa;
}
/* Colored stat variants — muted in dark */
[data-theme-mode="dark"] .sa-stat-card--highlight {
    background: #18181b;
    border-color: rgba(249,115,22,.25);
}
[data-theme-mode="dark"] .sa-stat-card--highlight .sa-stat-card__value { color: #fb923c; }
[data-theme-mode="dark"] .sa-stat-card--highlight .sa-stat-card__icon { background: rgba(249,115,22,.1); color: #fb923c; }
[data-theme-mode="dark"] .sa-stat-card--success {
    background: #18181b;
    border-color: rgba(122,140,110,.25);
}
[data-theme-mode="dark"] .sa-stat-card--success .sa-stat-card__value { color: #4ade80; }
[data-theme-mode="dark"] .sa-stat-card--success .sa-stat-card__icon { background: rgba(122,140,110,.1); color: #4ade80; }
[data-theme-mode="dark"] .sa-stat-card--danger {
    background: #18181b;
    border-color: rgba(239,68,68,.25);
}
[data-theme-mode="dark"] .sa-stat-card--danger .sa-stat-card__value { color: #f87171; }
[data-theme-mode="dark"] .sa-stat-card--danger .sa-stat-card__icon { background: rgba(239,68,68,.1); color: #f87171; }

/* ══════════════════════════════════════════════════════════════
   Dashboard Cards (collapsible panels)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-dashboard-card {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-dashboard-card__header {
    border-color: #1f1f23;
    background: transparent;
}
[data-theme-mode="dark"] .sa-dashboard-card__title { color: #fafafa; }
[data-theme-mode="dark"] .sa-dashboard-card__title i { color: #52525b; }
[data-theme-mode="dark"] .sa-dashboard-card__link { color: #a1a1aa; }
[data-theme-mode="dark"] .sa-dashboard-card__link:hover { color: #fafafa; }
[data-theme-mode="dark"] .sa-dashboard-card__toggle { color: #52525b; }
[data-theme-mode="dark"] .sa-dashboard-card__body { color: #d4d4d8; }

/* ══════════════════════════════════════════════════════════════
   Customer Cards (admin entity cards grid)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-customer-card {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-customer-card:hover {
    border-color: #3f3f46;
    box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
[data-theme-mode="dark"] .sa-customer-cards-count { color: #52525b; }

/* ══════════════════════════════════════════════════════════════
   Analytics & Charts
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-analytics-chart-container {
    background: #18181b;
    border-color: #27272a;
}
/* ApexCharts dark overrides */
[data-theme-mode="dark"] .apexcharts-canvas { background: transparent !important; }
[data-theme-mode="dark"] .apexcharts-text { fill: #a1a1aa !important; }
[data-theme-mode="dark"] .apexcharts-title-text { fill: #fafafa !important; }
[data-theme-mode="dark"] .apexcharts-subtitle-text { fill: #71717a !important; }
[data-theme-mode="dark"] .apexcharts-legend-text { color: #a1a1aa !important; }
[data-theme-mode="dark"] .apexcharts-gridline { stroke: #1f1f23 !important; }
[data-theme-mode="dark"] .apexcharts-grid-borders line { stroke: #1f1f23 !important; }
[data-theme-mode="dark"] .apexcharts-xaxis line,
[data-theme-mode="dark"] .apexcharts-yaxis line { stroke: #27272a !important; }
[data-theme-mode="dark"] .apexcharts-xaxis-tick { stroke: #27272a !important; }
[data-theme-mode="dark"] .apexcharts-tooltip {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
[data-theme-mode="dark"] .apexcharts-tooltip-title {
    background: #27272a !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .apexcharts-tooltip-text { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .apexcharts-xaxistooltip,
[data-theme-mode="dark"] .apexcharts-yaxistooltip {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
/* Chart.js canvas — transparent bg */
[data-theme-mode="dark"] canvas.chartjs-render-monitor { background: transparent; }

/* ══════════════════════════════════════════════════════════════
   Pills & Badges — refined dark palette
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-pill--info { background: rgba(197,185,167,.12); color: #C5B9A7; }
[data-theme-mode="dark"] .sa-pill--warning { background: rgba(251,191,36,.12); color: #fbbf24; }
[data-theme-mode="dark"] .sa-pill--success { background: rgba(52,211,153,.12); color: #34d399; }
[data-theme-mode="dark"] .sa-pill--danger { background: rgba(248,113,113,.12); color: #f87171; }
[data-theme-mode="dark"] .sa-pill--purple { background: rgba(167,139,250,.12); color: #a78bfa; }
[data-theme-mode="dark"] .sa-pill--subtle { background: rgba(161,161,170,.08); color: #a1a1aa; }
[data-theme-mode="dark"] .sa-pill--muted { color: #52525b; }
[data-theme-mode="dark"] .sa-pill--outline { border-color: #27272a; color: #d4d4d8; }
[data-theme-mode="dark"] .sa-cell-stack__secondary { color: #71717a; }

/* ══════════════════════════════════════════════════════════════
   Maps (Google Maps in dashboards)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-dashboard-card--map { border-color: #27272a; }

/* ══════════════════════════════════════════════════════════════
   Accordion & Collapse
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .accordion-item {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .accordion-button {
    background: #18181b;
    color: #d4d4d8;
    border-color: #27272a;
}
[data-theme-mode="dark"] .accordion-button:not(.collapsed) {
    background: #1f1f23;
    color: #fafafa;
}
[data-theme-mode="dark"] .accordion-button::after { filter: invert(1); }
[data-theme-mode="dark"] .accordion-body { background: #18181b; color: #d4d4d8; }

/* ══════════════════════════════════════════════════════════════
   Offcanvas / Side Panels
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .offcanvas {
    background: #18181b;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .offcanvas-header { border-color: #1f1f23; }
[data-theme-mode="dark"] .offcanvas-title { color: #fafafa; }

/* ══════════════════════════════════════════════════════════════
   Action menus & context dropdowns
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-action-dropdown {
    background: #1f1f23;
    border-color: #27272a;
    box-shadow: 0 8px 24px rgba(0,0,0,.6);
}
[data-theme-mode="dark"] .sa-action-dropdown .dropdown-item { color: #a1a1aa; }
[data-theme-mode="dark"] .sa-action-dropdown .dropdown-item:hover {
    background: rgba(255,255,255,.04);
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-action-dropdown .dropdown-divider { border-color: #27272a; }

/* ══════════════════════════════════════════════════════════════
   Bootstrap utilities — force dark overrides
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .bg-body { background: #09090b !important; }
[data-theme-mode="dark"] .bg-body-secondary { background: #111113 !important; }
[data-theme-mode="dark"] .bg-body-tertiary { background: #18181b !important; }
[data-theme-mode="dark"] .text-body { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .text-body-secondary { color: #a1a1aa !important; }
[data-theme-mode="dark"] .text-body-tertiary { color: #71717a !important; }
[data-theme-mode="dark"] .border-bottom { border-color: #1f1f23 !important; }
[data-theme-mode="dark"] .border-top { border-color: #1f1f23 !important; }
[data-theme-mode="dark"] .shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,.4) !important; }
[data-theme-mode="dark"] .shadow { box-shadow: 0 4px 12px rgba(0,0,0,.5) !important; }

/* ── Avatar dropdown header (name/email block) ─────────────── */
[data-theme-mode="dark"] .sa-profile-dropdown-header {
    background: #111113 !important;
}
[data-theme-mode="dark"] .sa-profile-dropdown-header .fw-semibold { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-profile-dropdown-header .text-muted { color: #71717a !important; }
[data-theme-mode="dark"] .sa-profile-dropdown,
[data-theme-mode="dark"] .header-profile-dropdown {
    background: #18181b !important;
    border: none !important;
}
[data-theme-mode="dark"] .sa-dropdown-section-label {
    color: #52525b !important;
}

/* ══════════════════════════════════════════════════════════════
   Dark Mode Toggle — pill switch with sun / moon icons
   ══════════════════════════════════════════════════════════════ */
#darkModeToggle { cursor: pointer; }

.sa-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}
.sa-theme-switch__label {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #a1a1aa;
    transition: color .25s, opacity .25s;
    opacity: .5;
    line-height: 1;
}
.sa-theme-switch__label.active {
    opacity: 1;
    color: #18181b;
}
.sa-theme-switch__track {
    position: relative;
    width: 36px;
    height: 20px;
    border-radius: 999px;
    background: #e4e4e7;
    transition: background .3s;
    flex-shrink: 0;
}
.sa-theme-switch__track.dark {
    background: #3f3f46;
}
.sa-theme-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
    transition: transform .3s cubic-bezier(.4,.0,.2,1), background .3s;
}
.sa-theme-switch__track.dark .sa-theme-switch__thumb {
    transform: translateX(16px);
    background: #18181b;
}

/* Dark mode overrides for the switch labels */
[data-theme-mode="dark"] .sa-theme-switch__label {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-theme-switch__label.active {
    color: #fafafa;
}

/* Light mode on a dark/gradient header (AtlasMPS): keep LIGHT label readable */
[data-theme-mode="light"][data-header-styles="gradient"] .app-header .sa-theme-switch__label,
[data-theme-mode="light"][data-header-styles="dark"] .app-header .sa-theme-switch__label {
    color: #d4d4d8;
}
[data-theme-mode="light"][data-header-styles="gradient"] .app-header .sa-theme-switch__label.active,
[data-theme-mode="light"][data-header-styles="dark"] .app-header .sa-theme-switch__label.active {
    color: #ffffff;
}

/* ══════════════════════════════════════════════════════════════
   Hero — Inline Stat Pills & Status Indicators
   (Inline styles in admin/home/index.php need !important)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-home-hero__search i {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-hero-stat {
    background: rgba(255,255,255,.06) !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-hero-stat i {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-hero-stat span {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-hero-status {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-hero-status--ok {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-hero-tip {
    color: #52525b !important;
}

/* ── Admin home hero (admin-pages.css variant) ────────────── */
[data-theme-mode="dark"] .sa-hero {
    background: linear-gradient(160deg, #09090b 0%, #111113 100%) !important;
}
[data-theme-mode="dark"] .sa-hero::before,
[data-theme-mode="dark"] .sa-hero::after,
[data-theme-mode="dark"] .sa-hero__orb3 {
    opacity: .3;
}
[data-theme-mode="dark"] .sa-hero__stats {
    background: rgba(255,255,255,.04) !important;
}
[data-theme-mode="dark"] .sa-hero__stat {
    background: rgba(255,255,255,.02) !important;
}
[data-theme-mode="dark"] .sa-hero__stat:hover {
    background: rgba(255,255,255,.05) !important;
}

/* ══════════════════════════════════════════════════════════════
   Home Section Headers (ADMIN MODULES / CUSTOMER MODULES)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-home-section-header__title {
    color: #71717a !important;
}

/* ══════════════════════════════════════════════════════════════
   Workspace Toolbar — Filters & View Toggle
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-wk-toolbar__search input {
    background: #111113;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-wk-toolbar__search input::placeholder {
    color: #3f3f46;
}
[data-theme-mode="dark"] .sa-wk-toolbar__search input:focus {
    border-color: #3f3f46;
    background: #18181b;
}
[data-theme-mode="dark"] .sa-wk-toolbar__search i {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-wk-filter {
    background: #1f1f23;
    border-color: #27272a;
    color: #71717a;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .sa-wk-filter:first-child {
    border-left-color: #27272a;
}
[data-theme-mode="dark"] .sa-wk-filter:hover {
    background: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-wk-filter.active {
    background: #fafafa;
    color: #09090b;
    border-color: #fafafa;
}
[data-theme-mode="dark"] .sa-wk-filter__count {
    background: rgba(255,255,255,.1);
}
[data-theme-mode="dark"] .sa-wk-filter.active .sa-wk-filter__count {
    background: rgba(0,0,0,.15);
}
[data-theme-mode="dark"] .sa-wk-view {
    background: #1f1f23;
    border-color: #27272a;
    color: #52525b;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .sa-wk-view:hover {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-wk-view.active {
    background: #fafafa;
    color: #09090b;
    border-color: #fafafa;
}

/* ── List view header ─────────────────────────────────────── */
[data-theme-mode="dark"] .sa-wk-list-view {
    border-color: #27272a;
    background: #18181b;
}
[data-theme-mode="dark"] .sa-wk-list-header {
    background: #111113;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-wk-list-header .sa-wk-list-col {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-wk-list-col--name {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-wk-list-col--entity {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-wk-list-col--code {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-wk-list-dot {
    opacity: .8;
}

/* ── Empty state in workspace ─────────────────────────────── */
[data-theme-mode="dark"] .sa-wk-empty {
    color: #52525b;
}

/* ══════════════════════════════════════════════════════════════
   Directory — View Switcher & Cards
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-dir-view-switcher {
    background: #1f1f23;
}
[data-theme-mode="dark"] .sa-dir-view-switcher .sa-view-btn {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-dir-view-switcher .sa-view-btn:hover {
    color: #d4d4d8;
    background: rgba(255,255,255,.04);
}
[data-theme-mode="dark"] .sa-dir-view-switcher .sa-view-btn.active {
    background: #fafafa;
    color: #09090b;
}
[data-theme-mode="dark"] .sa-dir-card {
    background: #18181b;
    border-color: #27272a;
    transition: border-color .15s ease, box-shadow .15s ease;
}
[data-theme-mode="dark"] .sa-dir-card:hover {
    border-color: #3f3f46;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
[data-theme-mode="dark"] .sa-dir-card__avatar {
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-dir-card__name {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-dir-card__meta {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-dir-card__meta span {
    color: #52525b;
}

/* ══════════════════════════════════════════════════════════════
   Notifications — Dark Mode Enhancement
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-notification-header {
    background: #111113;
}
[data-theme-mode="dark"] .sa-notification-header h6 {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-notif-tab {
    color: #52525b !important;
    border-bottom-color: transparent !important;
}
[data-theme-mode="dark"] .sa-notif-tab.active {
    color: #fafafa !important;
    border-bottom-color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-notif-item {
    background: rgba(255,255,255,.02);
}
[data-theme-mode="dark"] .sa-notif-item--read {
    background: transparent;
}
[data-theme-mode="dark"] .sa-notif-item--read:hover {
    background: rgba(255,255,255,.02);
}
[data-theme-mode="dark"] .sa-notif-title {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-notif-item--read .sa-notif-title {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-notif-message {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-notif-item--read .sa-notif-message {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-notif-meta {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-notif-time {
    color: #3f3f46;
}
[data-theme-mode="dark"] .sa-notif-dot {
    background: #fafafa;
}
[data-theme-mode="dark"] .sa-notif-dismiss {
    color: #3f3f46;
}
[data-theme-mode="dark"] .sa-notif-dismiss:hover {
    background: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-notif-action-btn {
    background: #1f1f23;
    border-color: #27272a;
    color: #71717a;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .sa-notif-action-btn:hover:not(:disabled) {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-notif-action-btn--danger:hover:not(:disabled) {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.3);
    color: #f87171;
}
[data-theme-mode="dark"] .sa-notif-action-divider {
    background: #27272a;
}
[data-theme-mode="dark"] .sa-notif-checkbox {
    accent-color: #fafafa;
}
[data-theme-mode="dark"] .sa-notification-footer a {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-notification-footer a:hover {
    color: #fafafa !important;
}

/* ══════════════════════════════════════════════════════════════
   User Profile Page
   (Profile uses [data-theme-mode="dark"] — mirror with
    [data-theme-mode="dark"] for toggle-based switching)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sp-hero {
    background: rgba(255,255,255,.02);
    border-color: #1f1f23;
}
[data-theme-mode="dark"] .sp-hero__name { color: #fafafa; }
[data-theme-mode="dark"] .sp-hero__title { color: #71717a; }
[data-theme-mode="dark"] .sp-meta-chip {
    color: #d4d4d8;
    background: rgba(255,255,255,.04);
    border-color: #27272a;
}
[data-theme-mode="dark"] .sp-meta-chip i { color: #52525b; }
[data-theme-mode="dark"] .sp-contact-link { color: #a1a1aa; }
[data-theme-mode="dark"] .sp-contact-link:hover { color: #fafafa; }
[data-theme-mode="dark"] .sp-headshot {
    box-shadow: 0 2px 12px rgba(0,0,0,.4);
    background: #1f1f23;
    color: #71717a;
}
[data-theme-mode="dark"] .sp-upload-btn {
    background: #27272a;
    color: #d4d4d8;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
[data-theme-mode="dark"] .sp-credential-badge {
    background: rgba(255,255,255,.06);
    border-color: #27272a;
}
[data-theme-mode="dark"] .sp-tabs-wrapper {
    background: rgba(255,255,255,.02);
    border-color: #1f1f23;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link:hover {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link.active {
    color: #fafafa;
    border-bottom-color: #fafafa;
}
[data-theme-mode="dark"] .sp-tab-badge {
    background: rgba(255,255,255,.06);
    color: #71717a;
}
[data-theme-mode="dark"] .sa-profile .sp-nav-tabs .nav-link.active .sp-tab-badge {
    background: #fafafa;
    color: #09090b;
}
[data-theme-mode="dark"] .sp-tab-content {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sp-read-label { color: #52525b; }
[data-theme-mode="dark"] .sp-read-value { color: #fafafa; }
[data-theme-mode="dark"] .sp-form label { color: #a1a1aa; }
[data-theme-mode="dark"] .sp-form .form-control,
[data-theme-mode="dark"] .sp-form .form-select {
    border-color: #27272a;
    background: #111113;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sp-form .form-control:focus,
[data-theme-mode="dark"] .sp-form .form-select:focus {
    border-color: #3f3f46;
    box-shadow: 0 0 0 1px rgba(250,250,250,.04);
}
[data-theme-mode="dark"] .sp-form-section {
    border-color: #1f1f23;
}
[data-theme-mode="dark"] .sp-form-section__title { color: #fafafa; }
[data-theme-mode="dark"] .sp-form-section__icon {
    background: #1f1f23;
    color: #71717a;
}
[data-theme-mode="dark"] .sp-form-subsection {
    border-color: #1f1f23;
}
[data-theme-mode="dark"] .sp-form-subsection__label { color: #52525b; }
[data-theme-mode="dark"] .sp-form-actions { border-color: #1f1f23; }
[data-theme-mode="dark"] .sp-entity-list { border-color: #27272a; }
[data-theme-mode="dark"] .sp-entity-row + .sp-entity-row { border-color: #1f1f23; }
[data-theme-mode="dark"] .sp-entity-row:hover { background: rgba(255,255,255,.03); }
[data-theme-mode="dark"] .sp-role-badge {
    background: rgba(255,255,255,.06);
    color: #a1a1aa;
}
[data-theme-mode="dark"] .sp-check-card {
    border-color: #27272a;
}
[data-theme-mode="dark"] .sp-check-card:hover {
    border-color: #3f3f46;
    background: rgba(255,255,255,.03);
}
[data-theme-mode="dark"] .sp-check-card--active {
    border-color: #fafafa;
    background: rgba(255,255,255,.04);
    border-left-color: #fafafa;
}
[data-theme-mode="dark"] .sp-hint {
    background: rgba(255,255,255,.02);
    border-color: #1f1f23;
    border-left-color: #3f3f46;
    color: #71717a;
}
[data-theme-mode="dark"] .sp-empty-state { color: #52525b; }

/* ══════════════════════════════════════════════════════════════
   Release Notes — Full Dark Treatment
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .rn-toolbar {
    background: #111113;
    border-color: #27272a;
}
[data-theme-mode="dark"] .rn-search input {
    background: #111113;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .rn-search input::placeholder {
    color: #3f3f46;
}
[data-theme-mode="dark"] .rn-search input:focus {
    border-color: #3f3f46;
}
[data-theme-mode="dark"] .rn-search i {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-filter-pill {
    background: #1f1f23;
    border-color: #27272a;
    color: #71717a;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .rn-filter-pill:hover {
    border-color: #3f3f46;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .rn-filter-pill.active {
    background: #fafafa;
    border-color: #fafafa;
    color: #09090b;
}
[data-theme-mode="dark"] .rn-container {
    border-color: #27272a;
}
[data-theme-mode="dark"] .rn-sidebar {
    background: #111113;
    border-right-color: #27272a;
}
[data-theme-mode="dark"] .rn-sidebar-month {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-sidebar-month:hover {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .rn-sidebar-item {
    transition: all .15s ease;
}
[data-theme-mode="dark"] .rn-sidebar-item:hover {
    background: rgba(255,255,255,.04);
}
[data-theme-mode="dark"] .rn-sidebar-item.active {
    border-left-color: #fafafa;
    background: rgba(255,255,255,.06);
}
[data-theme-mode="dark"] .rn-sidebar-item.active .rn-sidebar-ver {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .rn-sidebar-ver {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .rn-sidebar-date {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-sidebar-counts {
    color: #3f3f46;
}
[data-theme-mode="dark"] .rn-sidebar-new {
    background: #dc2626;
    color: #fff;
}
[data-theme-mode="dark"] .rn-content {
    background: #18181b;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .rn-version-section {
    border-color: #1f1f23;
}
[data-theme-mode="dark"] .rn-version-header {
    transition: opacity .15s ease;
}
[data-theme-mode="dark"] .rn-version-toggle {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-version-num {
    color: #fafafa;
}
[data-theme-mode="dark"] .rn-version-date {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-version-badge {
    background: #1f1f23;
    color: #71717a;
}
[data-theme-mode="dark"] .rn-version-stat {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-version-stat--added { color: #4ade80; }
[data-theme-mode="dark"] .rn-version-stat--improved { color: #C5B9A7; }
[data-theme-mode="dark"] .rn-version-stat--fixed { color: #fbbf24; }
[data-theme-mode="dark"] .rn-version-permalink {
    color: #3f3f46;
}
[data-theme-mode="dark"] .rn-version-permalink:hover {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .rn-section {
    border-left-color: #27272a;
}
[data-theme-mode="dark"] .rn-section--added { border-left-color: #4ade80; }
[data-theme-mode="dark"] .rn-section--improved { border-left-color: #C5B9A7; }
[data-theme-mode="dark"] .rn-section--fixed { border-left-color: #fbbf24; }
[data-theme-mode="dark"] .rn-section--added .rn-section-label { color: #4ade80; }
[data-theme-mode="dark"] .rn-section--improved .rn-section-label { color: #C5B9A7; }
[data-theme-mode="dark"] .rn-section--fixed .rn-section-label { color: #fbbf24; }
[data-theme-mode="dark"] .rn-list li {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .rn-list li::before {
    background: #3f3f46;
}
[data-theme-mode="dark"] .rn-section--added .rn-list li::before { background: #4ade80; }
[data-theme-mode="dark"] .rn-section--improved .rn-list li::before { background: #C5B9A7; }
[data-theme-mode="dark"] .rn-section--fixed .rn-list li::before { background: #fbbf24; }
[data-theme-mode="dark"] .rn-list li mark {
    background: rgba(250,204,21,.15);
    color: #fbbf24;
}
[data-theme-mode="dark"] .rn-scope-pill {
    border-color: #27272a;
}
[data-theme-mode="dark"] .rn-scope-pill--all {
    background: #1f1f23;
    color: #71717a;
    border-color: #27272a;
}
[data-theme-mode="dark"] .rn-scope-pill--admin {
    background: rgba(251,191,36,.1);
    color: #fbbf24;
    border-color: rgba(251,191,36,.2);
}
[data-theme-mode="dark"] .rn-scope-pill--customer {
    background: rgba(197,185,167,.1);
    color: #C5B9A7;
    border-color: rgba(197,185,167,.2);
}
[data-theme-mode="dark"] .rn-scope-pill--entity {
    background: rgba(167,139,250,.1);
    color: #a78bfa;
    border-color: rgba(167,139,250,.2);
}
[data-theme-mode="dark"] .rn-no-updates {
    color: #3f3f46;
}
[data-theme-mode="dark"] .rn-empty-search {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-cat-pill {
    background: #1f1f23;
    border-color: #27272a;
    color: #71717a;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .rn-cat-pill:hover {
    border-color: #3f3f46;
    color: #d4d4d8;
}
/* Active cat pills keep their brand colors */
[data-theme-mode="dark"] .rn-cat-pill[data-cat="added"].active { background: #5F7058; border-color: #5F7058; color: #fff; }
[data-theme-mode="dark"] .rn-cat-pill[data-cat="improved"].active { background: #3D3833; border-color: #3D3833; color: #fff; }
[data-theme-mode="dark"] .rn-cat-pill[data-cat="fixed"].active { background: #A87825; border-color: #A87825; color: #fff; }
[data-theme-mode="dark"] .rn-back-top {
    background: #27272a;
    color: #a1a1aa;
    border-color: #3f3f46;
}
[data-theme-mode="dark"] .rn-back-top:hover {
    background: #3f3f46;
    color: #fafafa;
}

/* ── Release Notes — Calendar View ────────────────────────── */
[data-theme-mode="dark"] .rn-calendar-wrap {
    background: #18181b;
}
[data-theme-mode="dark"] .rn-cal-nav-btn {
    background: #1f1f23;
    border-color: #27272a;
    color: #a1a1aa;
}
[data-theme-mode="dark"] .rn-cal-nav-btn:hover {
    background: #27272a;
    color: #fafafa;
}
[data-theme-mode="dark"] .rn-cal-month-label {
    color: #fafafa;
}
[data-theme-mode="dark"] .rn-cal-dow {
    color: #52525b;
    border-color: #27272a;
    background: #111113 !important;
}
[data-theme-mode="dark"] .rn-cal-cell {
    border-color: #1f1f23;
    background: #18181b;
}
[data-theme-mode="dark"] .rn-cal-cell--empty {
    background: #111113;
}
[data-theme-mode="dark"] .rn-cal-day-num {
    color: #52525b;
}
[data-theme-mode="dark"] .rn-cal-cell--has-release .rn-cal-day-num {
    color: #fafafa;
}
[data-theme-mode="dark"] .rn-cal-cell--today {
    box-shadow: inset 0 0 0 2px #fafafa;
}
/* Calendar release cards */
[data-theme-mode="dark"] .rn-cal-release {
    background: #1f1f23;
    border-color: #27272a;
}
[data-theme-mode="dark"] .rn-cal-release:hover {
    background: #27272a;
    border-color: #3f3f46;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
[data-theme-mode="dark"] .rn-cal-release-ver {
    color: #fafafa;
}
/* Calendar pills — dark variants */
[data-theme-mode="dark"] .rn-cal-pill--added {
    background: rgba(22,163,74,.15);
    color: #4ade80;
    border-left-color: #7A8C6E;
}
[data-theme-mode="dark"] .rn-cal-pill--improved {
    background: rgba(61,56,51,.15);
    color: #C5B9A7;
    border-left-color: #463C37;
}
[data-theme-mode="dark"] .rn-cal-pill--fixed {
    background: rgba(217,119,6,.15);
    color: #fbbf24;
    border-left-color: #C68A3A;
}
/* Calendar summary bar */
[data-theme-mode="dark"] .rn-cal-summary {
    background: #111113;
    border-color: #27272a;
}
[data-theme-mode="dark"] .rn-cal-summary-item {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .rn-cal-summary-item--releases .rn-cal-summary-count { color: #fafafa; }
[data-theme-mode="dark"] .rn-cal-summary-item--added .rn-cal-summary-count { color: #4ade80; }
[data-theme-mode="dark"] .rn-cal-summary-item--improved .rn-cal-summary-count { color: #C5B9A7; }
[data-theme-mode="dark"] .rn-cal-summary-item--fixed .rn-cal-summary-count { color: #fbbf24; }
/* Calendar legend */
[data-theme-mode="dark"] .rn-cal-legend { color: #71717a; }

/* ══════════════════════════════════════════════════════════════
   Help Center — Dark Mode
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .hc-tabs {
    background: #111113;
    border-color: #27272a;
}
[data-theme-mode="dark"] .hc-tabs::after {
    background: #18181b;
}
[data-theme-mode="dark"] .hc-tab {
    color: #52525b;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .hc-tab:hover {
    color: #d4d4d8;
    background: rgba(255,255,255,.03);
}
[data-theme-mode="dark"] .hc-tab.active {
    background: #18181b;
    color: #fafafa;
}
[data-theme-mode="dark"] .hc-card-container {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .hc-card {
    background: #1f1f23;
    border-color: #27272a;
}
[data-theme-mode="dark"] .hc-card-icon {
    background: #111113;
    color: #71717a;
}
[data-theme-mode="dark"] .hc-card-title {
    color: #fafafa;
}
[data-theme-mode="dark"] .hc-card-desc {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .hc-step {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .hc-step-num {
    background: #111113;
    color: #71717a;
}
[data-theme-mode="dark"] .hc-video {
    background: #1f1f23;
    border-color: #27272a;
    transition: border-color .15s ease, box-shadow .15s ease;
}
[data-theme-mode="dark"] .hc-video:hover {
    border-color: #3f3f46;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
[data-theme-mode="dark"] .hc-video-thumb {
    background: #111113;
}
[data-theme-mode="dark"] .hc-video-thumb i {
    color: #52525b;
}
[data-theme-mode="dark"] .hc-video:hover .hc-video-thumb i {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .hc-video-cat {
    color: #52525b;
}
[data-theme-mode="dark"] .hc-video-title {
    color: #fafafa;
}
[data-theme-mode="dark"] .hc-video-desc {
    color: #71717a;
}
[data-theme-mode="dark"] .hc-form-label {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .hc-form-input {
    background: #111113;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .hc-form-input:focus {
    border-color: #3f3f46;
}
[data-theme-mode="dark"] .hc-form-input::placeholder {
    color: #3f3f46;
}
[data-theme-mode="dark"] .hc-form-hint {
    color: #52525b;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn {
    background: #1f1f23;
    border-color: #27272a;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn:hover {
    border-color: #3f3f46;
    background: #27272a;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn.active {
    background: #fafafa;
    border-color: #fafafa;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn i {
    color: #52525b;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn.active i {
    color: #09090b;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn span {
    color: #71717a;
}
[data-theme-mode="dark"] .hc-cat-grid .hc-cat-btn.active span {
    color: #09090b;
}
[data-theme-mode="dark"] .hc-priority label {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .hc-priority input {
    accent-color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Clinic / Customer Pages — Dark Mode
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-clinic-dashboard {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-welcome-header {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-welcome-header__logo {
    background: #111113;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-welcome-header__title {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-welcome-header__subtitle {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-header-btn {
    background: #1f1f23;
    border-color: #27272a;
    color: #a1a1aa;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .sa-header-btn:hover {
    background: #27272a;
    border-color: #3f3f46;
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-header-btn i {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-header-btn--primary {
    background: #fafafa;
    border-color: #fafafa;
    color: #09090b;
}
[data-theme-mode="dark"] .sa-header-btn--primary:hover {
    background: #e4e4e7;
    border-color: #e4e4e7;
    color: #09090b;
}
[data-theme-mode="dark"] .sa-header-btn--primary i {
    color: #09090b;
}
[data-theme-mode="dark"] .sa-header-divider {
    background: #27272a;
}
[data-theme-mode="dark"] .sa-clinic-header {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-clinic-header__name {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-clinic-header__logo {
    background: #111113;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-clinic-header__website {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .sa-clinic-header__website:hover {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-clinic-header__date {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-clinic-header__phone a {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .sa-clinic-header__phone a:hover {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-clinic-search {
    background: #111113;
    border-color: #27272a;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-clinic-search:focus {
    border-color: #3f3f46;
}

/* ── Order type selector ──────────────────────────────────── */
[data-theme-mode="dark"] .sa-order-type-selector {
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-order-type-header h5 {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-order-type-header p {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-order-type-content {
    background: #18181b;
    border-color: #27272a;
    transition: all .15s ease;
}
[data-theme-mode="dark"] .sa-order-type-card:hover .sa-order-type-content {
    border-color: #3f3f46;
}
[data-theme-mode="dark"] .sa-order-type-card.active .sa-order-type-content {
    border-color: #fafafa;
    background: rgba(255,255,255,.03);
}
[data-theme-mode="dark"] .sa-order-type-icon {
    background: #1f1f23;
    color: #71717a;
}
[data-theme-mode="dark"] .sa-order-type-card.active .sa-order-type-icon {
    background: #fafafa;
    color: #09090b;
}
[data-theme-mode="dark"] .sa-order-type-title {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-order-type-desc {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-order-type-check {
    border-color: #27272a;
    background: transparent;
}
[data-theme-mode="dark"] .sa-order-type-card.active .sa-order-type-check {
    background: #fafafa;
    border-color: #fafafa;
    color: #09090b;
}

/* ── Customer analytics (HCO) ─────────────────────────────── */
[data-theme-mode="dark"] .sa-hco-kpi {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-hco-kpi__value { color: #fafafa; }
[data-theme-mode="dark"] .sa-hco-kpi__label { color: #52525b; }
[data-theme-mode="dark"] .sa-hco-kpi__icon { color: #3f3f46; }
[data-theme-mode="dark"] .sa-hco-kpi__change--up { background: rgba(122,140,110,.12); color: #4ade80; }
[data-theme-mode="dark"] .sa-hco-kpi__change--down { background: rgba(239,68,68,.12); color: #f87171; }
[data-theme-mode="dark"] .sa-hco-kpi__change--flat { background: rgba(255,255,255,.06); color: #71717a; }
[data-theme-mode="dark"] .sa-hco-location-card {
    background: #18181b;
    border-color: #27272a;
    transition: border-color .15s ease;
}
[data-theme-mode="dark"] .sa-hco-location-card:hover {
    border-color: #3f3f46;
}
[data-theme-mode="dark"] .sa-hco-location-card__name { color: #fafafa; }
[data-theme-mode="dark"] .sa-hco-location-stat__value { color: #fafafa; }
[data-theme-mode="dark"] .sa-hco-location-stat__label { color: #52525b; }
[data-theme-mode="dark"] .sa-hco-chart-card {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-hco-chart-card__header {
    border-color: #1f1f23;
    color: #fafafa;
}

/* ──── Onboarding Wizard — Dark Mode ────
   Wizard hard-codes white surfaces + light-pink/green accents in light mode.
   Dark mode keeps the red gradient header (brand signal) and overrides every
   white/light surface underneath to match the rest of the dark theme. */
[data-theme-mode="dark"] .sa-onboarding-wizard {
    background: #18181b;
    border-color: #dc2626;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.25);
}
[data-theme-mode="dark"] .sa-onboarding-wizard__stepper {
    border-bottom-color: #27272a;
}
[data-theme-mode="dark"] .sa-wizard-step__circle {
    background: rgba(220, 38, 38, 0.18);
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.4);
}
[data-theme-mode="dark"] .sa-wizard-step--active .sa-wizard-step__circle {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}
[data-theme-mode="dark"] .sa-wizard-step--complete .sa-wizard-step__circle {
    background: #5F7058;
    color: #fff;
    border-color: #5F7058;
}
[data-theme-mode="dark"] .sa-wizard-step__label {
    color: #71717a;
}
[data-theme-mode="dark"] .sa-wizard-step--active .sa-wizard-step__label {
    color: #f87171;
}
[data-theme-mode="dark"] .sa-wizard-step--complete .sa-wizard-step__label {
    color: #4ade80;
}
[data-theme-mode="dark"] .sa-wizard-connector {
    background: #3f3f46;
}
[data-theme-mode="dark"] .sa-wizard-connector--complete {
    background: #5F7058;
}
[data-theme-mode="dark"] .sa-wizard-panel__icon {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    border-color: rgba(220, 38, 38, 0.35);
}
[data-theme-mode="dark"] .sa-wizard-panel__info h6 {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-wizard-panel__info p {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .sa-wizard-panel__complete {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.35);
}
[data-theme-mode="dark"] .sa-wizard-panel__complete strong {
    color: #4ade80;
}
[data-theme-mode="dark"] .sa-wizard-panel__complete p {
    color: #B5C5A8;
}
[data-theme-mode="dark"] .sa-wizard-panel__nav {
    border-top-color: #27272a;
}
[data-theme-mode="dark"] .sa-wizard-panel__nav .btn-light {
    background: #27272a;
    border-color: #3f3f46;
    color: #d4d4d8;
}
[data-theme-mode="dark"] .sa-wizard-panel__nav .btn-light:hover {
    background: #3f3f46;
    border-color: #52525b;
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Empty States — Global
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-empty-state {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-empty-state__icon {
    color: #27272a;
}
[data-theme-mode="dark"] .sa-empty-state__text {
    color: #52525b;
}
[data-theme-mode="dark"] .sa-empty-state--compact {
    color: #3f3f46;
}

/* ══════════════════════════════════════════════════════════════
   Action Buttons (3-dot menus, row action triggers)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-actions-btn,
[data-theme-mode="dark"] [class*="actions-btn"] {
    color: #52525b;
    transition: color .15s ease;
}
[data-theme-mode="dark"] .sa-actions-btn:hover,
[data-theme-mode="dark"] [class*="actions-btn"]:hover {
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Login Page — Protect from dark mode bleed
   (Login uses a standalone layout; these rules ensure the
    form side stays readable if dark mode is somehow active)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .login-form-section {
    background: #111113;
}
[data-theme-mode="dark"] .login-form-title {
    color: #fafafa;
}
[data-theme-mode="dark"] .login-form-subtitle {
    color: #71717a;
}
[data-theme-mode="dark"] .login-card {
    background: #18181b;
    border-color: #27272a;
}
[data-theme-mode="dark"] .login-help-text {
    color: #52525b;
}
[data-theme-mode="dark"] .btn-login {
    background: #fafafa;
    color: #09090b;
    border-color: #fafafa;
}
[data-theme-mode="dark"] .btn-login:hover {
    background: #e4e4e7;
    border-color: #e4e4e7;
}
[data-theme-mode="dark"] .btn-clinic-login {
    background: transparent;
    border-color: #27272a;
    color: #a1a1aa;
}
[data-theme-mode="dark"] .btn-clinic-login:hover {
    border-color: #3f3f46;
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Profile Dropdown (header) — Dark Mode
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-profile-dropdown {
    background: #1f1f23;
    border-color: #27272a;
    box-shadow: 0 12px 40px rgba(0,0,0,.7);
}
[data-theme-mode="dark"] .sa-profile-dropdown-header {
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-profile-dropdown .dropdown-divider {
    border-color: #27272a;
}
[data-theme-mode="dark"] .sa-profile-dropdown .clinic-switch-item {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .sa-profile-dropdown .clinic-switch-item:hover {
    background: rgba(255,255,255,.04);
    color: #fafafa;
}
[data-theme-mode="dark"] .sa-profile-dropdown .clinic-switch-item.active {
    background: rgba(255,255,255,.06);
    color: #fafafa;
}

/* ══════════════════════════════════════════════════════════════
   Row Highlight (notification click-through) — Dark
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-row-highlight td {
    background: rgba(250,250,250,.08) !important;
}
[data-theme-mode="dark"] .sa-row-highlight--fade td {
    background: transparent !important;
}

/* ══════════════════════════════════════════════════════════════
   Dark Mode — Targeted Fixes (2026-04-25)
   A. Sidebar text visibility
   B. Table striping & borders
   C. KPI/stat cards with colored backgrounds
   D. Email engine template cards
   E. Analytics filter bar & time buttons
   F. Nav tabs (analytics + general)
   G. Transparent-bg utility overrides
   H. Profile page left panel separation
   I. Provider Performance table header
   J. Entity admin sidebar readability
   ══════════════════════════════════════════════════════════════ */

/* ── A. Sidebar — force lighter text globally ────────────── */
[data-theme-mode="dark"] .app-sidebar .side-menu__item {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__label {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__icon {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__angle {
    color: #a1a1aa !important;
}
/* Catch ALL nested sidebar text that might be dim */
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__label {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item:hover,
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item.active {
    color: #ffffff !important;
}
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item:hover .side-menu__label,
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item.active .side-menu__label {
    color: #ffffff !important;
}
/* Category / group labels in sidebar */
[data-theme-mode="dark"] .app-sidebar .category-name,
[data-theme-mode="dark"] .app-sidebar .side-menu__label1 {
    color: #71717a !important;
}
/* Entity admin sidebar — text barely readable fix */
[data-theme-mode="dark"] .app-sidebar .nav-link,
[data-theme-mode="dark"] .app-sidebar .nav-item a,
[data-theme-mode="dark"] .app-sidebar li a,
[data-theme-mode="dark"] .app-sidebar span,
[data-theme-mode="dark"] .app-sidebar p {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .app-sidebar .nav-link:hover,
[data-theme-mode="dark"] .app-sidebar .nav-item a:hover,
[data-theme-mode="dark"] .app-sidebar li a:hover {
    color: #ffffff !important;
}
[data-theme-mode="dark"] .app-sidebar .nav-link.active,
[data-theme-mode="dark"] .app-sidebar .nav-item a.active {
    color: #ffffff !important;
}

/* ── B. Table striping and borders ───────────────────────── */
[data-theme-mode="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .table-striped > tbody > tr:nth-of-type(even) > * {
    background: transparent !important;
}
/* Ensure table borders are visible */
[data-theme-mode="dark"] .table > :not(caption) > * > * {
    border-color: #27272a !important;
}
/* Table header — stronger contrast */
[data-theme-mode="dark"] .table > thead > tr > th,
[data-theme-mode="dark"] .table thead th {
    background: #111113 !important;
    color: #a1a1aa !important;
    border-color: #27272a !important;
}
/* Provider Performance table — purple header override */
[data-theme-mode="dark"] .table thead tr[style*="background"],
[data-theme-mode="dark"] .table thead th[style*="background"] {
    background: #111113 !important;
    color: #a1a1aa !important;
}

/* ── C. KPI/stat cards with colored inline backgrounds ───── */
[data-theme-mode="dark"] .card[style*="background-color"],
[data-theme-mode="dark"] .card[style*="background:"] {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] [class*="bg-light"] {
    background: #18181b !important;
}
[data-theme-mode="dark"] [class*="bg-white"] {
    background: #18181b !important;
}

/* ── D. Email engine template cards ──────────────────────── */
[data-theme-mode="dark"] .email-card,
[data-theme-mode="dark"] [class*="template-card"],
[data-theme-mode="dark"] .card-body {
    background: #18181b !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .email-card .card-title,
[data-theme-mode="dark"] [class*="template-card"] .card-title {
    color: #fafafa !important;
}

/* ── E. Analytics filter bar and time buttons ────────────── */
[data-theme-mode="dark"] [class*="time-filter"],
[data-theme-mode="dark"] [class*="date-range"],
[data-theme-mode="dark"] .btn-group .btn:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .btn-group .btn.active:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info),
[data-theme-mode="dark"] .btn-group .btn:checked,
[data-theme-mode="dark"] .btn-group .btn-check:checked + .btn {
    background: #27272a !important;
    color: #fafafa !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .btn-group .btn:hover:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info) {
    background: #27272a !important;
    color: #d4d4d8 !important;
}

/* ── F. Nav tabs on analytics and other pages ────────────── */
[data-theme-mode="dark"] .nav-tabs .nav-link {
    color: #71717a !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .nav-tabs .nav-link:hover {
    color: #d4d4d8 !important;
    background: rgba(255,255,255,.02) !important;
}
[data-theme-mode="dark"] .nav-tabs .nav-link.active {
    color: #fafafa !important;
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .nav-pills .nav-link {
    color: #71717a !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .nav-pills .nav-link:hover {
    color: #d4d4d8 !important;
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .nav-pills .nav-link.active {
    color: #fafafa !important;
    background: #27272a !important;
    border-color: #27272a !important;
}

/* ── G. Force dark on remaining transparent-bg utilities ─── */
[data-theme-mode="dark"] .bg-primary-transparent {
    background: rgba(var(--primary-rgb), 0.1) !important;
}
[data-theme-mode="dark"] .bg-success-transparent {
    background: rgba(122,140,110,.1) !important;
}
[data-theme-mode="dark"] .bg-warning-transparent {
    background: rgba(251,191,36,.1) !important;
}
[data-theme-mode="dark"] .bg-danger-transparent {
    background: rgba(239,68,68,.1) !important;
}
[data-theme-mode="dark"] .bg-info-transparent {
    background: rgba(197,185,167,.1) !important;
}
[data-theme-mode="dark"] .bg-secondary-transparent {
    background: rgba(161,161,170,.08) !important;
}

/* ── H. Profile page left panel — card separation ────────── */
[data-theme-mode="dark"] .sa-profile .card,
[data-theme-mode="dark"] .sp-hero,
[data-theme-mode="dark"] .sp-tabs-wrapper {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.3) !important;
}

/* ── I. Provider Performance table header row ────────────── */
[data-theme-mode="dark"] .table th[style*="background"],
[data-theme-mode="dark"] .table tr[style*="background"] th,
[data-theme-mode="dark"] .table tr[style*="background"] td {
    background: #111113 !important;
    color: #a1a1aa !important;
    border-color: #27272a !important;
}

/* ── J. Misc chart card containers ───────────────────────── */
[data-theme-mode="dark"] .chart-container,
[data-theme-mode="dark"] [class*="chart-card"],
[data-theme-mode="dark"] [class*="analytics-card"] {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ══════════════════════════════════════════════════════════════
   User Profile Page — Dark Mode
   The profile uses .up-sidebar, .up-content, .up-container,
   .up-sidebar__nav-item, etc. All have hardcoded light colors.
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .up-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .up-sidebar__back {
    color: #a1a1aa;
    border-bottom-color: #27272a;
}
[data-theme-mode="dark"] .up-sidebar__back:hover {
    color: #fafafa;
    background: rgba(255,255,255,.04);
}
[data-theme-mode="dark"] .up-sidebar__header {
    border-bottom-color: #27272a;
}
[data-theme-mode="dark"] .up-sidebar__name { color: #fafafa; }
[data-theme-mode="dark"] .up-sidebar__jobtitle { color: #a1a1aa; }
[data-theme-mode="dark"] .up-sidebar__credentials {
    background: rgba(70,60,55,.12);
    color: #C5B9A7;
}
[data-theme-mode="dark"] .up-sidebar__phone { color: #a1a1aa; }
[data-theme-mode="dark"] .up-sidebar__avatar {
    background: #27272a;
}
[data-theme-mode="dark"] .up-sidebar__avatar span { color: #a1a1aa; }
[data-theme-mode="dark"] .up-sidebar__avatar-overlay {
    background: rgba(0,0,0,.7);
}
[data-theme-mode="dark"] .up-sidebar__section-label {
    color: #52525b;
}
[data-theme-mode="dark"] .up-sidebar__nav-item {
    color: #a1a1aa;
}
[data-theme-mode="dark"] .up-sidebar__nav-item:hover {
    background: rgba(255,255,255,.04);
    color: #fafafa;
}
[data-theme-mode="dark"] .up-sidebar__nav-item.active {
    background: rgba(255,255,255,.06);
    color: #fafafa;
}
[data-theme-mode="dark"] .up-sidebar__badge {
    background: #27272a;
    color: #a1a1aa;
}
[data-theme-mode="dark"] .up-sidebar__nav-item.active .up-sidebar__badge {
    background: #fafafa;
    color: #111113;
}
[data-theme-mode="dark"] .up-sidebar__meta {
    border-top-color: #27272a;
    color: #52525b;
}
[data-theme-mode="dark"] .up-content {
    background: #18181b;
}
/* Profile form sections */
[data-theme-mode="dark"] .up-form-section__title,
[data-theme-mode="dark"] .up-section-title {
    color: #fafafa;
}
[data-theme-mode="dark"] .up-form-section__icon,
[data-theme-mode="dark"] .up-section-icon {
    background: #1f1f23;
    color: #a1a1aa;
}
[data-theme-mode="dark"] .up-form-section,
[data-theme-mode="dark"] .up-section {
    border-color: #27272a;
}
/* Read-only values */
[data-theme-mode="dark"] .up-read-label {
    color: #71717a;
}
[data-theme-mode="dark"] .up-read-value {
    color: #fafafa;
}
/* Profile card wrapper */
[data-theme-mode="dark"] .sp-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sp-card .card-body {
    background: #18181b !important;
}
/* ── Profile content panels ────────────────────────────────────── */
[data-theme-mode="dark"] .up-content {
    background: #18181b !important;
}
[data-theme-mode="dark"] .up-panel {
    background: transparent !important;
}
[data-theme-mode="dark"] .up-panel__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .up-panel__desc {
    color: #71717a !important;
    border-bottom-color: #27272a !important;
}
/* Form section headers inside panels */
[data-theme-mode="dark"] .up-form-section-title,
[data-theme-mode="dark"] .up-hw-section-title,
[data-theme-mode="dark"] [class*="section-title"] {
    color: #fafafa !important;
}
/* Action cards (deactivate, etc.) */
[data-theme-mode="dark"] .up-action-card {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .up-action-card--danger {
    border-color: rgba(239,68,68,.2) !important;
}
[data-theme-mode="dark"] .up-action-card__title { color: #fafafa !important; }
[data-theme-mode="dark"] .up-action-card__desc { color: #a1a1aa !important; }
[data-theme-mode="dark"] .up-action-card__icon {
    background: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .up-action-card__icon--danger {
    background: rgba(239,68,68,.1) !important;
    color: #f87171 !important;
}

/* ── Hardware tabs ─────────────────────────────────────────────── */
[data-theme-mode="dark"] .hw-tabs {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .hw-tab {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .hw-tab:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .hw-tab.hw-tab--active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .hw-tab.hw-tab--active .hw-tab__count {
    background: rgba(0,0,0,.2) !important;
}
[data-theme-mode="dark"] .hw-tab__count {
    background: rgba(255,255,255,.08) !important;
}
/* Hardware toggle cards */
[data-theme-mode="dark"] .hw-grid { }
[data-theme-mode="dark"] .hw-card {
    background: #18181b !important;
    border-color: #27272a !important;
    border-left-color: transparent !important;
}
[data-theme-mode="dark"] .hw-card:hover {
    background: #1f1f23 !important;
    border-color: #3f3f46 !important;
    border-left-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .hw-card--on {
    background: rgba(122,140,110,.06) !important;
    border-color: rgba(122,140,110,.2) !important;
    border-left-color: #7A8C6E !important;
}
[data-theme-mode="dark"] .hw-card--on:hover {
    background: rgba(122,140,110,.1) !important;
    border-color: rgba(122,140,110,.3) !important;
    border-left-color: #7A8C6E !important;
}
[data-theme-mode="dark"] .hw-card__icon {
    background: #1f1f23 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .hw-card--on .hw-card__icon {
    background: rgba(122,140,110,.12) !important;
    color: #4ade80 !important;
}
[data-theme-mode="dark"] .hw-card__name {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .hw-card--on .hw-card__name {
    color: #4ade80 !important;
}
/* Toggle track */
[data-theme-mode="dark"] .hw-toggle__track {
    background: #3f3f46 !important;
}
[data-theme-mode="dark"] .hw-toggle__track::after {
    background: #a1a1aa !important;
}
[data-theme-mode="dark"] .hw-toggle input:checked + .hw-toggle__track {
    background: #7A8C6E !important;
}
[data-theme-mode="dark"] .hw-toggle input:checked + .hw-toggle__track::after {
    background: #fff !important;
}

/* ── Platform Settings: Architecture (arch-*) ──────────────────── */
[data-theme-mode="dark"] .arch-hero {
    background: linear-gradient(135deg, #111113, #18181b) !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-hero__title { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-hero__sub { color: #a1a1aa !important; }
[data-theme-mode="dark"] .arch-metric {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-metric__value { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-metric__label { color: #71717a !important; }
[data-theme-mode="dark"] .arch-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-card__header {
    background: #111113 !important; border-bottom-color: #27272a !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .arch-card__body { background: #18181b !important; }
/* Layers */
[data-theme-mode="dark"] .arch-layer--1 { border-color: rgba(70,60,55,.3) !important; background: rgba(70,60,55,.06) !important; }
[data-theme-mode="dark"] .arch-layer--2 { border-color: rgba(139,92,246,.3) !important; background: rgba(139,92,246,.06) !important; }
[data-theme-mode="dark"] .arch-layer--3 { border-color: rgba(122,140,110,.3) !important; background: rgba(122,140,110,.06) !important; }
[data-theme-mode="dark"] .arch-layer--4 { border-color: rgba(245,158,11,.3) !important; background: rgba(245,158,11,.06) !important; }
[data-theme-mode="dark"] .arch-layer--5 { border-color: rgba(239,68,68,.3) !important; background: rgba(239,68,68,.06) !important; }
[data-theme-mode="dark"] .arch-layer__desc { color: #71717a !important; }
/* Stack rows */
[data-theme-mode="dark"] .arch-stack__row { border-bottom-color: #1f1f23 !important; }
[data-theme-mode="dark"] .arch-stack__name { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-stack__tech { color: #71717a !important; }
[data-theme-mode="dark"] .arch-stack__protocol { background: #1f1f23 !important; color: #71717a !important; }
[data-theme-mode="dark"] .arch-stack__arrow { color: #3f3f46 !important; }
/* Capabilities */
[data-theme-mode="dark"] .arch-capability {
    background: #1f1f23 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .arch-capability:hover {
    border-color: #3f3f46 !important; background: #27272a !important;
}
[data-theme-mode="dark"] .arch-capability i { color: #a1a1aa !important; }

/* Data Dictionary / Domain tables */
[data-theme-mode="dark"] .arch-table-domain {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-table-domain__list { color: #a1a1aa !important; }
/* Integration cards */
[data-theme-mode="dark"] .arch-int-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-int-card__body { background: #18181b !important; }
[data-theme-mode="dark"] .arch-int-card__row { border-bottom-color: #1f1f23 !important; }
[data-theme-mode="dark"] .arch-int-card__label { color: #71717a !important; }
[data-theme-mode="dark"] .arch-int-card__tags span {
    background: #1f1f23 !important; color: #a1a1aa !important;
}
/* Integration flow diagram */
[data-theme-mode="dark"] .arch-int-flow__arrow { color: #3f3f46 !important; }
[data-theme-mode="dark"] .arch-int-flow__target { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .arch-int-flow__target small { color: #52525b !important; }
/* Security list */
[data-theme-mode="dark"] .arch-sec-item { border-bottom-color: #1f1f23 !important; }
[data-theme-mode="dark"] .arch-sec-item__label { color: #71717a !important; }
[data-theme-mode="dark"] .arch-sec-item__value { color: #d4d4d8 !important; }
/* Infrastructure diagram */
[data-theme-mode="dark"] .arch-infra-box {
    border-color: #27272a !important; background: transparent !important;
}
[data-theme-mode="dark"] .arch-infra-box--main {
    border-color: #3f3f46 !important; background: rgba(255,255,255,.02) !important;
}
[data-theme-mode="dark"] .arch-infra-svc {
    background: #1f1f23 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-infra-svc span { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-infra-svc small { color: #52525b !important; }
[data-theme-mode="dark"] .arch-infra-arrow { color: #3f3f46 !important; }
[data-theme-mode="dark"] .arch-infra-target {
    background: #1f1f23 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-infra-target span { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-infra-target small { color: #52525b !important; }
[data-theme-mode="dark"] .arch-infra-connections { }
/* Environment cards */
[data-theme-mode="dark"] .arch-env-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-env-card__name { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-env-card__url { color: #71717a !important; }
[data-theme-mode="dark"] .arch-env-card__desc { color: #52525b !important; }

/* ── Architecture: Dictionary (dict2-*) ────────────────────────── */
[data-theme-mode="dark"] .dict2-search input {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .dict2-search input:focus { border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .dict2-search i { color: #52525b !important; }
[data-theme-mode="dark"] .dict2-search__count { color: #52525b !important; }
[data-theme-mode="dark"] .dict2-view-toggle { border-color: #27272a !important; }
[data-theme-mode="dark"] .dict2-view-btn {
    background: #1f1f23 !important; color: #71717a !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .dict2-view-btn:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .dict2-view-btn.active { background: #fafafa !important; color: #09090b !important; }
[data-theme-mode="dark"] .dict2-group {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .dict2-group__header {
    background: #111113 !important; border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .dict2-group__header:hover { background: #1f1f23 !important; }
[data-theme-mode="dark"] .dict2-group__icon[style*="background"] { background: #1f1f23 !important; }
[data-theme-mode="dark"] .dict2-group__title { color: #fafafa !important; }
[data-theme-mode="dark"] .dict2-group__count { background: #27272a !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .dict2-term { border-bottom-color: #1f1f23 !important; }
[data-theme-mode="dark"] .dict2-term__row:hover { background: rgba(255,255,255,.02) !important; }
[data-theme-mode="dark"] .dict2-term__name { color: #fafafa !important; }
[data-theme-mode="dark"] .dict2-term__summary { color: #71717a !important; }
[data-theme-mode="dark"] .dict2-term__row::after { color: #3f3f46 !important; }
[data-theme-mode="dark"] .dict2-term__detail { border-left-color: #27272a !important; }
[data-theme-mode="dark"] .dict2-term__detail p { color: #a1a1aa !important; }
[data-theme-mode="dark"] .dict2-term__detail code { background: #1f1f23 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .dict2-term__table th {
    background: #111113 !important; color: #71717a !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .dict2-term__table td { color: #d4d4d8 !important; border-color: #1f1f23 !important; }
[data-theme-mode="dark"] .dict2-term__analogy { background: rgba(251,191,36,.06) !important; border-left-color: #fbbf24 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .dict2-term__codes span,
[data-theme-mode="dark"] .dict2-term__codes code { background: #1f1f23 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .dict2-term__keypoint { background: rgba(70,60,55,.06) !important; border-color: rgba(70,60,55,.2) !important; color: #C5B9A7 !important; }
[data-theme-mode="dark"] .dict2-term__flow span { background: #1f1f23 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .dict2-term__flow i { color: #3f3f46 !important; }
[data-theme-mode="dark"] .dict2-term__flow--success { background: rgba(122,140,110,.1) !important; color: #4ade80 !important; border-color: rgba(122,140,110,.2) !important; }
[data-theme-mode="dark"] .dict2-term__flow--danger { background: rgba(239,68,68,.1) !important; color: #f87171 !important; border-color: rgba(239,68,68,.2) !important; }
[data-theme-mode="dark"] .dict2-alpha__letter { color: #fafafa !important; border-bottom-color: #3f3f46 !important; }
[data-theme-mode="dark"] .dict2-term__example { color: #71717a !important; }

/* ── Integration hero bars — neutral in dark mode ──────────────── */
[data-theme-mode="dark"] [style*="linear-gradient(135deg, #1a5632"],
[data-theme-mode="dark"] [style*="linear-gradient(135deg, var(--sa-primary-color"] {
    background: linear-gradient(135deg, #18181b 0%, #111113 100%) !important;
}
/* Force ALL text inside hero gradient bars to be white/light */
[data-theme-mode="dark"] [style*="linear-gradient"] h1,
[data-theme-mode="dark"] [style*="linear-gradient"] h2,
[data-theme-mode="dark"] [style*="linear-gradient"] h3,
[data-theme-mode="dark"] [style*="linear-gradient"] h4,
[data-theme-mode="dark"] [style*="linear-gradient"] h5,
[data-theme-mode="dark"] [style*="linear-gradient"] h6,
[data-theme-mode="dark"] [style*="linear-gradient"] .fw-bold,
[data-theme-mode="dark"] [style*="linear-gradient"] .fw-semibold,
[data-theme-mode="dark"] [style*="linear-gradient"] .fw-medium,
[data-theme-mode="dark"] [style*="linear-gradient"] span,
[data-theme-mode="dark"] [style*="linear-gradient"] div {
    color: #fafafa !important;
}
[data-theme-mode="dark"] [style*="linear-gradient"] [style*="color:rgba(255,255,255,0.5)"],
[data-theme-mode="dark"] [style*="linear-gradient"] [style*="color:rgba(255,255,255,0.35)"] {
    color: #71717a !important;
}
/* Page header title */
[data-theme-mode="dark"] .page-header-breadcrumb h4 { color: #fafafa !important; }

/* ── Intacct Integration Page ───────────────────────────────────── */
[data-theme-mode="dark"] .card-title { color: #fafafa !important; }
[data-theme-mode="dark"] .intacct-action-btn {
    background: #1f1f23 !important; color: #a1a1aa !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .intacct-action-btn:hover {
    background: #27272a !important; color: #fafafa !important; border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .intacct-action-btn.syncing {
    background: rgba(70,60,55,.1) !important; border-color: rgba(70,60,55,.2) !important;
}
[data-theme-mode="dark"] .intacct-sidebar .nav-link {
    color: #a1a1aa !important; background: transparent !important;
}
[data-theme-mode="dark"] .intacct-sidebar .nav-link:hover {
    background: rgba(255,255,255,.04) !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .intacct-sidebar .nav-link.active {
    background: rgba(255,255,255,.06) !important; color: #fafafa !important;
}
/* Input group search */
[data-theme-mode="dark"] .input-group-text {
    background: #18181b !important; border-color: #27272a !important; color: #52525b !important;
}
/* Progress bar bg */
[data-theme-mode="dark"] .progress {
    background: #1f1f23 !important;
}
/* btn-outline-secondary and btn-outline-danger */
[data-theme-mode="dark"] .btn-outline-danger {
    background: transparent !important; border-color: rgba(239,68,68,.3) !important; color: #f87171 !important;
}
[data-theme-mode="dark"] .btn-outline-danger:hover {
    background: rgba(239,68,68,.1) !important; color: #fca5a5 !important;
}

/* ── Platform Settings: Release Notes (ps-rn-*) ────────────────── */
[data-theme-mode="dark"] .ps-rn-month {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-rn-month__btn {
    background: #111113 !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-rn-month__btn:not(.collapsed) {
    background: #18181b !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-rn-month__count {
    background: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ps-rn-version {
    background: #18181b !important; border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-rn-version__tag {
    color: #fafafa !important; background: rgba(255,255,255,.06) !important;
}
[data-theme-mode="dark"] .ps-rn-version__type { color: #71717a !important; }
[data-theme-mode="dark"] .ps-rn-version__date { color: #52525b !important; }
[data-theme-mode="dark"] .ps-rn-section__label--added { color: #4ade80 !important; background: rgba(122,140,110,.1) !important; }
[data-theme-mode="dark"] .ps-rn-section__label--improved { color: #C5B9A7 !important; background: rgba(70,60,55,.1) !important; }
[data-theme-mode="dark"] .ps-rn-section__label--fixed { color: #fbbf24 !important; background: rgba(251,191,36,.1) !important; }
[data-theme-mode="dark"] .ps-rn-list li { color: #d4d4d8 !important; }
/* Accordion overrides for this context */
[data-theme-mode="dark"] .ps-release-notes .accordion-item {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-release-notes .accordion-button {
    background: #111113 !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-release-notes .accordion-button:not(.collapsed) {
    background: #18181b !important;
}
[data-theme-mode="dark"] .ps-release-notes .accordion-body {
    background: #18181b !important;
}

/* ── Branding: Entity Theme Cards ──────────────────────────────── */
[data-theme-mode="dark"] .ps-entity-theme-card {
    background: #18181b !important; border: none !important;
}
[data-theme-mode="dark"] .ps-entity-theme-card__body { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .ps-entity-theme-card__body .fw-semibold { color: #fafafa !important; }
[data-theme-mode="dark"] .ps-entity-theme-card__body code { background: #1f1f23 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .ps-entity-theme-card__body div[style*="background:#EFEBE5"] {
    background: #1f1f23 !important;
}
/* Brand preview */
[data-theme-mode="dark"] .ps-brand-preview { border: none !important; box-shadow: 0 4px 16px rgba(0,0,0,.4) !important; }
[data-theme-mode="dark"] .ps-brand-preview__body {
    background: #18181b !important;
}
[data-theme-mode="dark"] .ps-brand-preview__color-label { color: #71717a !important; }
[data-theme-mode="dark"] .ps-brand-preview__mock-item {
    background: #1f1f23 !important; color: #71717a !important; border-color: #27272a !important;
}
/* Info section title */
[data-theme-mode="dark"] .ps-info-section__title { color: #fafafa !important; border-bottom-color: #27272a !important; }

/* ── Architecture: Auth Flow + Permissions + Deploy ─────────────── */
/* Auth flow steps */
[data-theme-mode="dark"] .arch-auth-step {
    background: #1f1f23 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-auth-step__num {
    background: #463C37 !important; color: #fff !important;
}
[data-theme-mode="dark"] .arch-auth-step__content { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .arch-auth-step__content strong { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-auth-step__arrow { color: #3f3f46 !important; }
/* ERD root block */
[data-theme-mode="dark"] .arch-erd__root {
    background: #463C37 !important; color: #fff !important;
}
/* Permission pyramid */
[data-theme-mode="dark"] .arch-perm-level { border-bottom-color: #1f1f23 !important; }
[data-theme-mode="dark"] .arch-perm-level__desc { color: #a1a1aa !important; }
[data-theme-mode="dark"] .arch-perm-level--1 .arch-perm-level__badge { background: rgba(251,191,36,.12) !important; color: #fbbf24 !important; }
[data-theme-mode="dark"] .arch-perm-level--2 .arch-perm-level__badge { background: rgba(70,60,55,.12) !important; color: #C5B9A7 !important; }
[data-theme-mode="dark"] .arch-perm-level--3 .arch-perm-level__badge { background: rgba(122,140,110,.12) !important; color: #4ade80 !important; }
[data-theme-mode="dark"] .arch-perm-level--4 .arch-perm-level__badge { background: rgba(161,161,170,.1) !important; color: #a1a1aa !important; }
/* Security list code elements */
[data-theme-mode="dark"] .arch-sec-item code { background: #1f1f23 !important; color: #a1a1aa !important; }
/* Deploy flow steps */
[data-theme-mode="dark"] .arch-deploy-step {
    background: #1f1f23 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-deploy-step__icon { background: #27272a !important; color: #C5B9A7 !important; }
[data-theme-mode="dark"] .arch-deploy-step__icon[style*="background"] { background: #27272a !important; }
[data-theme-mode="dark"] .arch-deploy-step__text { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .arch-deploy-step__text strong { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-deploy-step__arrow { color: #3f3f46 !important; }

/* ── Architecture: Data Model (domain chips, ERD) ──────────────── */
[data-theme-mode="dark"] .arch-domain-chip {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-domain-chip__count { color: #fafafa !important; }
[data-theme-mode="dark"] .arch-domain-chip__label { color: #71717a !important; }
[data-theme-mode="dark"] .arch-erd__branches { border-left-color: #27272a !important; }
[data-theme-mode="dark"] .arch-erd__node--blue { background: rgba(70,60,55,.08) !important; color: #C5B9A7 !important; border-color: rgba(70,60,55,.2) !important; }
[data-theme-mode="dark"] .arch-erd__node--green { background: rgba(122,140,110,.08) !important; color: #4ade80 !important; border-color: rgba(122,140,110,.2) !important; }
[data-theme-mode="dark"] .arch-erd__node--purple { background: rgba(139,92,246,.08) !important; color: #a78bfa !important; border-color: rgba(139,92,246,.2) !important; }
[data-theme-mode="dark"] .arch-erd__node--orange { background: rgba(249,115,22,.08) !important; color: #fb923c !important; border-color: rgba(249,115,22,.2) !important; }
[data-theme-mode="dark"] .arch-erd__node--slate { background: rgba(161,161,170,.08) !important; color: #a1a1aa !important; border-color: rgba(161,161,170,.2) !important; }
[data-theme-mode="dark"] .arch-erd__sub { color: #52525b !important; }
[data-theme-mode="dark"] .arch-erd__leaf { background: rgba(122,140,110,.06) !important; color: #4ade80 !important; border-color: rgba(122,140,110,.15) !important; }
[data-theme-mode="dark"] .arch-erd__children { }

/* ── Platform Settings: Tickets (pst-*) ────────────────────────── */
[data-theme-mode="dark"] .pst-toolbar { border-bottom-color: #27272a !important; }
[data-theme-mode="dark"] .pst-search {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .pst-search:focus { background: #18181b !important; border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .pst-search::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .pst-search-wrap i { color: #52525b !important; }
[data-theme-mode="dark"] .pst-add-btn { background: #fafafa !important; color: #09090b !important; }
[data-theme-mode="dark"] .pst-add-btn:hover { background: #d4d4d8 !important; }
[data-theme-mode="dark"] .pst-filter-label { color: #52525b !important; }
[data-theme-mode="dark"] .pst-filter-pill {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .pst-filter-pill:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .pst-filter-pill.pst-active {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}
/* KPI cards */
[data-theme-mode="dark"] .pst-kpi {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .pst-kpi__icon[style*="background"] { background: #1f1f23 !important; }
[data-theme-mode="dark"] .pst-kpi__value { color: #fafafa !important; }
[data-theme-mode="dark"] .pst-kpi__label { color: #71717a !important; }
/* Table wraps — no border in dark mode */
[data-theme-mode="dark"] .pst-table-wrap,
[data-theme-mode="dark"] .psd-table-wrap,
[data-theme-mode="dark"] .pst-table-wrap *,
[data-theme-mode="dark"] .psd-table-wrap * {
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .pst-table-wrap,
[data-theme-mode="dark"] .psd-table-wrap {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}
[data-theme-mode="dark"] .pst-table-wrap > .dt-container,
[data-theme-mode="dark"] .psd-table-wrap > .dt-container,
[data-theme-mode="dark"] .pst-table-wrap > .dataTables_wrapper,
[data-theme-mode="dark"] .psd-table-wrap > .dataTables_wrapper {
    border: none !important;
}
[data-theme-mode="dark"] .pst-table-wrap table,
[data-theme-mode="dark"] .psd-table-wrap table {
    border: none !important;
}

/* ── Platform Settings: Integration Cards (psi-*) ──────────────── */
[data-theme-mode="dark"] .psi-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .psi-card:hover {
    border-color: #3f3f46 !important; box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .psi-card__body { background: #18181b !important; }
[data-theme-mode="dark"] .psi-detail__label { color: #52525b !important; }
[data-theme-mode="dark"] .psi-detail__value { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .psi-detail__value--masked { color: #71717a !important; }
[data-theme-mode="dark"] .psi-card__actions {
    border-top-color: #27272a !important; background: transparent !important;
}
[data-theme-mode="dark"] .psi-action-btn {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psi-action-btn:hover {
    background: #27272a !important; border-color: #3f3f46 !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .psi-action-btn--primary {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psi-action-btn--primary:hover {
    background: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psi-action-btn:disabled {
    background: #1f1f23 !important; border-color: #27272a !important; color: #3f3f46 !important;
}
[data-theme-mode="dark"] .psi-action-btn:disabled:hover {
    background: #1f1f23 !important; color: #3f3f46 !important;
}
/* Integration filter toolbar */
[data-theme-mode="dark"] .psi-toolbar { border-bottom-color: #27272a !important; }
[data-theme-mode="dark"] .psi-search {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psi-filter-pill {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psi-filter-pill:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .psi-filter-pill.psi-active {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}

/* ── Platform Settings: Memberships (psb-*) ────────────────────── */
[data-theme-mode="dark"] .psb-modules { background: #111113 !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .psb-module-card {
    background: #18181b !important; border-bottom-color: transparent !important;
}
[data-theme-mode="dark"] .psb-module-card:hover,
[data-theme-mode="dark"] .psb-module-card.psb-module-active { background: #1f1f23 !important; }
[data-theme-mode="dark"] .psb-module-card__name { color: #a1a1aa !important; }
[data-theme-mode="dark"] .psb-module-card__count { color: #fafafa !important; }
/* Stats row */
[data-theme-mode="dark"] .psb-stats { background: #27272a !important; }
[data-theme-mode="dark"] .psb-stat { background: #18181b !important; }
[data-theme-mode="dark"] .psb-stat:hover { background: #1f1f23 !important; }
[data-theme-mode="dark"] .psb-stat.psb-stat--active { background: #1f1f23 !important; }
[data-theme-mode="dark"] .psb-stat__value { color: #fafafa !important; }
[data-theme-mode="dark"] .psb-stat__label { color: #71717a !important; }
/* Toolbar */
[data-theme-mode="dark"] .psb-toolbar {
    background: #111113 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .psb-search {
    background: #18181b !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psb-search:focus { border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .psb-search::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .psb-search-wrap i { color: #52525b !important; }
[data-theme-mode="dark"] .psb-add-btn { background: #fafafa !important; color: #09090b !important; }
[data-theme-mode="dark"] .psb-add-btn:hover { background: #d4d4d8 !important; }
[data-theme-mode="dark"] .psb-filter-select {
    background: #18181b !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psb-filter-pill {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psb-filter-pill:hover { border-color: #3f3f46 !important; color: #fafafa !important; }
[data-theme-mode="dark"] .psb-filter-pill.psb-active {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}
/* Add form */
[data-theme-mode="dark"] .psb-add-form {
    background: #111113 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .psb-add-form__title { color: #fafafa !important; }
[data-theme-mode="dark"] .psb-add-form__label { color: #a1a1aa !important; }
[data-theme-mode="dark"] .psb-add-form__select,
[data-theme-mode="dark"] .psb-add-form__input {
    background: #18181b !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psb-add-form__select:focus,
[data-theme-mode="dark"] .psb-add-form__input:focus { border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .psb-add-form__save { background: #fafafa !important; color: #09090b !important; }
[data-theme-mode="dark"] .psb-add-user-membership {
    background: #1f1f23 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psb-add-user-membership:hover { background: #27272a !important; }
/* User rows */
[data-theme-mode="dark"] .psb-user-row {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .psb-user-row:hover { background: #1f1f23 !important; }
[data-theme-mode="dark"] .psb-user-name { color: #fafafa !important; }
[data-theme-mode="dark"] .psb-user-email { color: #71717a !important; }
[data-theme-mode="dark"] .psb-user-count { color: #52525b !important; }
[data-theme-mode="dark"] .psb-user-chevron { color: #52525b !important; }
[data-theme-mode="dark"] .psb-user-avatar { background: #27272a !important; }
/* Expanded detail */
[data-theme-mode="dark"] .psb-user-detail {
    background: #111113 !important; border-top-color: #27272a !important;
}
/* Detail table */
[data-theme-mode="dark"] .psb-detail-table th {
    background: #0e0e10 !important; color: #71717a !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .psb-detail-table td {
    color: #d4d4d8 !important; border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .psb-detail-actions { border-top-color: #27272a !important; }
/* Pagination */
[data-theme-mode="dark"] .psb-pagination { color: #71717a !important; }
[data-theme-mode="dark"] .psb-pagination__btn {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psb-pagination__btn:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .psb-pagination__btn.psb-page-active {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}
/* Loading */
[data-theme-mode="dark"] .psb-loading { color: #52525b !important; }
/* Cancel button */
[data-theme-mode="dark"] .psb-add-form__cancel {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
/* Role badges — dark translucent */
[data-theme-mode="dark"] .psb-role-badge--super_admin { background: rgba(70,60,55,.12) !important; color: #C5B9A7 !important; }
[data-theme-mode="dark"] .psb-role-badge--admin { background: rgba(122,140,110,.12) !important; color: #4ade80 !important; }
[data-theme-mode="dark"] .psb-role-badge--user { background: rgba(161,161,170,.1) !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .psb-role-badge--customer { background: rgba(251,191,36,.12) !important; color: #fbbf24 !important; }
/* Module pills */
[data-theme-mode="dark"] .psb-module-pill { background: #1f1f23 !important; color: #d4d4d8 !important; }
/* Entity pills */
[data-theme-mode="dark"] .psb-entity-pill { color: #71717a !important; }
/* Action buttons in detail rows */
[data-theme-mode="dark"] .psb-action-btn { color: #71717a !important; }
[data-theme-mode="dark"] .psb-action-btn:hover { color: #fafafa !important; }
[data-theme-mode="dark"] .psb-action-btn--danger:hover { color: #f87171 !important; }
/* Module card active border */
[data-theme-mode="dark"] .psb-module-card.psb-module-active {
    border-bottom-color: #fafafa !important;
}
/* Stat active highlight */
[data-theme-mode="dark"] .psb-stat.psb-stat--active {
    background: rgba(255,255,255,.04) !important;
    box-shadow: inset 0 -2px 0 #fafafa !important;
}

/* ── Platform Settings: Entity Cards + Toolbar (pse-*) ──────────── */
[data-theme-mode="dark"] .pse-toolbar { border-bottom-color: #27272a !important; }
[data-theme-mode="dark"] .pse-search {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .pse-search:focus { background: #18181b !important; border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .pse-search::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .pse-search-wrap i { color: #52525b !important; }
[data-theme-mode="dark"] .pse-view-btn {
    background: #1f1f23 !important; border-color: #27272a !important; color: #71717a !important;
}
[data-theme-mode="dark"] .pse-view-btn:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .pse-view-btn.pse-active { background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important; }
[data-theme-mode="dark"] .pse-filter-pill,
[data-theme-mode="dark"] .pse-sort-pill {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .pse-filter-pill:hover,
[data-theme-mode="dark"] .pse-sort-pill:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .pse-filter-pill.pse-active,
[data-theme-mode="dark"] .pse-sort-pill.pse-active { background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important; }
[data-theme-mode="dark"] .pse-dir-btn {
    background: #1f1f23 !important; border-color: #27272a !important; color: #71717a !important;
}
[data-theme-mode="dark"] .pse-dir-btn:hover { border-color: #3f3f46 !important; color: #fafafa !important; }
/* Entity cards */
[data-theme-mode="dark"] .pse-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .pse-card:hover {
    border-color: #3f3f46 !important; box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .pse-card__name { color: #fafafa !important; }
[data-theme-mode="dark"] .pse-card__id-badge { background: #1f1f23 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .pse-card__users { color: #a1a1aa !important; }
[data-theme-mode="dark"] .pse-card__status { background: rgba(122,140,110,.12) !important; color: #4ade80 !important; }
[data-theme-mode="dark"] .pse-card__logo { border-color: #27272a !important; }
[data-theme-mode="dark"] .pse-card__logo--placeholder { background: #1f1f23 !important; color: #71717a !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .pse-card__actions-btn { color: #71717a !important; }
[data-theme-mode="dark"] .pse-card__actions-btn:hover { color: #fafafa !important; }
[data-theme-mode="dark"] .pse-card__dropdown {
    background: #1f1f23 !important; border-color: #27272a !important; box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
[data-theme-mode="dark"] .pse-card__dropdown button { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .pse-card__dropdown button:hover { background: rgba(255,255,255,.04) !important; color: #fafafa !important; }
[data-theme-mode="dark"] .pse-card__dropdown button:disabled { color: #3f3f46 !important; }
/* Entity table view */
[data-theme-mode="dark"] .pse-table th {
    background: #111113 !important; border-color: #27272a !important; color: #71717a !important;
}
[data-theme-mode="dark"] .pse-table td {
    border-color: #1f1f23 !important; color: #d4d4d8 !important;
}
/* Panel description text */
[data-theme-mode="dark"] .ps-panel p[style*="color:#6E6660"] {
    color: #71717a !important;
}

/* ── Platform Settings: Module Cards + Toolbar ─────────────────── */
[data-theme-mode="dark"] .psm-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .psm-search {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psm-search:focus {
    background: #18181b !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .psm-search::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .psm-search-wrap i { color: #52525b !important; }
[data-theme-mode="dark"] .psm-view-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-view-btn:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-view-btn.psm-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-add-btn {
    background: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .psm-add-btn:hover {
    background: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psm-filter-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psm-filter-pill:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-filter-pill.psm-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-sort-select {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
/* Module cards */
[data-theme-mode="dark"] .psm-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .psm-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .psm-card__icon[style*="background"] {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .psm-card__name { color: #fafafa !important; }
[data-theme-mode="dark"] .psm-card__code-badge {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psm-card__desc { color: #71717a !important; }
[data-theme-mode="dark"] .psm-card__footer {
    border-top-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-card__status--active {
    background: rgba(122,140,110,.12) !important;
    color: #4ade80 !important;
}
[data-theme-mode="dark"] .psm-card__status--inactive {
    background: rgba(239,68,68,.12) !important;
    color: #f87171 !important;
}
[data-theme-mode="dark"] .psm-card__actions-btn { color: #71717a !important; }
[data-theme-mode="dark"] .psm-card__actions-btn:hover { color: #fafafa !important; }
[data-theme-mode="dark"] .psm-card__dropdown {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
/* Module table view */
[data-theme-mode="dark"] .psm-table th {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-table td {
    border-color: #1f1f23 !important;
    color: #d4d4d8 !important;
}

/* ── Notification Center (Platform Settings) ───────────────────── */
/* Stat card icons with inline light backgrounds */
[data-theme-mode="dark"] .ps-stat-card__icon[style*="background"] {
    background: #1f1f23 !important;
}
/* Sub-tabs (Live Feed / Full History / My Notifications) */
[data-theme-mode="dark"] .nc-subtab {
    background: transparent !important;
    color: #71717a !important;
    border: 1px solid transparent !important;
}
[data-theme-mode="dark"] .nc-subtab:hover {
    color: #d4d4d8 !important;
    background: rgba(255,255,255,.04) !important;
}
[data-theme-mode="dark"] .nc-subtab.active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
}
/* Feed container */
[data-theme-mode="dark"] #ncLiveFeedContainer,
[data-theme-mode="dark"] #ncMyNotifsContainer {
    border-color: #27272a !important;
    background: #111113 !important;
}
/* Feed items */
[data-theme-mode="dark"] [class*="nc-feed-item"],
[data-theme-mode="dark"] [class*="nc-notif-item"] {
    border-color: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] [class*="nc-feed-item"]:hover,
[data-theme-mode="dark"] [class*="nc-notif-item"]:hover {
    background: rgba(255,255,255,.03) !important;
}
/* Notification filter buttons */
[data-theme-mode="dark"] .nc-notif-filter {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .nc-notif-filter:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .nc-notif-filter.active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
    border-color: #3f3f46 !important;
}
/* Action buttons */
[data-theme-mode="dark"] #ncRefreshBtn,
[data-theme-mode="dark"] #ncExportCsv,
[data-theme-mode="dark"] #ncMarkAllRead {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] #ncRefreshBtn:hover,
[data-theme-mode="dark"] #ncExportCsv:hover,
[data-theme-mode="dark"] #ncMarkAllRead:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
/* Clear All (danger) */
[data-theme-mode="dark"] #ncClearAll {
    background: transparent !important;
    border-color: rgba(239,68,68,.3) !important;
    color: #f87171 !important;
}
[data-theme-mode="dark"] #ncClearAll:hover {
    background: rgba(239,68,68,.1) !important;
}
/* btn-outline-secondary globally in dark */
[data-theme-mode="dark"] .btn-outline-secondary {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .btn-outline-secondary:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
/* nav-pills in dark mode */
[data-theme-mode="dark"] .nav-pills .nav-link {
    color: #71717a !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .nav-pills .nav-link:hover {
    color: #d4d4d8 !important;
    background: rgba(255,255,255,.04) !important;
}
[data-theme-mode="dark"] .nav-pills .nav-link.active {
    color: #fafafa !important;
    background: rgba(255,255,255,.06) !important;
}
/* form-switch toggle in dark */
[data-theme-mode="dark"] .form-check-input {
    background-color: #3f3f46 !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .form-check-input:checked {
    background-color: #7A8C6E !important;
    border-color: #7A8C6E !important;
}
/* form-select-sm */
[data-theme-mode="dark"] .form-select-sm,
[data-theme-mode="dark"] .form-control-sm {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
/* Charts info section */
[data-theme-mode="dark"] .ps-info-section canvas {
    filter: none;
}

/* ── Memberships panel — search + table ────────────────────────── */
[data-theme-mode="dark"] .mb-search {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .mb-search:focus {
    background: #18181b !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .mb-search::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .mb-search-wrap i { color: #52525b !important; }
[data-theme-mode="dark"] .mb-table-wrap { background: transparent !important; }
/* Membership cards */
[data-theme-mode="dark"] .mb-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .mb-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .mb-card__module { color: #fafafa !important; }
[data-theme-mode="dark"] .mb-card__entity { color: #71717a !important; }
[data-theme-mode="dark"] .mb-card__detail { color: #52525b !important; }
[data-theme-mode="dark"] .mb-card__footer { border-color: #27272a !important; background: transparent !important; }
[data-theme-mode="dark"] .mb-card__actions-btn { background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .mb-card__actions-btn:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .mb-table th {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .mb-table th:hover { background: #1f1f23 !important; }
[data-theme-mode="dark"] .mb-table td {
    color: #d4d4d8 !important;
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .mb-table tr:hover td { background: rgba(255,255,255,.02) !important; }
[data-theme-mode="dark"] .mb-view-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .mb-view-btn:hover,
[data-theme-mode="dark"] .mb-view-btn.active {
    background: #27272a !important;
    color: #fafafa !important;
}

/* Mobile sidebar horizontal scroll */
@media (max-width: 991.98px) {
    [data-theme-mode="dark"] .up-sidebar {
        border-right: none !important;
        border-bottom: 1px solid #27272a !important;
        background: #111113 !important;
    }
    [data-theme-mode="dark"] .up-sidebar__nav-item:hover {
        background: rgba(255,255,255,.06);
    }
    [data-theme-mode="dark"] .up-sidebar__nav-item.active {
        background: rgba(255,255,255,.08);
    }
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL NUCLEAR DARK MODE — Kill ALL remaining white
   This section catches every component that hardcodes
   background:#fff, background:white, or bg-* utilities.
   Added last so it wins specificity battles.
   ══════════════════════════════════════════════════════════════ */

/* ── Every element with white/light background ─────────────── */
[data-theme-mode="dark"] .card,
[data-theme-mode="dark"] .card-body,
[data-theme-mode="dark"] .card-header,
[data-theme-mode="dark"] .card-footer,
[data-theme-mode="dark"] .card.custom-card,
[data-theme-mode="dark"] .card.custom-card .card-body {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ── Customer cards ────────────────────────────────────────── */
[data-theme-mode="dark"] .sa-customer-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-customer-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
}
[data-theme-mode="dark"] .sa-customer-card__header { background: transparent !important; }
[data-theme-mode="dark"] .sa-customer-card__name { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-customer-card__website a { color: #71717a !important; }
[data-theme-mode="dark"] .sa-customer-card__website a:hover { color: #a1a1aa !important; }
[data-theme-mode="dark"] .sa-customer-card__date { color: #52525b !important; }
[data-theme-mode="dark"] .sa-customer-card__stats {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-customer-card__stat { border-color: #27272a !important; }
[data-theme-mode="dark"] .sa-customer-card__stat-value { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-customer-card__stat-label { color: #71717a !important; }
[data-theme-mode="dark"] .sa-customer-card__stat--link:hover {
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .sa-customer-card__discount { color: #a1a1aa !important; background: #1f1f23 !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .sa-customer-card__logo { background: #111113 !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .sa-customer-card__logo-initials { color: #a1a1aa !important; }
[data-theme-mode="dark"] .sa-customer-card__menu-btn { color: #71717a !important; }
[data-theme-mode="dark"] .sa-customer-card__menu-btn:hover { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-customer-cards-count { color: #52525b !important; }

/* ── Document Library ──────────────────────────────────────── */
[data-theme-mode="dark"] .sa-doc-lib-tabs { background: #111113 !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .sa-doc-lib-tabs .nav-link { color: #a1a1aa !important; }
[data-theme-mode="dark"] .sa-doc-lib-tabs .nav-link.active { color: #fafafa !important; background: #18181b !important; }
/* Folder rows — kill alternating white/light backgrounds */
[data-theme-mode="dark"] [class*="folder-row"],
[data-theme-mode="dark"] [class*="folder-item"],
[data-theme-mode="dark"] [class*="doc-row"],
[data-theme-mode="dark"] [class*="doc-item"],
[data-theme-mode="dark"] [class*="file-row"],
[data-theme-mode="dark"] [class*="file-item"] {
    background: transparent !important;
    border-color: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] [class*="folder-row"]:nth-child(even),
[data-theme-mode="dark"] [class*="doc-row"]:nth-child(even),
[data-theme-mode="dark"] [class*="file-row"]:nth-child(even) {
    background: rgba(255,255,255,.02) !important;
}
[data-theme-mode="dark"] [class*="folder-row"]:hover,
[data-theme-mode="dark"] [class*="doc-row"]:hover,
[data-theme-mode="dark"] [class*="file-row"]:hover {
    background: rgba(255,255,255,.04) !important;
}

/* ── Platform Settings ─────────────────────────────────────── */
[data-theme-mode="dark"] [class*="ps-sidebar"],
[data-theme-mode="dark"] [class*="ps-nav"],
[data-theme-mode="dark"] [class*="settings-sidebar"],
[data-theme-mode="dark"] [class*="settings-nav"] {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] [class*="ps-nav-item"],
[data-theme-mode="dark"] [class*="settings-nav-item"] {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] [class*="ps-nav-item"]:hover,
[data-theme-mode="dark"] [class*="settings-nav-item"]:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] [class*="ps-nav-item"].active,
[data-theme-mode="dark"] [class*="settings-nav-item"].active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
}
/* Platform Settings section labels */
[data-theme-mode="dark"] [class*="ps-section-label"],
[data-theme-mode="dark"] [class*="settings-section-label"] {
    color: #52525b !important;
}
/* Entity mini cards in Platform Settings */
[data-theme-mode="dark"] [class*="entity-card"],
[data-theme-mode="dark"] [class*="entity-mini"] {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] [class*="entity-card"]:hover,
[data-theme-mode="dark"] [class*="entity-mini"]:hover {
    border-color: #3f3f46 !important;
}

/* ── KPI stat cards with inline colored backgrounds ────────── */
[data-theme-mode="dark"] .sa-stat-card,
[data-theme-mode="dark"] [class*="kpi-card"],
[data-theme-mode="dark"] [class*="stat-card"] {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-stat-card__value,
[data-theme-mode="dark"] [class*="kpi-value"],
[data-theme-mode="dark"] [class*="stat-value"] { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-stat-card__title,
[data-theme-mode="dark"] [class*="kpi-label"],
[data-theme-mode="dark"] [class*="stat-label"] { color: #71717a !important; }

/* ── Email engine template cards ───────────────────────────── */
[data-theme-mode="dark"] [class*="email-card"],
[data-theme-mode="dark"] [class*="template-card"],
[data-theme-mode="dark"] [class*="automation-card"] {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ── THE ULTIMATE CATCH-ALL ────────────────────────────────── */
/* Any element with inline background-color:#fff or white */
[data-theme-mode="dark"] [style*="background-color: #fff"],
[data-theme-mode="dark"] [style*="background-color:#fff"],
[data-theme-mode="dark"] [style*="background-color: white"],
[data-theme-mode="dark"] [style*="background-color:white"],
[data-theme-mode="dark"] [style*="background: #fff"],
[data-theme-mode="dark"] [style*="background:#fff"],
[data-theme-mode="dark"] [style*="background: white"],
[data-theme-mode="dark"] [style*="background:white"],
[data-theme-mode="dark"] [style*="background-color: rgb(255, 255, 255)"],
[data-theme-mode="dark"] [style*="background-color: rgb(255,255,255)"] {
    background: #18181b !important;
    color: #d4d4d8 !important;
}
/* Any element with light gray inline backgrounds */
[data-theme-mode="dark"] [style*="background-color: #f8f9fa"],
[data-theme-mode="dark"] [style*="background-color:#f8f9fa"],
[data-theme-mode="dark"] [style*="background-color: #F8F6F3"],
[data-theme-mode="dark"] [style*="background-color:#F8F6F3"],
[data-theme-mode="dark"] [style*="background-color: #EFEBE5"],
[data-theme-mode="dark"] [style*="background-color:#EFEBE5"],
[data-theme-mode="dark"] [style*="background: #f8f9fa"],
[data-theme-mode="dark"] [style*="background:#f8f9fa"],
[data-theme-mode="dark"] [style*="background: #F8F6F3"],
[data-theme-mode="dark"] [style*="background: #EFEBE5"],
[data-theme-mode="dark"] [style*="background-color: #fafbfc"],
[data-theme-mode="dark"] [style*="background-color: #EFEBE5"],
[data-theme-mode="dark"] [style*="background: #fafbfc"],
[data-theme-mode="dark"] [style*="background: #EFEBE5"] {
    background: rgba(255,255,255,.02) !important;
}

/* Bootstrap bg utilities */
[data-theme-mode="dark"] .bg-white,
[data-theme-mode="dark"] .bg-light,
[data-theme-mode="dark"] .bg-body,
[data-theme-mode="dark"] .bg-body-secondary,
[data-theme-mode="dark"] .bg-body-tertiary {
    background: #18181b !important;
}

/* List groups anywhere */
[data-theme-mode="dark"] .list-group-item {
    background: #18181b !important;
    border-color: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .list-group-item:hover,
[data-theme-mode="dark"] .list-group-item.active {
    background: #1f1f23 !important;
}

/* All borders in dark mode */
[data-theme-mode="dark"] [class*="border-bottom"],
[data-theme-mode="dark"] [class*="border-top"],
[data-theme-mode="dark"] [class*="border-start"],
[data-theme-mode="dark"] [class*="border-end"] {
    border-color: #27272a !important;
}

/* ── Text color catch-alls ─────────────────────────────────── */
[data-theme-mode="dark"] .text-dark { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .text-body { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .text-black { color: #d4d4d8 !important; }
[data-theme-mode="dark"] [style*="color: #2A2622"],
[data-theme-mode="dark"] [style*="color:#2A2622"],
[data-theme-mode="dark"] [style*="color: #1A1715"],
[data-theme-mode="dark"] [style*="color:#1A1715"],
[data-theme-mode="dark"] [style*="color: #2A2622"],
[data-theme-mode="dark"] [style*="color:#2A2622"] {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] [style*="color: #6E6660"],
[data-theme-mode="dark"] [style*="color:#6E6660"],
[data-theme-mode="dark"] [style*="color: #847C70"],
[data-theme-mode="dark"] [style*="color:#847C70"] {
    color: #71717a !important;
}

/* ══════════════════════════════════════════════════════════════
   ABSOLUTE FINAL OVERRIDE — NOTHING WHITE SURVIVES
   This is the last rule in the file. Maximum specificity.
   Every div, section, aside, main, article, span, li, tr, td
   that has a white or near-white background gets forced dark.
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .app-content,
[data-theme-mode="dark"] .main-content,
[data-theme-mode="dark"] .container-fluid,
[data-theme-mode="dark"] .row > [class*="col-"] > .card,
[data-theme-mode="dark"] .row > [class*="col-"] > .card > .card-body,
[data-theme-mode="dark"] .row > [class*="col-"] > div,
[data-theme-mode="dark"] .tab-content,
[data-theme-mode="dark"] .tab-pane,
[data-theme-mode="dark"] .panel,
[data-theme-mode="dark"] .panel-body,
[data-theme-mode="dark"] .well,
[data-theme-mode="dark"] .content-area,
[data-theme-mode="dark"] .page-content {
    background: transparent !important;
    color: #d4d4d8 !important;
}

/* Force dark on the app-content wrapper — this is THE main content bg */
[data-theme-mode="dark"] .app-content {
    background: #09090b !important;
}

/* EVERY card variant, nested or not */
[data-theme-mode="dark"] .card,
[data-theme-mode="dark"] .card .card,
[data-theme-mode="dark"] .card .card-body,
[data-theme-mode="dark"] .card .card-header,
[data-theme-mode="dark"] .card .card-footer {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ══════════════════════════════════════════════════════════════
   Platform Settings — Complete Dark Mode
   ══════════════════════════════════════════════════════════════ */
/* Sidebar */
[data-theme-mode="dark"] .ps-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-sidebar__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-sidebar__logo {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .ps-sidebar__title { color: #fafafa !important; }
[data-theme-mode="dark"] .ps-sidebar__subtitle { color: #71717a !important; }
[data-theme-mode="dark"] .ps-sidebar__section-label { color: #52525b !important; }
[data-theme-mode="dark"] .ps-sidebar__nav-item {
    color: #a1a1aa !important;
    border-left-color: transparent !important;
}
[data-theme-mode="dark"] .ps-sidebar__nav-item:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-sidebar__nav-item.active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
    border-left-color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-sidebar__badge {
    background: #ef4444 !important;
}
/* Content panels */
[data-theme-mode="dark"] .ps-content {
    background: #18181b !important;
}
[data-theme-mode="dark"] .ps-panel {
    background: transparent !important;
}
[data-theme-mode="dark"] .ps-panel__title {
    color: #fafafa !important;
    border-bottom-color: #27272a !important;
}
/* Stat cards */
[data-theme-mode="dark"] .ps-stat-card {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-stat-card:hover {
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .ps-stat-card__value { color: #fafafa !important; }
[data-theme-mode="dark"] .ps-stat-card__label { color: #71717a !important; }
[data-theme-mode="dark"] .ps-stat-card__icon {
    background: #27272a !important;
}
/* Info sections */
[data-theme-mode="dark"] .ps-info-section {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-info-section__title {
    color: #fafafa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-info-row__label { color: #71717a !important; }
[data-theme-mode="dark"] .ps-info-row__value { color: #d4d4d8 !important; }
/* Entity chips */
[data-theme-mode="dark"] .ps-entity-chip {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-entity-chip:hover {
    border-color: #3f3f46 !important;
    background: #27272a !important;
}
[data-theme-mode="dark"] .ps-entity-chip__name { color: #fafafa !important; }
[data-theme-mode="dark"] .ps-entity-chip__meta { color: #71717a !important; }
[data-theme-mode="dark"] .ps-entity-chip__logo--placeholder {
    background: #27272a !important;
    color: #71717a !important;
}
/* Integration cards */
[data-theme-mode="dark"] .ps-integration-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-integration-card__body {
    background: #18181b !important;
}
/* Filter buttons */
[data-theme-mode="dark"] .ps-role-filter:not(.active),
[data-theme-mode="dark"] .ps-login-filter:not(.active),
[data-theme-mode="dark"] .ps-ticket-status-filter:not(.active),
[data-theme-mode="dark"] .ps-dir-view-btn:not(.active) {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-role-filter:not(.active):hover,
[data-theme-mode="dark"] .ps-login-filter:not(.active):hover,
[data-theme-mode="dark"] .ps-ticket-status-filter:not(.active):hover,
[data-theme-mode="dark"] .ps-dir-view-btn:not(.active):hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-role-filter.active,
[data-theme-mode="dark"] .ps-login-filter.active,
[data-theme-mode="dark"] .ps-ticket-status-filter.active,
[data-theme-mode="dark"] .ps-dir-view-btn.active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
/* Brand preview */
[data-theme-mode="dark"] .ps-brand-preview {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-brand-preview__body {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .ps-brand-preview__color-label { color: #71717a !important; }
[data-theme-mode="dark"] .ps-brand-preview__mock-item {
    background: #18181b !important;
    color: #71717a !important;
    border-color: #27272a !important;
}
/* Architecture tabs */
[data-theme-mode="dark"] .arch-tabs {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .arch-tab {
    color: #71717a !important;
}
[data-theme-mode="dark"] .arch-tab:hover {
    color: #d4d4d8 !important;
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .arch-tab.active {
    color: #fafafa !important;
    border-bottom-color: #fafafa !important;
}
/* Module cards in settings */
[data-theme-mode="dark"] .sa-mod-card {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-mod-card:hover {
    border-color: #3f3f46 !important;
}
/* Membership empty state */
[data-theme-mode="dark"] .sa-mem-empty {
    color: #52525b !important;
}
/* Role picker dropdown */
[data-theme-mode="dark"] .sa-role-picker {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
[data-theme-mode="dark"] .sa-role-picker__opt {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-role-picker__opt:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-role-picker__footer {
    border-top-color: #27272a !important;
}
/* Login config */
[data-theme-mode="dark"] [class*="login-config"],
[data-theme-mode="dark"] [class*="login-preview"] {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
/* Release notes embed in settings */
[data-theme-mode="dark"] .rn-container {
    background: transparent !important;
}
[data-theme-mode="dark"] .rn-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .rn-sidebar-item {
    color: #a1a1aa !important;
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .rn-sidebar-item:hover {
    background: rgba(255,255,255,.04) !important;
}
[data-theme-mode="dark"] .rn-sidebar-item.active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .rn-sidebar-month {
    color: #a1a1aa !important;
    background: #111113 !important;
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .rn-content {
    background: #18181b !important;
}
[data-theme-mode="dark"] .rn-version-section {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .rn-version-header {
    background: transparent !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .rn-version-number { color: #fafafa !important; }
[data-theme-mode="dark"] .rn-version-date { color: #71717a !important; }
[data-theme-mode="dark"] .rn-version-badge { color: #a1a1aa !important; }
[data-theme-mode="dark"] .rn-section-label { color: #71717a !important; }
[data-theme-mode="dark"] .rn-list-item { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .rn-scope-pill {
    background: #1f1f23 !important;
    color: #71717a !important;
}
/* Search bars everywhere in settings */
[data-theme-mode="dark"] .rn-search input,
[data-theme-mode="dark"] .ps-search input,
[data-theme-mode="dark"] [class*="search"] input {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .rn-filter-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .rn-filter-pill:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
/* Directory cards in settings */
[data-theme-mode="dark"] .sa-dir-card {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-dir-card:hover {
    border-color: #3f3f46 !important;
}
/* Analytics in settings */
[data-theme-mode="dark"] [class*="analytics"] {
    color: #d4d4d8 !important;
}

/* ── Mobile Platform Settings ──────────────────────────────── */
@media (max-width: 991.98px) {
    [data-theme-mode="dark"] .ps-sidebar {
        border-right: none !important;
        border-bottom: 1px solid #27272a !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   FINAL NUCLEAR SWEEP — Every remaining light-mode element
   2026-04-25 — Comprehensive pass across all pages
   ══════════════════════════════════════════════════════════════ */

/* ── A. Global catch-alls for inline styles ────────────────── */
[data-theme-mode="dark"] [style*="background:#fff"],
[data-theme-mode="dark"] [style*="background: #fff"],
[data-theme-mode="dark"] [style*="background:white"],
[data-theme-mode="dark"] [style*="background: white"],
[data-theme-mode="dark"] [style*="background:#ffffff"],
[data-theme-mode="dark"] [style*="background: #ffffff"] {
    background: #18181b !important;
}
[data-theme-mode="dark"] [style*="background:#f8"],
[data-theme-mode="dark"] [style*="background: #f8"],
[data-theme-mode="dark"] [style*="background:#f9"],
[data-theme-mode="dark"] [style*="background: #f9"],
[data-theme-mode="dark"] [style*="background:#fa"],
[data-theme-mode="dark"] [style*="background: #fa"],
[data-theme-mode="dark"] [style*="background:#fb"],
[data-theme-mode="dark"] [style*="background: #fb"] {
    background: #111113 !important;
}
[data-theme-mode="dark"] [style*="background:#f0"],
[data-theme-mode="dark"] [style*="background: #f0"],
[data-theme-mode="dark"] [style*="background:#f1"],
[data-theme-mode="dark"] [style*="background: #f1"],
[data-theme-mode="dark"] [style*="background:#f3"],
[data-theme-mode="dark"] [style*="background: #f3"],
[data-theme-mode="dark"] [style*="background:#f4"],
[data-theme-mode="dark"] [style*="background: #f4"],
[data-theme-mode="dark"] [style*="background:#f5"],
[data-theme-mode="dark"] [style*="background: #f5"] {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] [style*="background:#e5"],
[data-theme-mode="dark"] [style*="background: #e5"],
[data-theme-mode="dark"] [style*="background:#e9"],
[data-theme-mode="dark"] [style*="background: #e9"],
[data-theme-mode="dark"] [style*="background:#eee"],
[data-theme-mode="dark"] [style*="background: #eee"],
[data-theme-mode="dark"] [style*="background:#e2"],
[data-theme-mode="dark"] [style*="background: #e2"] {
    background: #1f1f23 !important;
}
/* Inline dark text colors */
[data-theme-mode="dark"] [style*="color:#111"],
[data-theme-mode="dark"] [style*="color: #111"],
[data-theme-mode="dark"] [style*="color:#1e2"],
[data-theme-mode="dark"] [style*="color: #1e2"],
[data-theme-mode="dark"] [style*="color:#2A2622"],
[data-theme-mode="dark"] [style*="color: #2A2622"],
[data-theme-mode="dark"] [style*="color:#212"],
[data-theme-mode="dark"] [style*="color: #212"],
[data-theme-mode="dark"] [style*="color:#212529"],
[data-theme-mode="dark"] [style*="color: #212529"] {
    color: #fafafa !important;
}
[data-theme-mode="dark"] [style*="color:#374"],
[data-theme-mode="dark"] [style*="color: #374"],
[data-theme-mode="dark"] [style*="color:#3D3833"],
[data-theme-mode="dark"] [style*="color: #3D3833"],
[data-theme-mode="dark"] [style*="color:#475"],
[data-theme-mode="dark"] [style*="color: #475"],
[data-theme-mode="dark"] [style*="color:#524A45"],
[data-theme-mode="dark"] [style*="color: #524A45"] {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] [style*="color:#4b5"],
[data-theme-mode="dark"] [style*="color: #4b5"],
[data-theme-mode="dark"] [style*="color:#6E6660"],
[data-theme-mode="dark"] [style*="color: #6E6660"],
[data-theme-mode="dark"] [style*="color:#6E6660"],
[data-theme-mode="dark"] [style*="color: #6E6660"] {
    color: #a1a1aa !important;
}
/* Inline borders */
[data-theme-mode="dark"] [style*="border:1px solid #e"],
[data-theme-mode="dark"] [style*="border: 1px solid #e"],
[data-theme-mode="dark"] [style*="border:1px solid #f"],
[data-theme-mode="dark"] [style*="border: 1px solid #f"],
[data-theme-mode="dark"] [style*="border:1px solid #d"],
[data-theme-mode="dark"] [style*="border: 1px solid #d"],
[data-theme-mode="dark"] [style*="border:1px solid #c"],
[data-theme-mode="dark"] [style*="border: 1px solid #c"] {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] [style*="border-top:1px solid"],
[data-theme-mode="dark"] [style*="border-top: 1px solid"],
[data-theme-mode="dark"] [style*="border-bottom:1px solid"],
[data-theme-mode="dark"] [style*="border-bottom: 1px solid"],
[data-theme-mode="dark"] [style*="border-left:1px solid"],
[data-theme-mode="dark"] [style*="border-left: 1px solid"],
[data-theme-mode="dark"] [style*="border-right:1px solid"],
[data-theme-mode="dark"] [style*="border-right: 1px solid"] {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] [style*="border:2px solid #e"],
[data-theme-mode="dark"] [style*="border: 2px solid #e"],
[data-theme-mode="dark"] [style*="border:2px solid #f"],
[data-theme-mode="dark"] [style*="border: 2px solid #f"],
[data-theme-mode="dark"] [style*="border:2px solid #d"],
[data-theme-mode="dark"] [style*="border: 2px solid #d"] {
    border-color: #27272a !important;
}
/* Inline background-color */
[data-theme-mode="dark"] [style*="background-color:#fff"],
[data-theme-mode="dark"] [style*="background-color: #fff"],
[data-theme-mode="dark"] [style*="background-color:white"],
[data-theme-mode="dark"] [style*="background-color: white"],
[data-theme-mode="dark"] [style*="background-color:#ffffff"],
[data-theme-mode="dark"] [style*="background-color: #ffffff"] {
    background-color: #18181b !important;
}
[data-theme-mode="dark"] [style*="background-color:#f8"],
[data-theme-mode="dark"] [style*="background-color: #f8"],
[data-theme-mode="dark"] [style*="background-color:#f9"],
[data-theme-mode="dark"] [style*="background-color: #f9"],
[data-theme-mode="dark"] [style*="background-color:#fa"],
[data-theme-mode="dark"] [style*="background-color: #fa"] {
    background-color: #111113 !important;
}
[data-theme-mode="dark"] [style*="background-color:#f0"],
[data-theme-mode="dark"] [style*="background-color: #f0"],
[data-theme-mode="dark"] [style*="background-color:#f1"],
[data-theme-mode="dark"] [style*="background-color: #f1"],
[data-theme-mode="dark"] [style*="background-color:#f3"],
[data-theme-mode="dark"] [style*="background-color: #f3"],
[data-theme-mode="dark"] [style*="background-color:#e5"],
[data-theme-mode="dark"] [style*="background-color: #e5"],
[data-theme-mode="dark"] [style*="background-color:#e9"],
[data-theme-mode="dark"] [style*="background-color: #e9"] {
    background-color: #1f1f23 !important;
}

/* ── B. Entity admin pages — shared classes (admin-pages.css) ── */
/* Section headers */
[data-theme-mode="dark"] .sa-section__head {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-section__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-section__count {
    background: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-section__desc {
    color: #71717a !important;
}
/* Module card (rich card) */
[data-theme-mode="dark"] .sa-mod-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-mod-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.5) !important;
}
[data-theme-mode="dark"] .sa-mod-card__favicon {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-mod-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-mod-card__desc {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-mod-card__entity-pill {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-mod-card__tab {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-mod-card__tab:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-mod-card__tab--active {
    background: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .sa-mod-card__tab--active:hover {
    background: #e4e4e7 !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .sa-mod-card__footer {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-mod-card__open-btn {
    background: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-mod-card__open-btn:hover {
    background: #fafafa !important;
    color: #09090b !important;
}
/* Recent items, tasks, bookmarks inside module cards */
[data-theme-mode="dark"] .sa-recent-item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-recent-item__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-recent-item__title a {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-recent-item__time {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-task-item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-task-item__text {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-task-item__text--done {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-task-item__delete {
    color: #3f3f46 !important;
}
[data-theme-mode="dark"] .sa-task-item__delete:hover {
    color: #f87171 !important;
}
[data-theme-mode="dark"] .sa-task-add {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-task-add__input {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-task-add__input:focus {
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .sa-task-add__input::placeholder {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-task-add__btn {
    background: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .sa-task-add__btn:hover {
    background: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-bm-item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-bm-item__link {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-bm-item__delete {
    color: #3f3f46 !important;
}
[data-theme-mode="dark"] .sa-bm-item__delete:hover {
    color: #f87171 !important;
}
[data-theme-mode="dark"] .sa-mod-card__panel-empty,
[data-theme-mode="dark"] .sa-mod-card__panel-loading {
    color: #52525b !important;
}
/* Admin action tiles */
[data-theme-mode="dark"] .sa-adm-tile {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-adm-tile:hover {
    border-color: #3f3f46 !important;
    color: #fafafa !important;
    box-shadow: 0 6px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .sa-adm-tile__label {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-adm-tile__desc {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-adm-tile__icon {
    background: #1f1f23 !important;
}
/* Activity feed */
[data-theme-mode="dark"] .sa-activity {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-user-activity-item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-user-activity-item:hover {
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .sa-user-activity-item__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-user-activity-item__desc {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-user-activity-item__time {
    color: #52525b !important;
}
/* Empty state (non-sa-empty-state variant) */
[data-theme-mode="dark"] .sa-empty {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-empty__icon {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-empty__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-empty__text {
    color: #71717a !important;
}

/* ── C. Membership page (psb- / sa-mem- extra) ─────────────── */
[data-theme-mode="dark"] .sa-mem-module-cell:hover {
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .sa-mem-user-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-mem-user-email {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-mem-avatar {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-mem-count {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-mem-count--zero {
    background: transparent !important;
    color: #3f3f46 !important;
}
[data-theme-mode="dark"] .sa-mem-empty-cell:hover {
    background: rgba(70,60,55,.06) !important;
    color: #C5B9A7 !important;
    border-color: rgba(70,60,55,.2) !important;
}
[data-theme-mode="dark"] .sa-sa-badge {
    background: rgba(251,191,36,.12) !important;
    color: #fbbf24 !important;
}
[data-theme-mode="dark"] .sa-role-picker__header {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-role-picker__title {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-role-picker__close {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-role-picker__close:hover {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-role-picker__opt.active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-role-picker__remove:hover {
    background: rgba(239,68,68,.08) !important;
}

/* ── D. Intacct / ModMed integration pages ─────────────────── */
[data-theme-mode="dark"] .intacct-tab {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .intacct-tab:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .intacct-tab__count {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .intacct-stats-inline .stat-label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .intacct-stats-inline .stat-value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] tr.intacct-syncing {
    background: rgba(70,60,55,.06) !important;
}
[data-theme-mode="dark"] tr.intacct-syncing td {
    border-color: rgba(70,60,55,.15) !important;
}
[data-theme-mode="dark"] tr.intacct-viewing {
    background: rgba(139,92,246,.06) !important;
}
[data-theme-mode="dark"] tr.intacct-viewing td {
    border-color: rgba(139,92,246,.15) !important;
}
[data-theme-mode="dark"] .mm-tab {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .mm-tab:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .mm-tab__count {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .mm-action-btn {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .mm-action-btn:hover {
    background: #27272a !important;
    color: #fafafa !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] tr.mm-syncing {
    background: rgba(70,60,55,.06) !important;
}
[data-theme-mode="dark"] tr.mm-syncing td {
    border-color: rgba(70,60,55,.15) !important;
}

/* ── E. Forms — reinforcement with !important ──────────────── */
[data-theme-mode="dark"] .form-control,
[data-theme-mode="dark"] .form-select,
[data-theme-mode="dark"] textarea,
[data-theme-mode="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]) {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
}
[data-theme-mode="dark"] .form-check-input {
    background-color: #1f1f23 !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .form-check-input:checked {
    background-color: #fafafa !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .form-switch .form-check-input {
    background-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .form-switch .form-check-input:checked {
    background-color: #fafafa !important;
}
/* Choices.js */
[data-theme-mode="dark"] .choices {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .choices__inner {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .choices__list--dropdown {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .choices__list--dropdown .choices__item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .choices__input {
    background: #111113 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .choices[data-type*="select-one"]::after {
    border-color: #71717a transparent transparent transparent !important;
}
[data-theme-mode="dark"] .choices__item--selectable {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .choices__item.choices__item--choice {
    color: #a1a1aa !important;
}
/* Input group */
[data-theme-mode="dark"] .input-group-text {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #71717a !important;
}

/* ── F. Modals — reinforcement ─────────────────────────────── */
[data-theme-mode="dark"] .modal-content {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .modal-header {
    border-bottom-color: #27272a !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .modal-footer {
    border-top-color: #27272a !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .modal-title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .modal-body {
    background: #18181b !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .btn-close {
    filter: invert(1) !important;
    opacity: .5 !important;
}

/* ── G. Dropdowns — reinforcement ──────────────────────────── */
[data-theme-mode="dark"] .dropdown-menu {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
    box-shadow: 0 12px 40px rgba(0,0,0,.7) !important;
}
[data-theme-mode="dark"] .dropdown-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .dropdown-item:hover,
[data-theme-mode="dark"] .dropdown-item:focus {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .dropdown-divider {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .dropdown-header {
    color: #71717a !important;
}
/* Section label inside a dropdown menu — same look as the "My Modules"
   sidebar label so groupings feel consistent across the app. Scoped under
   .dropdown-menu so it beats any single-class Bootstrap defaults. */
.dropdown-menu .sa-dropdown-section-label,
.sa-dropdown-section-label {
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #847C70 !important;
    padding: 0.5rem 1rem 0.2rem !important;
    margin: 0 !important;
    list-style: none !important;
    line-height: 1.2 !important;
    background: transparent !important;
    pointer-events: none;
}
[data-theme-mode="dark"] .dropdown-menu .sa-dropdown-section-label,
[data-theme-mode="dark"] .sa-dropdown-section-label {
    color: rgba(255, 255, 255, 0.4) !important;
}
/* Bootstrap popovers */
[data-theme-mode="dark"] .popover {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .popover-header {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .popover-body {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .bs-popover-top > .popover-arrow::after,
[data-theme-mode="dark"] .bs-popover-bottom > .popover-arrow::after,
[data-theme-mode="dark"] .bs-popover-start > .popover-arrow::after,
[data-theme-mode="dark"] .bs-popover-end > .popover-arrow::after {
    border-color: #1f1f23 !important;
}
/* Dropdown menus inside card dropdowns (psm, pse, mb, etc.) */
[data-theme-mode="dark"] .psm-card__dropdown,
[data-theme-mode="dark"] .pse-card__dropdown,
[data-theme-mode="dark"] .mb-card__actions-btn + .dropdown-menu,
[data-theme-mode="dark"] [class*="__dropdown"] {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
[data-theme-mode="dark"] .psm-card__dropdown button,
[data-theme-mode="dark"] .psm-card__dropdown a,
[data-theme-mode="dark"] .pse-card__dropdown button,
[data-theme-mode="dark"] .pse-card__dropdown a {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psm-card__dropdown button:hover,
[data-theme-mode="dark"] .psm-card__dropdown a:hover,
[data-theme-mode="dark"] .pse-card__dropdown button:hover,
[data-theme-mode="dark"] .pse-card__dropdown a:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}

/* ── H. Tabs/Pills — reinforcement ────────────────────────── */
[data-theme-mode="dark"] .nav-tabs {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .tab-content {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .tab-pane {
    color: #d4d4d8 !important;
}
/* Underline tabs custom */
[data-theme-mode="dark"] .sa-underline-tabs {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-underline-tabs .nav-link {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-underline-tabs .nav-link:hover {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-underline-tabs .nav-link.active {
    color: #fafafa !important;
    border-bottom-color: #fafafa !important;
}

/* ── I. Alerts/Toasts — reinforcement ──────────────────────── */
[data-theme-mode="dark"] .alert {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .alert-primary {
    background: rgba(70,60,55,.08) !important;
    border-color: rgba(70,60,55,.15) !important;
    color: #C5B9A7 !important;
}
[data-theme-mode="dark"] .alert-success {
    background: rgba(122,140,110,.08) !important;
    border-color: rgba(122,140,110,.15) !important;
    color: #4ade80 !important;
}
[data-theme-mode="dark"] .alert-warning {
    background: rgba(245,158,11,.08) !important;
    border-color: rgba(245,158,11,.15) !important;
    color: #fbbf24 !important;
}
[data-theme-mode="dark"] .alert-danger {
    background: rgba(239,68,68,.08) !important;
    border-color: rgba(239,68,68,.15) !important;
    color: #f87171 !important;
}
[data-theme-mode="dark"] .alert-info {
    background: rgba(122,140,110,.08) !important;
    border-color: rgba(122,140,110,.15) !important;
    color: #7A8C6E !important;
}
[data-theme-mode="dark"] .toast {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
[data-theme-mode="dark"] .toast-header {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
    color: #fafafa !important;
}

/* ── J. Badges ─────────────────────────────────────────────── */
[data-theme-mode="dark"] .badge.bg-light {
    background: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .badge.bg-secondary {
    background: rgba(161,161,170,.15) !important;
    color: #a1a1aa !important;
}

/* ── K. Avatar / Profile components ────────────────────────── */
[data-theme-mode="dark"] .avatar {
    background: #27272a !important;
}
[data-theme-mode="dark"] .avatar-initials {
    background: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .mainuserProfile .avatar-sm {
    border-color: #3f3f46 !important;
}

/* ── L. Sidebar sub-menus ──────────────────────────────────── */
[data-theme-mode="dark"] .slide-menu {
    background: transparent !important;
}
[data-theme-mode="dark"] .slide-menu .child1,
[data-theme-mode="dark"] .slide-menu .child2,
[data-theme-mode="dark"] .slide-menu .child3 {
    background: transparent !important;
}

/* ── M. Platform Settings & Entities pages (ps-, pse-, psm-) ─ */
[data-theme-mode="dark"] .ps-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-sidebar__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-sidebar__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-sidebar__nav-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ps-sidebar__nav-item:hover {
    background: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-sidebar__nav-item.active {
    background: rgba(255,255,255,.06) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-panel__title {
    color: #fafafa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-stat-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-stat-card__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-stat-card__label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .ps-info-section {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-info-row {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .ps-info-row:hover {
    background: rgba(255,255,255,.02) !important;
}
[data-theme-mode="dark"] .ps-info-row__label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .ps-info-row__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ps-entity-chip {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ps-entity-chip:hover {
    background: #1f1f23 !important;
    border-color: #3f3f46 !important;
}
/* Entity cards (pse-) */
[data-theme-mode="dark"] .pse-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pse-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .pse-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .pse-card__logo {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pse-card__logo--placeholder {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #52525b !important;
}
[data-theme-mode="dark"] .pse-card__id-badge {
    background: #1f1f23 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .pse-empty {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #52525b !important;
}
/* Entity table */
[data-theme-mode="dark"] .pse-table thead th {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .pse-table tbody td {
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .pse-table tbody tr {
    background: #18181b !important;
}
[data-theme-mode="dark"] .pse-table tbody tr:hover {
    background: #1f1f23 !important;
}
/* Entity toolbar search/filters */
[data-theme-mode="dark"] .pse-search {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .pse-search::placeholder {
    color: #52525b !important;
}
[data-theme-mode="dark"] .pse-filter-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .pse-filter-pill:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .pse-filter-pill.pse-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .pse-sort-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .pse-sort-pill.pse-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .pse-view-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .pse-view-btn:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .pse-view-btn.pse-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
/* Module cards (psm-) */
[data-theme-mode="dark"] .psm-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .psm-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .psm-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-card__desc {
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-card__code-badge {
    background: #1f1f23 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-card__footer {
    border-top-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-empty {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #52525b !important;
}
[data-theme-mode="dark"] .psm-table thead th {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-table tbody td {
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .psm-table tbody tr {
    background: #18181b !important;
}
[data-theme-mode="dark"] .psm-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .psm-search {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psm-filter-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psm-filter-pill.psm-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-view-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psm-view-btn.psm-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psm-sort-select {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}

/* ── N. Membership page (mb- cards & table) ────────────────── */
[data-theme-mode="dark"] .mb-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .mb-card:hover {
    border-color: #3f3f46 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .mb-card__module {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .mb-card__entity {
    color: #71717a !important;
}
[data-theme-mode="dark"] .mb-card__detail {
    color: #52525b !important;
}
[data-theme-mode="dark"] .mb-card__footer {
    border-top-color: #27272a !important;
    color: #52525b !important;
}
[data-theme-mode="dark"] .mb-card__actions-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .mb-card__actions-btn:hover {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .mb-search {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .mb-search::placeholder {
    color: #52525b !important;
}
[data-theme-mode="dark"] .mb-filter-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .mb-filter-pill.mb-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .mb-view-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .mb-view-btn.mb-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .mb-sort-select {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .mb-add-panel {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .mb-add-panel__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .mb-add-panel__field label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .mb-add-panel__field select {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .mb-add-panel__cancel {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}

/* ── O. Charts — additional overrides ──────────────────────── */
/* Chart.js tooltips */
[data-theme-mode="dark"] .chartjs-tooltip {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
/* ApexCharts — zoom, menu, selection */
[data-theme-mode="dark"] .apexcharts-menu {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .apexcharts-menu-item:hover {
    background: #27272a !important;
}
[data-theme-mode="dark"] .apexcharts-zoom-icon svg,
[data-theme-mode="dark"] .apexcharts-zoomin-icon svg,
[data-theme-mode="dark"] .apexcharts-zoomout-icon svg,
[data-theme-mode="dark"] .apexcharts-reset-icon svg,
[data-theme-mode="dark"] .apexcharts-pan-icon svg,
[data-theme-mode="dark"] .apexcharts-selection-icon svg,
[data-theme-mode="dark"] .apexcharts-menu-icon svg,
[data-theme-mode="dark"] .apexcharts-toolbar svg {
    fill: #71717a !important;
}
[data-theme-mode="dark"] .apexcharts-datalabels text {
    fill: #d4d4d8 !important;
}
/* KPI analytics cards */
[data-theme-mode="dark"] .sa-kpi-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-kpi-card__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-kpi-card__label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-kpi-card__icon {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-controls-bar {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-time-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-time-pill.active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-chart-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-chart-card__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-chart-card__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-mini-stat {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-mini-stat__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-mini-stat__label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-perf-table thead th {
    background: #111113 !important;
    color: #71717a !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-perf-table tbody td {
    color: #d4d4d8 !important;
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-export-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-date-field input {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ── P. Directory toolbar (psd-) ───────────────────────────── */
[data-theme-mode="dark"] .psd-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .psd-search {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .psd-search::placeholder {
    color: #52525b !important;
}
[data-theme-mode="dark"] .psd-view-btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .psd-view-btn:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .psd-view-btn.psd-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psd-filter-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psd-filter-pill.psd-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .psd-sort-select {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}

/* ── Q. Pagination (Bootstrap + custom) ────────────────────── */
[data-theme-mode="dark"] .page-link {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .page-link:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .page-item.active .page-link {
    background: #27272a !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .page-item.disabled .page-link {
    background: #111113 !important;
    color: #3f3f46 !important;
}
/* PSB pagination */
[data-theme-mode="dark"] .psb-pagination {
    color: #52525b !important;
}
[data-theme-mode="dark"] .psb-pagination__btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psb-pagination__btn:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .psb-pagination__btn.psb-page-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}

/* ── R. Mobile header — dark mode override ─────────────────── */
@media (max-width: 991.98px) {
    [data-theme-mode="dark"] .app-header {
        background: #111113 !important;
        border-bottom-color: #1f1f23 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,.3) !important;
    }
    [data-theme-mode="dark"] .app-header .header-link,
    [data-theme-mode="dark"] .app-header .header-link-icon,
    [data-theme-mode="dark"] .app-header .sidebar-toggle-icon {
        color: #d4d4d8 !important;
    }
    [data-theme-mode="dark"] .app-header .sa-topbar-action-inner,
    [data-theme-mode="dark"] .app-header .sa-topbar-action-inner i {
        color: #d4d4d8 !important;
    }
    [data-theme-mode="dark"] .app-header .header-element.sa-topbar-action {
        border-inline-color: rgba(255,255,255,.08) !important;
    }
    /* Mobile sidebar pills for user profile */
    [data-theme-mode="dark"] .up-sidebar__nav-item {
        background: #1f1f23 !important;
        border-color: #27272a !important;
    }
    [data-theme-mode="dark"] .up-sidebar__nav-item:hover {
        background: #27272a !important;
    }
    [data-theme-mode="dark"] .up-sidebar__nav-item.active {
        background: #fafafa !important;
        color: #09090b !important;
        border-color: #fafafa !important;
    }
}

/* ── S. Customer card stats & actions ──────────────────────── */
[data-theme-mode="dark"] .sa-customer-card__header {
    background: transparent !important;
}
[data-theme-mode="dark"] .sa-customer-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-customer-card__stat-value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-customer-card__stat-label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-customer-card__action {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-customer-card__action:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-customer-card__logo {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}

/* ── T. Search/Filter bars (sa-*) ──────────────────────────── */
[data-theme-mode="dark"] .sa-search-filter-wrapper {
    background: transparent !important;
}
[data-theme-mode="dark"] .sa-search-filter-wrapper input {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-advanced-toggle__btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-filter-group__options .btn {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-filter-group__options .btn.active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-filter-group .form-select {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-filter-group__label {
    color: #71717a !important;
}

/* ── U. Table header row backgrounds (inline) ──────────────── */
[data-theme-mode="dark"] .sa-table-header-row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-table-title {
    color: #fafafa !important;
}

/* ── V. Remaining global utility leaks ─────────────────────── */
[data-theme-mode="dark"] [class*="bg-gray"] {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .text-default {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .text-dark {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .bg-white {
    background: #18181b !important;
}
[data-theme-mode="dark"] .bg-light {
    background: #18181b !important;
}
[data-theme-mode="dark"] .border-light {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .list-group-item {
    background: #18181b !important;
    border-color: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .list-group-item:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .list-group-item.active {
    background: #27272a !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
/* Btn outline secondary */
[data-theme-mode="dark"] .btn-outline-secondary {
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .btn-outline-secondary:hover {
    background: #1f1f23 !important;
    border-color: #3f3f46 !important;
    color: #fafafa !important;
}
/* Btn secondary (solid) */
[data-theme-mode="dark"] .btn-secondary {
    background: #27272a !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .btn-secondary:hover {
    background: #3f3f46 !important;
    color: #fafafa !important;
}

/* ── W. Calendar components (FullCalendar) ─────────────────── */
[data-theme-mode="dark"] .fc {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .fc .fc-toolbar-title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .fc .fc-button {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .fc .fc-button:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .fc .fc-button-active {
    background: #fafafa !important;
    color: #09090b !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .fc .fc-col-header-cell {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .fc .fc-daygrid-day {
    background: #18181b !important;
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .fc .fc-daygrid-day:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .fc .fc-daygrid-day-number {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .fc .fc-day-today {
    background: rgba(255,255,255,.03) !important;
}
[data-theme-mode="dark"] .fc .fc-scrollgrid {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .fc th,
[data-theme-mode="dark"] .fc td {
    border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .fc .fc-popover {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .fc .fc-popover-header {
    background: #111113 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .fc .fc-timegrid-slot {
    border-color: #1f1f23 !important;
}

/* ── X. Notification dropdown header actions ───────────────── */
[data-theme-mode="dark"] .sa-notification-header-actions a {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-notification-header-actions a:hover {
    color: #fafafa !important;
}

/* ── Y. Intacct/ModMed inline role badges ──────────────────── */
[data-theme-mode="dark"] .psb-role-badge--super_admin {
    background: rgba(70,60,55,.12) !important;
    color: #C5B9A7 !important;
}
[data-theme-mode="dark"] .psb-role-badge--admin {
    background: rgba(122,140,110,.12) !important;
    color: #4ade80 !important;
}
[data-theme-mode="dark"] .psb-role-badge--user {
    background: rgba(161,161,170,.1) !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psb-role-badge--customer {
    background: rgba(251,191,36,.12) !important;
    color: #fbbf24 !important;
}
[data-theme-mode="dark"] .psb-membership-chip {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psb-module-pill {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .psb-inline-role {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ── Z. Remaining platform settings toolbars ───────────────── */
[data-theme-mode="dark"] .psm-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .pse-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .mb-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .psi-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .psd-toolbar {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .psb-add-form__cancel {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}

/* ══════════════════════════════════════════════════════════════
   END FINAL NUCLEAR SWEEP
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   COMPONENT CSS DARK MODE SWEEP
   2026-04-25 — Exhaustive overrides for every component CSS file
   ══════════════════════════════════════════════════════════════ */

/* ── 1. entity-admin.css ─────────────────────────────────────── */
[data-theme-mode="dark"] .sa-am-stat {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-stat__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-am-stat__label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-am-hco {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-hco__header {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-hco__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-am-hco__icon {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-user-row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-user-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-am-user-avatar {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-child__header {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-child {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-child__name {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-am-child__icon {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-child__count {
    background: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-am-table thead th {
    background: #18181b !important;
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-am-table tbody tr {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-am-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-am-clinic-group__header {
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-chart-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-chart-card__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-chart-card__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-chart-card__badge {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-kpi-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-kpi-card__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-kpi-card__label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-kpi-card__bar {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-kpi-card__change.neutral {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-controls-bar {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-time-pills {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-time-pill {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-time-pill:hover {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-date-field input {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-perf-table thead th {
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-perf-table tbody td {
    color: #d4d4d8 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-perf-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-legend-value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-report-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-report-card.selected {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-report-card__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-report-card__desc {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-export-section {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-export-section__label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-export-format-option {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-export-format-option__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-export-preset {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-export-preset:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-export-filter-btn {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-export-filter-btn:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-export-col-group {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-export-col-group__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-export-col-group__name {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-export-col-check {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-export-preview {
    background: rgba(70,60,55,0.08) !important;
    border-color: #27272a !important;
    color: #D6CDB9 !important;
}

/* Entity admin dashboard */
[data-theme-mode="dark"] .sa-dash-panel {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-dash-panel__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-dash-panel__title {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-dash-panel__count {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-dash-table {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-dash-table thead th {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-dash-table tbody tr {
    border-bottom: none !important;
}
[data-theme-mode="dark"] .sa-dash-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-dash-table td.td-customer {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-dash-table td.td-date {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-dash-action-btn:hover {
    background: #27272a !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-quick-actions-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-quick-actions-card__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-quick-actions-card__header h6 {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-primary-action {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-primary-action:hover {
    background: #1f1f23 !important;
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-primary-action__text h5 {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-primary-action__text p {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-primary-action--locked {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-primary-action--locked .sa-primary-action__icon {
    background: #27272a !important;
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-primary-action--locked .sa-primary-action__text h5 {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-map-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-map-card__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-map-card__header h6 {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-map-states {
    background: #111113 !important;
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-map-state-badge {
    background: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-map-toggle .btn-sa-outline {
    background: #18181b !important;
    color: #a1a1aa !important;
    border-color: #27272a !important;
}

/* Customer-side branded buttons — dark mode.
   WHY: --sa-primary-color is globally clobbered to #fafafa in dark mode
   (see line ~10195) so text/borders that use the variable stay legible on
   dark backgrounds. But .btn-sa-primary uses --sa-primary-color as a
   BACKGROUND with white text on top — that combo renders an invisible
   white-on-white button. Hardcoding a dark-mode CTA palette here (mirrors
   the .btn-primary dark override at line ~17497) restores visibility
   without touching the clobbered variable. */
[data-theme-mode="dark"] .btn-sa-primary {
    background: #463C37 !important;
    border-color: #463C37 !important;
    color: #fff !important;
}
[data-theme-mode="dark"] .btn-sa-primary:hover,
[data-theme-mode="dark"] .btn-sa-primary:focus {
    background: #3D3833 !important;
    border-color: #3D3833 !important;
    color: #fff !important;
}
/* Outline variant — keep the generic version visible too. The
   .sa-map-toggle .btn-sa-outline rule above wins via higher specificity
   where it's used, so this only affects the bare .btn-sa-outline cases
   (KPI cards, customer dashboards). */
[data-theme-mode="dark"] .btn-sa-outline {
    background: transparent !important;
    border-color: #463C37 !important;
    color: #C5B9A7 !important;
}
[data-theme-mode="dark"] .btn-sa-outline:hover,
[data-theme-mode="dark"] .btn-sa-outline:focus {
    background: rgba(70,60,55,0.12) !important;
    color: #D6CDB9 !important;
}

/* Customer type selector */
[data-theme-mode="dark"] .sa-type-selector__option {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-type-selector__option:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-type-selector__option--active {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-type-selector__icon {
    background: #27272a !important;
    color: #71717a !important;
}

/* Customer Settings sidebar */
[data-theme-mode="dark"] .cs-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-sidebar__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-sidebar__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-sidebar__nav-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .cs-sidebar__nav-item:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-sidebar__nav-item.active {
    background: #18181b !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-stat-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-stat-card__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-stat-card__label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .cs-info-section {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-info-section__title {
    color: #d4d4d8 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-info-row__label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .cs-info-row__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-panel__title {
    color: #fafafa !important;
    border-bottom-color: #27272a !important;
}

/* Directory cards */
[data-theme-mode="dark"] .sa-dir-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-dir-card:hover {
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-dir-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-dir-card__avatar {
    border-color: #27272a !important;
}

/* Entity dashboard sidebar */
[data-theme-mode="dark"] .ed-container {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-sidebar__header {
    border-bottom-color: #27272a !important;
    background: #111113 !important;
}
[data-theme-mode="dark"] .ed-sidebar__logo {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .ed-sidebar__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-sidebar__nav-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ed-sidebar__nav-item:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-sidebar__nav-item.active {
    background: #18181b !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-panel__title {
    color: #fafafa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-hero {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-hero__logo {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-hero__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-hero__id {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ed-kpi-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-kpi-card__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-kpi-card__label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ed-setup {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-setup__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-setup__bar {
    background: #27272a !important;
}
[data-theme-mode="dark"] .ed-setup__item--done {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .ed-setup__item--todo {
    background: #18181b !important;
}
[data-theme-mode="dark"] .ed-info-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-info-card__head {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ed-info-line {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .ed-table-wrap {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-table thead th {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-table tbody td {
    color: #d4d4d8 !important;
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .ed-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .ed-input {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-input:read-only {
    background: #111113 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .ed-label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ed-brand-board {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-image-upload {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-image-upload__preview {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-timeline__dot {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-timeline::before {
    background: #27272a !important;
}
[data-theme-mode="dark"] .ed-timeline__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .ed-timeline__detail {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ed-btn--ghost {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .ed-section-actions {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-swatch__color {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .ed-color-input input[type="color"] {
    border-color: #27272a !important;
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .ed-role-badge {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}

/* Activity timeline */
[data-theme-mode="dark"] .sa-activity-timeline::before {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-activity-timeline__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-activity-timeline__desc {
    color: #a1a1aa !important;
}

/* Products tab */
[data-theme-mode="dark"] .cs-product-header {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-product-header__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-product-header__count {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .cs-product-table thead th {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-product-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .cs-product-table__name {
    color: #fafafa !important;
}

/* Inventory tab */
[data-theme-mode="dark"] .cs-inventory-kpi {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .cs-inventory-kpi__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .cs-inventory-table thead th {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}

/* ── 2. customers.css ────────────────────────────────────────── */
[data-theme-mode="dark"] .sa-hco-kpi {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-hco-kpi__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-hco-kpi__label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-hco-kpi__icon {
    color: #52525b !important;
}
[data-theme-mode="dark"] .sa-hco-kpi__change--flat {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-hco-location-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-hco-location-card__icon {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-hco-location-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-hco-location-stat__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-hco-chart-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-hco-chart-card__header {
    border-bottom-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-hco-product-row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-hco-product-rank {
    background: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-hco-product-bar-container {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-hco-product-value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-staff-list-item {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-staff-list-item__avatar {
    background: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-staff-list-item__name {
    color: #fafafa !important;
}

/* Order tab counts */
[data-theme-mode="dark"] .sa-order-tab-count--all {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}

/* Billing dropdown */
[data-theme-mode="dark"] #billingPanelContainer .sa-billing-dropdown__trigger {
    background-color: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-billing-dropdown__panel {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-billing-col + .sa-billing-col {
    border-left-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-billing-col__header {
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-billing-group {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-billing-group__header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-billing-group__name {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-billing-option:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-billing-option.selected {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-billing-option__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-group-summary {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-group-summary__title {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-group-summary__item {
    background: #18181b !important;
    color: #d4d4d8 !important;
}

/* Purchase agreement cards */
[data-theme-mode="dark"] .sa-ats__callout {
    background: #111113 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-ats__callout strong {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-ats__header h5 {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-ats__section-header {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-ats__card {
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-ats__card--purchase,
[data-theme-mode="dark"] .sa-ats__card--consignment {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-ats__card--purchase .sa-ats__card-icon,
[data-theme-mode="dark"] .sa-ats__card--consignment .sa-ats__card-icon {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-ats__card-title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-ats__card-desc {
    color: #a1a1aa !important;
}

/* Release notes */
[data-theme-mode="dark"] .rn-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .rn-sidebar-item:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .rn-sidebar-ver {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .rn-version-num {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .rn-version-badge {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .rn-version-section {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .rn-section {
    border-left-color: #27272a !important;
}
[data-theme-mode="dark"] .rn-list li {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .rn-list li::before {
    background: #52525b !important;
}

/* Return detail */
[data-theme-mode="dark"] .sa-rd-header {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-rd-header__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-rd-section {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-rd-section__head {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-rd-table thead th {
    background: #18181b !important;
    border-bottom-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-rd-table tbody td {
    color: #d4d4d8 !important;
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-rd-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-rd-table tfoot td {
    background: #111113 !important;
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-rd-info-col {
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-rd-info-col__head {
    color: #71717a !important;
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-rd-dl__row dt {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-rd-dl__row dd {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-rd-doc {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-rd-doc a {
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-rd-doc a:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-rd-actions {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-activity-log__item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-activity-log__icon {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-activity-log__title {
    color: #fafafa !important;
}

/* Stepper */
[data-theme-mode="dark"] .sa-stepper {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-stepper__track {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-stepper__dot {
    background: #18181b !important;
    border-color: #27272a !important;
}

/* Staff cards */
[data-theme-mode="dark"] .sa-staff-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-staff-card:hover {
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-staff-card__avatar {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-staff-card__initials {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-staff-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-staff-view-switcher {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-staff-view-switcher .sa-view-btn {
    color: #a1a1aa !important;
}

/* ── 3. document-library.css ─────────────────────────────────── */
[data-theme-mode="dark"] .sa-view-switcher {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-view-btn {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-view-btn.active {
    background: #18181b !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-file-grid-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-file-grid-card:hover {
    background: #1f1f23 !important;
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-file-grid-card .sa-fg-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-file-grid-card .sa-fg-ext {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-folder-grid-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-folder-grid-card .sa-fgc-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-column-view {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-column-pane {
    background: #18181b !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-column-pane-header {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-column-item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-column-item:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-column-item.active {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-column-item .sa-ci-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-folder-breadcrumb {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-folder-breadcrumb .sa-bc-current {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-folder-card {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-folder-card:nth-child(even) {
    background: #111113 !important;
}
[data-theme-mode="dark"] .sa-folder-card:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-folder-card .sa-fc-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-file-row {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-file-row:nth-child(even) {
    background: #111113 !important;
}
[data-theme-mode="dark"] .sa-file-row:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-file-row .sa-fr-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-sort-btn {
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-upload-file-list {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-upload-file-item {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-upload-file-item .sa-ufi-name {
    color: #d4d4d8 !important;
}

/* ── 4. order-form.css ───────────────────────────────────────── */
[data-theme-mode="dark"] .sa-product-category-header {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-order-type-header h5 {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-order-type-content {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-order-type-card.active .sa-order-type-content {
    background: #18181b !important;
}
[data-theme-mode="dark"] .sa-order-type-icon {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-order-type-title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-order-type-desc {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-order-type-check {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-order-type-card--locked {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-order-type-card--locked__icon {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-form-section {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-section-title {
    color: #d4d4d8 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-section-title i {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-signature-content {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-signature-card.active .sa-signature-content {
    background: #18181b !important;
}
[data-theme-mode="dark"] .sa-signature-label {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-signature-desc {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-liability-section {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-fee-acceptance {
    background: #111113 !important;
    border-color: #27272a !important;
}

/* ── 5. patients.css ─────────────────────────────────────────── */
[data-theme-mode="dark"] .pp-stat-card {
    border-color: #27272a !important;
    background: #18181b !important;
}
[data-theme-mode="dark"] .pp-info-card {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-info-card .card-header {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-headshot {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-upload-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-upload-card__head {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-upload-card__head h6 {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .pp-docs-upload-card__foot {
    background: #1f1f23 !important;
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-dropzone {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-file {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-file__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .pp-docs-progress {
    background: #27272a !important;
}
[data-theme-mode="dark"] .pp-docs-empty__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-bulk-stepper {
    background: #18181b !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-bulk-step-num {
    border-color: #27272a !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-bulk-step-label {
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-bulk-step-line {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-bulk-dropzone {
    background: #111113 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .patient-dropdown-list {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .patient-dropdown-item {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .patient-dropdown-item-enabled:hover {
    background: #1f1f23 !important;
}

/* ── 6. table.css ────────────────────────────────────────────── */
[data-theme-mode="dark"] table tbody tr:nth-child(even),
[data-theme-mode="dark"] table.dataTable tbody tr:nth-child(even),
[data-theme-mode="dark"] table.dataTable tbody tr.even,
[data-theme-mode="dark"] .table-striped tbody tr:nth-child(even) {
    background-color: #111113 !important;
}
[data-theme-mode="dark"] table tbody tr:nth-child(odd),
[data-theme-mode="dark"] table.dataTable tbody tr:nth-child(odd),
[data-theme-mode="dark"] table.dataTable tbody tr.odd,
[data-theme-mode="dark"] .table-striped tbody tr:nth-child(odd) {
    background-color: #18181b !important;
}
[data-theme-mode="dark"] table tbody tr:hover,
[data-theme-mode="dark"] table.dataTable tbody tr:hover,
[data-theme-mode="dark"] table.dataTable tbody tr.odd:hover,
[data-theme-mode="dark"] table.dataTable tbody tr.even:hover,
[data-theme-mode="dark"] .table tbody tr:hover {
    background-color: #1f1f23 !important;
}
[data-theme-mode="dark"] table tbody tr:hover td,
[data-theme-mode="dark"] table.dataTable tbody tr:hover td,
[data-theme-mode="dark"] table.dataTable tbody tr.odd:hover td,
[data-theme-mode="dark"] table.dataTable tbody tr.even:hover td {
    background-color: #1f1f23 !important;
}
[data-theme-mode="dark"] table.sa-table td,
[data-theme-mode="dark"] table.dataTable.sa-table td {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .dt-scroll {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] table .dropdown-menu {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] table .dropdown .btn-light {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] table .dropdown-item {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] table .dropdown-item:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-table-header-row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-table-title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-advanced-toggle__btn {
    background: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-advanced-toggle__btn.active {
    background: #52525b !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-filter-group__options {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-filter-group__options .btn {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-filter-group__options .btn.active {
    background: #18181b !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-filter-group .form-select {
    background-color: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-sort-dir-btn {
    border-color: #27272a !important;
    background: #18181b !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-filter-row .btn {
    background: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .dt-search input {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .dt-search input:focus {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .dt-search label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .dt-footer-row {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .dt-length label {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .dt-length select {
    background-color: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .dt-info {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-sticky-col {
    background-color: #18181b !important;
}
[data-theme-mode="dark"] tr:nth-child(even) .sa-sticky-col {
    background-color: #111113 !important;
}
[data-theme-mode="dark"] tr:hover .sa-sticky-col {
    background-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-col-tip {
    background: #1f1f23 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-col-legend-trigger {
    background: #1f1f23 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .sa-underline-tabs {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-underline-tabs .nav-link {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-lot-timeline::before {
    background: #27272a !important;
}
[data-theme-mode="dark"] .sa-lot-timeline__icon {
    background: #18181b !important;
}

/* ── 7. modal.css ────────────────────────────────────────────── */
[data-theme-mode="dark"] .sa-form-section {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-form-section-title {
    color: #d4d4d8 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-modal-section {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-modal-section__title {
    color: #d4d4d8 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-modal-section--collapsible {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-modal-section--collapsible .sa-modal-section__header:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-product-lot-table {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-product-lot-table thead th {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-product-lot-table tbody td {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-product-lot-table tbody tr:hover {
    background: #1f1f23 !important;
}

/* ── 8. charts.css ───────────────────────────────────────────── */
[data-theme-mode="dark"] .sa-recipient-option {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-recipient-option:hover {
    background-color: #1f1f23 !important;
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-recipient-option:has(input:checked) {
    background-color: rgba(70,60,55,0.08) !important;
    border-color: #463C37 !important;
}

/* ── 9. atlas-lo.css ─────────────────────────────────────────── */
/* AtlasLO uses its own --al-* variables and #FCFAF5 backgrounds.
   Dark overrides for its key surfaces. */
[data-theme-mode="dark"] .al-page {
    background: #09090b !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .al-hero {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-card--quiet {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-card--inset {
    background: #111113 !important;
}
[data-theme-mode="dark"] .al-card__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-card__head {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-stat-grid {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-stat {
    border-right-color: #27272a !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-stat__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-table-wrap {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-table thead th {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
    border-bottom-color: #fafafa !important;
}
[data-theme-mode="dark"] .al-table tbody td {
    color: #d4d4d8 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .al-row-list {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-row:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .al-row__title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-tab-bar {
    border-bottom-color: #fafafa !important;
}
[data-theme-mode="dark"] .al-tab__count {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-input,
[data-theme-mode="dark"] .al-textarea,
[data-theme-mode="dark"] .al-select {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-btn {
    background: #18181b !important;
    color: #fafafa !important;
    border-color: #fafafa !important;
}
[data-theme-mode="dark"] .al-btn:hover {
    background: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .al-btn--ghost {
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .al-pill {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .al-empty {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-h3 {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-note {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-note__author {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-note__body {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .al-doc-row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-doc-row:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .al-doc-row__icon {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-doc-row__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-party {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-party__avatar {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-party__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-search__row {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-search__input {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-search__menu {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-search__item {
    border-bottom-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-search__item:hover,
[data-theme-mode="dark"] .al-search__item.is-highlighted {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .al-filter-chips {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-chip {
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .al-roster-mode {
    border-color: #27272a !important;
    background: #18181b !important;
}
[data-theme-mode="dark"] .al-roster-mode__btn {
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .al-roster-mode__btn.is-active {
    background: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .al-contact-card {
    background: #18181b !important;
}
[data-theme-mode="dark"] .al-contact-card__head {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-contact-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-contact-card__line {
    border-bottom-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .al-cross-row {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .al-cross-row__head {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-cross-row__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-divider {
    background: #27272a !important;
}
[data-theme-mode="dark"] .al-divider--ornate::before {
    background: #09090b !important;
}
[data-theme-mode="dark"] .al-divider--ornate::after {
    background: #27272a !important;
}
[data-theme-mode="dark"] .al-form__row {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-form__actions {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .al-roster-actions {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-roster-caption {
    border-top-color: #27272a !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-brand {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .al-brand__mark {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .al-hero__meta-row {
    border-top-color: #27272a !important;
}

/* ── 10. entity-910.css ──────────────────────────────────────── */
[data-theme-mode="dark"] .bsfa-cal-toolbar {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-title {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-cal-nav-btn {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .bsfa-cal-pills {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-cal-pill.active {
    background: #18181b !important;
}
[data-theme-mode="dark"] .bsfa-cal-filter-bar {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-stat {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-stat__value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-cal-board {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-grid {
    background: #18181b !important;
}
[data-theme-mode="dark"] .bsfa-cal-day-head {
    background: #18181b !important;
    border-bottom-color: #27272a !important;
    border-left-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-cal-day-head__date {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-cal-time-col-head {
    background: #18181b !important;
    border-bottom-color: #27272a !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-time-cell {
    background: #18181b !important;
    border-right-color: #27272a !important;
    border-top-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-cal-slot {
    border-left-color: #1f1f23 !important;
    border-top-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-cal-prov-head {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .bsfa-cal-month {
    background: #27272a !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-month__dow {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .bsfa-cal-month__cell {
    background: #18181b !important;
}
[data-theme-mode="dark"] .bsfa-cal-month__cell:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-cal-month__cell--other {
    background: #111113 !important;
}
[data-theme-mode="dark"] .bsfa-cal-month__date {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-cal-side-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-side-row {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-modal {
    background: #18181b !important;
}
[data-theme-mode="dark"] .bsfa-cal-modal__body {
    background: #18181b !important;
}
[data-theme-mode="dark"] .bsfa-cal-modal__row {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-cal-modal__row strong {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-cal-modal__footer {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-cal-modal__btn--ghost {
    background: #18181b !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* BSFA Patient profile modal */
[data-theme-mode="dark"] #bsfaPatientProfileModal .modal-body {
    background: #111113 !important;
}
[data-theme-mode="dark"] .bsfa-pp-sidebar {
    background: #18181b !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-nav-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .bsfa-pp-nav-item:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-pp-headshot-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-headshot-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-pp-headshot-contact {
    border-top-color: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .bsfa-pp-stat-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-stat-value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-pp-info-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-info-body {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-pp-kv {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-pp-kv strong {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-pp-table {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-table thead th {
    background: #1f1f23 !important;
    border-bottom-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .bsfa-pp-table tbody td {
    border-top-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-pp-table tbody tr:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .bsfa-pp-icd {
    background: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .bsfa-pp-filter-pill {
    background: #1f1f23 !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .bsfa-pp-filter-pill:hover {
    background: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-aging-bar {
    background: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-pp-appt-card {
    background: #18181b !important;
    border-color: #27272a !important;
}

/* BSFA Doctor profile modal */
[data-theme-mode="dark"] #bsfaDoctorProfileModal .modal-body {
    background: #111113 !important;
}
[data-theme-mode="dark"] #bsfaDoctorProfileModal .modal-footer {
    background: #18181b !important;
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-dp-sidebar {
    background: #18181b !important;
    border-right-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-dp-nav-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .bsfa-dp-nav-item:hover {
    background: #1f1f23 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-dp-hero {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-dp-hero-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-dp-kpi {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-dp-kpi-value {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .bsfa-dp-cmp {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .bsfa-dp-cmp-doctor {
    color: #fafafa !important;
}

/* Supply ordering */
[data-theme-mode="dark"] .so-product-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .so-product-img {
    background: #111113 !important;
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .so-product-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .so-product-price {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .so-product-footer {
    border-top-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .so-search-input {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .so-cart-empty-icon {
    background: #1f1f23 !important;
}

/* ── 11. entity-900.css ──────────────────────────────────────── */
[data-theme-mode="dark"] .sa-portfolio-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-portfolio-card:hover {
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-portfolio-card__logo {
    border-color: #27272a !important;
    background: #18181b !important;
}
[data-theme-mode="dark"] .sa-portfolio-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-service-mini {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-service-mini__title {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-ent-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-ent-card:hover {
    border-color: #52525b !important;
}
[data-theme-mode="dark"] .sa-ent-card__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-ent-card__logo {
    border-color: #27272a !important;
    background: #18181b !important;
}
[data-theme-mode="dark"] .sa-ent-card__metric {
    border-color: #27272a !important;
    background: #111113 !important;
}
[data-theme-mode="dark"] .sa-ent-card__metric-val {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-ent-card__id-badge {
    background: #27272a !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-ent-card__footer {
    background: #111113 !important;
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-ent-card__link {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* ── 12. toasts.css ──────────────────────────────────────────── */
/* Already has [data-theme-mode="dark"] rules — no additions needed */

/* ── 13. autocomplete.css ────────────────────────────────────── */
[data-theme-mode="dark"] .pac-container {
    background-color: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .pac-item {
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .pac-item:hover,
[data-theme-mode="dark"] .pac-item-selected {
    background-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .pac-item-query {
    color: #fafafa !important;
}

/* ── 14. authentication.css ──────────────────────────────────── */
/* Auth split card & form */
[data-theme-mode="dark"] .auth-split-card {
    background: #111113 !important;
}
[data-theme-mode="dark"] .auth-split-form {
    background: #111113 !important;
}
[data-theme-mode="dark"] .auth-form-heading h1,
[data-theme-mode="dark"] .auth-form-heading h2 {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .auth-form-heading p {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .auth-user-identity {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .auth-user-identity__name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .auth-user-identity__email {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .auth-form .auth-field .form-control {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .auth-form .auth-field .form-control:focus {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .auth-form .auth-field label {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .auth-alert.auth-alert-info {
    background: #1f1f23 !important;
    border-color: #27272a !important;
    color: #d4d4d8 !important;
}

/* Launcher */
[data-theme-mode="dark"] .launcher-wrapper {
    background: #09090b !important;
}
[data-theme-mode="dark"] .launcher-topbar {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .launcher-card {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .launcher-card:hover {
    border-color: #463C37 !important;
}
[data-theme-mode="dark"] .launcher-card .launcher-card-name {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .launcher-card .launcher-card-icon {
    background: rgba(70,60,55,0.1) !important;
}
[data-theme-mode="dark"] .launcher-greeting h1 {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .launcher-user-menu .launcher-user-btn {
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .launcher-user-menu .launcher-user-btn span {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .launcher-user-menu .launcher-dropdown {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .launcher-user-menu .launcher-dropdown a {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .launcher-user-menu .launcher-dropdown a:hover {
    background: #1f1f23 !important;
}

/* Unauthorized card (auth page version) */
[data-theme-mode="dark"] .auth-unauth-card__icon {
    background: #1f1f23 !important;
    color: #71717a !important;
}
[data-theme-mode="dark"] .auth-unauthorized .auth-unauth-user {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .auth-unauthorized .auth-module-chip {
    background: #1f1f23 !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .auth-unauthorized .auth-module-chip:hover {
    background: #27272a !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .auth-password-checklist .checklist-row .checklist-icon {
    color: #52525b !important;
}
[data-theme-mode="dark"] .auth-password-success {
    background: rgba(122,140,110,0.08) !important;
    border-color: #27272a !important;
}

/* ══════════════════════════════════════════════════════════════
   Module Settings Page (sa-ms-*)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .sa-ms-content {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-ms-topbar {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-ms-title { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-ms-close { color: #71717a !important; }
[data-theme-mode="dark"] .sa-ms-close:hover { background: #1f1f23 !important; color: #fafafa !important; }
/* Search */
[data-theme-mode="dark"] .sa-ms-search {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-ms-search:focus { border-color: #3f3f46 !important; background: #18181b !important; }
[data-theme-mode="dark"] .sa-ms-search::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .sa-ms-search-icon { color: #52525b !important; }
[data-theme-mode="dark"] .sa-ms-search-clear { color: #52525b !important; }
[data-theme-mode="dark"] .sa-ms-search-clear:hover { color: #fafafa !important; }
/* Filter pills */
[data-theme-mode="dark"] .sa-ms-filters {
    border-bottom-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-ms-filter-pill {
    background: transparent !important;
    border-color: #27272a !important;
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-ms-filter-pill:hover {
    background: rgba(255,255,255,0.04) !important;
    border-color: #3f3f46 !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .sa-ms-filter-pill.is-active {
    background: #fafafa !important;
    border-color: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .sa-ms-filter-pill-count { color: #52525b !important; }
[data-theme-mode="dark"] .sa-ms-filter-pill.is-active .sa-ms-filter-pill-count { color: rgba(9,9,11,0.6) !important; }
/* Module rows */
[data-theme-mode="dark"] .sa-ms-row {
    background: #18181b !important; border-color: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-ms-row:hover {
    background: #1f1f23 !important;
}
[data-theme-mode="dark"] .sa-ms-row.is-active {
    background: color-mix(in srgb, var(--ms-accent) 14%, #18181b) !important;
    box-shadow: inset 3px 0 0 var(--ms-accent) !important;
}
[data-theme-mode="dark"] .sa-ms-row-icon {
    background: #1f1f23 !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .sa-ms-row-icon--logo { background: #1f1f23 !important; }
[data-theme-mode="dark"] .sa-ms-row-title { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-ms-row-tree { background: #3f3f46 !important; }
[data-theme-mode="dark"] .sa-ms-row--child::before { background: #3f3f46 !important; }
/* Modal container */
[data-theme-mode="dark"] .sa-ms-modal .modal-content {
    background: #18181b !important; border-color: #27272a !important;
}
/* Chip in header — dark mode keeps the module-accent FRAME intact (do not
   override border-color). Chip body stays transparent; the header behind
   it shows through and the frame carries the brand signal. */
[data-theme-mode="dark"] .sa-ms-chip {
    background: transparent !important;
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .sa-ms-chip:hover,
[data-theme-mode="dark"] .sa-ms-chip:focus-visible {
    background: color-mix(in srgb, var(--ms-accent) 18%, transparent) !important;
    box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--ms-accent) 80%, transparent) !important;
}
[data-theme-mode="dark"] .sa-ms-chip-name { color: #fafafa !important; }
[data-theme-mode="dark"] .sa-ms-chip-eyebrow { color: rgba(255,255,255,0.6) !important; }
[data-theme-mode="dark"] .sa-ms-chip-caret { color: rgba(255,255,255,0.55) !important; }
[data-theme-mode="dark"] .sa-ms-chip:hover .sa-ms-chip-caret { color: #fff !important; }

/* ══════════════════════════════════════════════════════════════
   ALL Bootstrap Buttons — Global Dark Mode Fix
   ══════════════════════════════════════════════════════════════ */

/* Primary */
[data-theme-mode="dark"] .btn-primary {
    background: #463C37 !important; border-color: #463C37 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-primary:hover {
    background: #3D3833 !important; border-color: #3D3833 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-primary:active,
[data-theme-mode="dark"] .btn-primary:focus {
    background: #282320 !important; border-color: #282320 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-outline-primary {
    border-color: #463C37 !important; color: #C5B9A7 !important; background: transparent !important;
}
[data-theme-mode="dark"] .btn-outline-primary:hover {
    background: rgba(70,60,55,.12) !important; color: #D6CDB9 !important;
}

/* Secondary */
[data-theme-mode="dark"] .btn-secondary {
    background: #27272a !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .btn-secondary:hover {
    background: #3f3f46 !important; border-color: #3f3f46 !important; color: #fafafa !important;
}
[data-theme-mode="dark"] .btn-outline-secondary {
    background: transparent !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .btn-outline-secondary:hover {
    background: #1f1f23 !important; color: #fafafa !important;
}

/* Success */
[data-theme-mode="dark"] .btn-success {
    background: #7A8C6E !important; border-color: #7A8C6E !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-success:hover {
    background: #5F7058 !important; border-color: #5F7058 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-outline-success {
    border-color: #7A8C6E !important; color: #4ade80 !important; background: transparent !important;
}
[data-theme-mode="dark"] .btn-outline-success:hover {
    background: rgba(122,140,110,.12) !important; color: #B5C5A8 !important;
}

/* Danger */
[data-theme-mode="dark"] .btn-danger {
    background: #ef4444 !important; border-color: #ef4444 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-danger:hover {
    background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-outline-danger {
    border-color: rgba(239,68,68,.4) !important; color: #f87171 !important; background: transparent !important;
}
[data-theme-mode="dark"] .btn-outline-danger:hover {
    background: rgba(239,68,68,.12) !important; color: #fca5a5 !important;
}

/* Warning */
[data-theme-mode="dark"] .btn-warning {
    background: #C68A3A !important; border-color: #C68A3A !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-warning:hover {
    background: #A87825 !important; border-color: #A87825 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-outline-warning {
    border-color: rgba(245,158,11,.4) !important; color: #fbbf24 !important; background: transparent !important;
}
[data-theme-mode="dark"] .btn-outline-warning:hover {
    background: rgba(245,158,11,.12) !important; color: #fde68a !important;
}

/* Info */
[data-theme-mode="dark"] .btn-info {
    background: #7A8C6E !important; border-color: #7A8C6E !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-info:hover {
    background: #5F7058 !important; border-color: #5F7058 !important; color: #fff !important;
}
[data-theme-mode="dark"] .btn-outline-info {
    border-color: rgba(122,140,110,.4) !important; color: #7A8C6E !important; background: transparent !important;
}
[data-theme-mode="dark"] .btn-outline-info:hover {
    background: rgba(122,140,110,.12) !important; color: #B5C5A8 !important;
}

/* Light */
[data-theme-mode="dark"] .btn-light {
    background: #1f1f23 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .btn-light:hover {
    background: #27272a !important; border-color: #3f3f46 !important; color: #fafafa !important;
}

/* Dark */
[data-theme-mode="dark"] .btn-dark {
    background: #fafafa !important; border-color: #fafafa !important; color: #09090b !important;
}
[data-theme-mode="dark"] .btn-dark:hover {
    background: #d4d4d8 !important; border-color: #d4d4d8 !important; color: #09090b !important;
}

/* Link */
[data-theme-mode="dark"] .btn-link {
    color: #C5B9A7 !important;
}
[data-theme-mode="dark"] .btn-link:hover {
    color: #D6CDB9 !important;
}

/* Close button in modals/alerts */
[data-theme-mode="dark"] .btn-close {
    filter: invert(1) !important; opacity: .6 !important;
}
[data-theme-mode="dark"] .btn-close:hover { opacity: 1 !important; }

/* Disabled state — all variants */
[data-theme-mode="dark"] .btn:disabled,
[data-theme-mode="dark"] .btn.disabled {
    opacity: .35 !important;
}

/* ── Sign-up URL box ───────────────────────────────────────────── */
[data-theme-mode="dark"] .sa-copy-url-box {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .sa-copy-url-text {
    color: #d4d4d8 !important;
    background: transparent !important;
}
[data-theme-mode="dark"] .sa-copy-url-box .btn {
    background: #27272a !important;
    color: #d4d4d8 !important;
    border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .sa-copy-url-box .btn:hover {
    background: #3f3f46 !important;
    color: #fafafa !important;
}

/* ══════════════════════════════════════════════════════════════
   Help Center — Dark Mode (hc-* in atlasmps-custom.css)
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .hc-card-container {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .hc-card {
    background: #1f1f23 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .hc-card:hover {
    border-color: #3f3f46 !important; box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .hc-card-icon { background: #27272a !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .hc-card-title { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-card-text { color: #a1a1aa !important; }
[data-theme-mode="dark"] .hc-search-wrapper { background: #111113 !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .hc-search-input {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .hc-search-input::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .hc-search-input:focus { border-color: #3f3f46 !important; background: #18181b !important; }
[data-theme-mode="dark"] .hc-search-icon { color: #52525b !important; }
[data-theme-mode="dark"] .hc-search-clear { color: #52525b !important; }
[data-theme-mode="dark"] .hc-tabs { background: #111113 !important; border-color: #27272a !important; }
[data-theme-mode="dark"] .hc-tab { color: #71717a !important; }
[data-theme-mode="dark"] .hc-tab:hover { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .hc-tab.active { color: #fafafa !important; }
/* Form */
[data-theme-mode="dark"] .hc-form { background: #18181b !important; }
[data-theme-mode="dark"] .hc-form-label { color: #a1a1aa !important; }
[data-theme-mode="dark"] .hc-form-input,
[data-theme-mode="dark"] .hc-form-textarea {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .hc-form-input:focus,
[data-theme-mode="dark"] .hc-form-textarea:focus { border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .hc-form-input::placeholder,
[data-theme-mode="dark"] .hc-form-textarea::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .hc-form-hint { color: #52525b !important; }
/* Category buttons */
[data-theme-mode="dark"] .hc-cat-btn {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .hc-cat-btn:hover { background: #27272a !important; border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .hc-cat-btn.active {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}
[data-theme-mode="dark"] .hc-cat-btn i { color: #71717a !important; }
[data-theme-mode="dark"] .hc-cat-btn.active i { color: #09090b !important; }
[data-theme-mode="dark"] .hc-cat-btn span { color: inherit !important; }

/* Wiki (Guides + FAQ tab content). The Help Center renders the Guides
   and FAQ panes inside .wiki-container / .wiki-sidebar / .wiki-content.
   Without these overrides the entire content block stays bright white in
   dark mode (.wiki-container has a hardcoded `background: #fff` at the
   base). Mirrors the rest of the dark theme: #18181b card, #1f1f23 raised,
   #27272a borders, #fafafa primary text, #71717a muted. */
[data-theme-mode="dark"] .wiki-container {
    background: #18181b !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-sidebar {
    background: #111113 !important;
    border-right-color: #27272a !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-search-box {
    background: #111113 !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-nav-category {
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-nav-header {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .wiki-nav-header:hover {
    background: rgba(255,255,255,0.04) !important;
}
[data-theme-mode="dark"] .wiki-nav-header i,
[data-theme-mode="dark"] .wiki-nav-header .wiki-chevron {
    color: #71717a !important;
}
[data-theme-mode="dark"] .wiki-nav-item {
    color: #a1a1aa !important;
}
[data-theme-mode="dark"] .wiki-nav-item:hover {
    background: rgba(255,255,255,0.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .wiki-nav-item.active {
    background: #1f1f23 !important;
    color: #fafafa !important;
    border-left-color: #fafafa !important;
}
[data-theme-mode="dark"] .wiki-section-title {
    color: #fafafa !important;
    border-bottom-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-section-category {
    color: #71717a !important;
}
[data-theme-mode="dark"] .wiki-section-content {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .wiki-steps {
    background: #1f1f23 !important;
    border-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-steps-title {
    color: #71717a !important;
}
[data-theme-mode="dark"] .wiki-step {
    color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .wiki-step-num {
    background: #fafafa !important;
    color: #09090b !important;
}
[data-theme-mode="dark"] .wiki-nav-footer {
    background: #111113 !important;
    border-top-color: #27272a !important;
}
[data-theme-mode="dark"] .wiki-nav-footer-text {
    color: #52525b !important;
}
/* Priority radios */
[data-theme-mode="dark"] .hc-priority-option {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .hc-priority-option:hover { border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .hc-priority-option.active { border-color: #fafafa !important; color: #fafafa !important; }
/* FAQ accordion */
[data-theme-mode="dark"] .hc-faq-item { border-color: #1f1f23 !important; }
[data-theme-mode="dark"] .hc-faq-question { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .hc-faq-question:hover { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-faq-answer { color: #a1a1aa !important; }
/* Wiki search */
[data-theme-mode="dark"] .wiki-search-box .hc-search-wrapper { background: #111113 !important; }
[data-theme-mode="dark"] .wiki-search-box .hc-search-input { background: #111113 !important; color: #d4d4d8 !important; }

/* ══════════════════════════════════════════════════════════════
   Module Settings Page (ms-* inline styles in PHP)
   ══════════════════════════════════════════════════════════════ */
/* Module tab bar */
[data-theme-mode="dark"] .ms-card-layout { background: #09090b !important; }
[data-theme-mode="dark"] .ms-sidebar-nav { background: #111113 !important; border-right-color: #27272a !important; }
[data-theme-mode="dark"] .ms-sidebar-nav__header { color: #52525b !important; }
[data-theme-mode="dark"] .ms-main-content { background: #09090b !important; }
[data-theme-mode="dark"] .ms-mod { border-bottom-color: #1f1f23 !important; }
[data-theme-mode="dark"] .ms-mod:hover { background: rgba(255,255,255,.04) !important; }
[data-theme-mode="dark"] .ms-mod--active { background: #18181b !important; }
[data-theme-mode="dark"] .ms-mod__icon { background: #27272a !important; }
[data-theme-mode="dark"] .ms-mod--active .ms-mod__icon { background: rgba(255,255,255,.08) !important; }
[data-theme-mode="dark"] .ms-mod__name { color: #d4d4d8 !important; }
[data-theme-mode="dark"] .ms-mod--active .ms-mod__name { color: #fafafa !important; }
[data-theme-mode="dark"] .ms-mod__sub { color: #52525b !important; }
/* Live card preview */
[data-theme-mode="dark"] .ms-live-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .ms-live-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.5) !important; }
[data-theme-mode="dark"] .ms-live-card__name { color: #fafafa !important; }
[data-theme-mode="dark"] .ms-live-card__desc { color: #71717a !important; }
[data-theme-mode="dark"] .ms-live-card__tag { background: rgba(70,60,55,.12) !important; color: #C5B9A7 !important; }
[data-theme-mode="dark"] .ms-live-card__entity { color: #52525b !important; }
[data-theme-mode="dark"] .ms-live-card__launch {
    border-top-color: #27272a !important; color: #d4d4d8 !important;
}
/* Sidebar preview already dark */
/* Preview label */
[data-theme-mode="dark"] .ms-preview-label { color: #52525b !important; }
/* Buttons */
[data-theme-mode="dark"] .ms-btn-reset {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .ms-btn-reset:hover { background: #27272a !important; color: #fafafa !important; }
/* Form column */
[data-theme-mode="dark"] .ms-form-col {
    background: #18181b !important; border-color: #27272a !important;
}
/* Tabs */
[data-theme-mode="dark"] .ms-tabs { border-bottom-color: #27272a !important; }
[data-theme-mode="dark"] .ms-tab { color: #71717a !important; }
[data-theme-mode="dark"] .ms-tab:hover { color: #d4d4d8 !important; background: rgba(255,255,255,.03) !important; }
[data-theme-mode="dark"] .ms-tab--active { color: #fafafa !important; border-bottom-color: #fafafa !important; }
[data-theme-mode="dark"] .ms-tab-body { background: #18181b !important; }
/* Form fields */
[data-theme-mode="dark"] .ms-field__label { color: #71717a !important; }
[data-theme-mode="dark"] .ms-field__hint { color: #52525b !important; }
[data-theme-mode="dark"] .ms-color-swatch { border-color: #27272a !important; }
[data-theme-mode="dark"] .ms-color-swatch:hover { border-color: #3f3f46 !important; }
[data-theme-mode="dark"] .ms-icon-preview {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
/* Upload zones */
[data-theme-mode="dark"] .ms-upload-zone {
    background: #111113 !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .ms-upload-zone:hover {
    background: #18181b !important; border-color: #3f3f46 !important;
}
[data-theme-mode="dark"] .ms-upload-zone.dragover {
    background: rgba(70,60,55,.06) !important; border-color: #463C37 !important;
}
[data-theme-mode="dark"] .ms-upload-placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .ms-upload-placeholder i { color: #3f3f46 !important; }
[data-theme-mode="dark"] .ms-upload-remove { background: rgba(239,68,68,.15) !important; color: #f87171 !important; }

/* ══════════════════════════════════════════════════════════════
   Sidebar Hover/Active — Reinforced with !important
   Beats the light-mode .app-sidebar rules that use !important
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover,
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item:hover {
    background: rgba(255,255,255,.04) !important;
    background-color: rgba(255,255,255,.04) !important;
    color: #fafafa !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover .side-menu__label,
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover .side-menu__icon,
[data-theme-mode="dark"] .app-sidebar .side-menu__item:hover .side-menu__angle,
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item:hover .side-menu__label {
    color: #fafafa !important;
}
[data-theme-mode="dark"] .app-sidebar .side-menu__item.active,
[data-theme-mode="dark"] .app-sidebar .slide-menu .side-menu__item.active {
    background: rgba(255,255,255,.06) !important;
    background-color: rgba(255,255,255,.06) !important;
}

/* ══════════════════════════════════════════════════════════════
   Help Center Page
   ══════════════════════════════════════════════════════════════ */
[data-theme-mode="dark"] .hc-search input {
    background: #111113 !important; border-color: #27272a !important; color: #d4d4d8 !important;
}
[data-theme-mode="dark"] .hc-search input::placeholder { color: #52525b !important; }
[data-theme-mode="dark"] .hc-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .hc-card:hover {
    border-color: #3f3f46 !important; box-shadow: 0 4px 16px rgba(0,0,0,.4) !important;
}
[data-theme-mode="dark"] .hc-card-title { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-card-desc { color: #71717a !important; }
[data-theme-mode="dark"] .hc-card-icon { background: #1f1f23 !important; }
[data-theme-mode="dark"] .hc-step {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .hc-step-title { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-step-desc { color: #a1a1aa !important; }
[data-theme-mode="dark"] .hc-step-number { background: #1f1f23 !important; color: #a1a1aa !important; }
[data-theme-mode="dark"] .hc-faq-question { color: #d4d4d8 !important; border-color: #1f1f23 !important; }
[data-theme-mode="dark"] .hc-faq-question:hover { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-faq-answer { color: #a1a1aa !important; }
[data-theme-mode="dark"] .hc-video-card {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .hc-video-title { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-video-desc { color: #71717a !important; }
[data-theme-mode="dark"] .hc-category-btn {
    background: #1f1f23 !important; border-color: #27272a !important; color: #a1a1aa !important;
}
[data-theme-mode="dark"] .hc-category-btn:hover { background: #27272a !important; color: #fafafa !important; }
[data-theme-mode="dark"] .hc-category-btn.active {
    background: #fafafa !important; color: #09090b !important; border-color: #fafafa !important;
}
[data-theme-mode="dark"] .hc-section-title { color: #fafafa !important; }
[data-theme-mode="dark"] .hc-section-desc { color: #71717a !important; }
/* Help center ticket form */
[data-theme-mode="dark"] .hc-ticket-form {
    background: #18181b !important; border-color: #27272a !important;
}
[data-theme-mode="dark"] .hc-ticket-form label { color: #a1a1aa !important; }

/* ══════════════════════════════════════════════════════════════
   END COMPONENT CSS DARK MODE SWEEP
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   LINEICONS HELPERS (spin animation + sizing)
   ══════════════════════════════════════════════════════════════ */
.lni-spin { animation: lni-spin 1s linear infinite; }
@keyframes lni-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.lni-2x { font-size: 2em; }
.lni-3x { font-size: 3em; }
.lni-lg { font-size: 1.33em; line-height: 0.75em; vertical-align: -0.0667em; }
