/*
 * cms-desktop-ui.css - desktop / large-screen skin for the admin, staff and
 * customer portals ("DentaCore" look: plum primary #800080, white sidebar with
 * grouped navigation, slim top bar, rounded cards, lavender table headers).
 *
 * Purely presentational. It restyles the existing SkyDash markup and the
 * markup the module scripts already render; it changes no behaviour and no
 * element IDs/classes the scripts depend on.
 *
 *  - Loaded only in the desktop bundle (Assets::maybe_enqueue). The mobile
 *    portal (cms-mobile.css) never sees it.
 *  - Every visual rule lives inside @media (min-width: 992px), the point where
 *    the shell switches from the off-canvas menu to the fixed sidebar, so
 *    narrower windows keep the previous look. The few rules outside the media
 *    query only hide elements that exist for the desktop layout.
 *  - Selectors are prefixed (body.cms-portal / .container-scroller) so they
 *    win over theme-src/style.css and cms-app.css regardless of load order.
 */

/* Inter (SIL OFL 1.1, see theme-src/assets/fonts/Inter/OFL-LICENSE.txt), bundled
   locally as a variable font so no third-party font host is needed. The
   declarations are inert until a rule uses font-family 'Inter', which only
   happens inside the desktop media query below. latin-ext carries the
   peso sign. */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../../theme-src/assets/fonts/Inter/inter-latin-ext-wght-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../../theme-src/assets/fonts/Inter/inter-latin-wght-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Elements that only exist for the desktop layout: hidden everywhere else. */
.cms-nav-group,
.cms-sidebar-footer,
.cms-kpi-icon,
.cms-branch-static,
.cms-auth-brand {
	display: none;
}

@media (min-width: 992px) {

	/* ------------------------------------------------------------------
	 * Design tokens
	 * ---------------------------------------------------------------- */
	body.cms-portal {
		--dc-primary: #800080;
		--dc-primary-dark: #5e005e;
		--dc-primary-light: #a31aa3;
		--dc-lav-50: #fcf9fc;
		--dc-lav-100: #f8f2f8;
		--dc-lav-200: #efe3ef;
		--dc-lav-300: #dfc4df;
		--dc-slate-50: #f8fafc;
		--dc-slate-100: #f1f5f9;
		--dc-slate-200: #e2e8f0;
		--dc-slate-400: #64748b;
		--dc-slate-600: #475569;
		--dc-slate-800: #1e293b;
		--dc-success: #198754;
		--dc-danger: #dc3545;
		--dc-warning: #b7791f;
		--dc-info: #0b7285;
		--dc-sidebar-w: 268px;
		--dc-topbar-h: 64px;
		--dc-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

		/* Re-point Bootstrap's own variables so stock components follow. */
		--bs-primary: #800080;
		--bs-primary-rgb: 128, 0, 128;
		--bs-link-color: #800080;
		--bs-link-color-rgb: 128, 0, 128;
		--bs-link-hover-color: #5e005e;
		--bs-link-hover-color-rgb: 94, 0, 94;
		--bs-body-font-family: var(--dc-font);
		--bs-body-color: #1e293b;
		--bs-border-color: #e2e8f0;
		--bs-border-radius: 8px;
		--bs-border-radius-lg: 12px;

		font-family: var(--dc-font);
		font-size: 0.9rem;
		color: var(--dc-slate-800);
		background-color: var(--dc-lav-50);
	}

	body.cms-portal.sidebar-icon-only {
		--dc-sidebar-w: 74px;
	}

	body.cms-portal .text-primary { color: var(--dc-primary) !important; }
	body.cms-portal .bg-primary { background-color: var(--dc-primary) !important; }
	body.cms-portal .border-primary { border-color: var(--dc-primary) !important; }

	/* ------------------------------------------------------------------
	 * Top bar
	 * ---------------------------------------------------------------- */
	.container-scroller .navbar.fixed-top {
		height: var(--dc-topbar-h);
		background: #fff;
		border-bottom: 1px solid var(--dc-slate-200);
		box-shadow: none;
		z-index: 1030;
	}

	.container-scroller .navbar .navbar-brand-wrapper {
		width: var(--dc-sidebar-w);
		height: var(--dc-topbar-h);
		padding: 0 1.15rem;
		background: #fff;
		border-right: 1px solid var(--dc-slate-200);
		justify-content: flex-start !important;
		overflow: hidden;
	}

	.container-scroller .navbar .navbar-brand-wrapper .navbar-brand img {
		height: 40px;
		margin: 0;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .navbar .navbar-brand-wrapper {
		width: var(--dc-sidebar-w);
		padding: 0;
		justify-content: center !important;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .navbar .navbar-brand-wrapper .brand-logo-mini img {
		width: 38px;
		height: 38px;
		object-fit: contain;
	}

	.container-scroller .navbar .navbar-menu-wrapper {
		width: calc(100% - var(--dc-sidebar-w));
		height: var(--dc-topbar-h);
		padding: 0 1.25rem;
		background: #fff;
		color: var(--dc-slate-600);
		gap: 0.75rem;
	}

	/* The sidebar collapse button: bordered square like the reference. */
	.container-scroller .navbar .navbar-menu-wrapper .navbar-toggler:not(.navbar-toggler-right) {
		width: var(--cms-h-md);
		height: var(--cms-h-md);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border: 1px solid var(--dc-slate-200);
		border-radius: 8px;
		background: var(--dc-slate-50);
		color: var(--dc-slate-600);
		font-size: 1.1rem;
		transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	}

	.container-scroller .navbar .navbar-menu-wrapper .navbar-toggler:not(.navbar-toggler-right):hover {
		background: var(--dc-lav-100);
		color: var(--dc-primary);
		border-color: var(--dc-lav-300);
	}

	.container-scroller .navbar .navbar-menu-wrapper .navbar-toggler:focus-visible {
		outline: 2px solid var(--dc-primary);
		outline-offset: 2px;
	}

	/* "Admin Portal" label -> lavender badge. */
	.container-scroller .navbar .cms-portal-badge {
		order: 3;
		margin: 0 !important;
		padding: 0.32rem 0.75rem;
		background: var(--dc-lav-100);
		border: 1px solid var(--dc-lav-300);
		border-radius: 999px;
		color: var(--dc-primary) !important;
		font-size: 0.75rem;
		font-weight: 600;
		letter-spacing: 0.01em;
		line-height: 1.2;
	}

	/* Let the right-hand <ul>'s items take part in the bar's flex layout so
	   the branch switcher can sit on the left next to the menu button while
	   the profile stays on the right. DOM order (and so tab order) is kept. */
	.container-scroller .navbar .navbar-menu-wrapper .navbar-nav.navbar-nav-right {
		display: contents !important; /* theme-src forces display:flex !important on this selector group */
	}

	.container-scroller .navbar .navbar-menu-wrapper .navbar-nav .nav-item {
		margin: 0;
	}

	.container-scroller .navbar .navbar-menu-wrapper .cms-branch-switcher,
	.container-scroller .navbar .navbar-menu-wrapper .cms-branch-static {
		order: 2;
		position: relative;
		margin: 0 !important;
	}

	.container-scroller .navbar .navbar-menu-wrapper .navbar-nav .nav-item.nav-profile {
		order: 9;
		margin-left: auto;
	}

	/* Branch switcher / current branch pill. */
	.container-scroller .navbar .cms-branch-switcher > .nav-link,
	.container-scroller .navbar .cms-branch-pill {
		display: inline-flex;
		align-items: center;
		gap: 0;
		box-sizing: border-box;
		min-height: var(--cms-h-md);
		max-width: 300px;
		padding: 0 0.85rem 0 0;
		background: #fff;
		border: 1px solid var(--dc-lav-300);
		border-radius: 8px;
		color: var(--dc-slate-800);
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.3;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.container-scroller .navbar .cms-branch-switcher > .nav-link:hover,
	.container-scroller .navbar .cms-branch-switcher > .nav-link.show {
		border-color: var(--dc-primary);
		background: var(--dc-lav-200);
	}

	.container-scroller .navbar .cms-branch-switcher > .nav-link i,
	.container-scroller .navbar .cms-branch-pill i {
		display: inline-flex;
		align-items: center;
		align-self: stretch;
		margin: 0 0.7rem 0 0 !important;
		padding: 0 0.6rem;
		background: var(--dc-lav-100);
		border-right: 1px solid var(--dc-lav-300);
		color: var(--dc-primary);
		font-size: 1.05rem;
	}

	.container-scroller .navbar .cms-branch-static {
		display: block;
	}

	/* Dropdown menus (branch switcher, profile). */
	.container-scroller .navbar .navbar-nav .nav-item.dropdown .navbar-dropdown {
		top: calc(100% + 10px);
		min-width: 14rem;
		padding: 0.35rem;
		border: 1px solid var(--dc-slate-200);
		border-radius: 12px;
		box-shadow: 0 12px 32px rgba(30, 10, 30, 0.14);
	}

	.container-scroller .navbar .cms-branch-switcher .navbar-dropdown {
		left: 0;
		right: auto;
	}

	.container-scroller .navbar .navbar-nav .nav-item.dropdown .navbar-dropdown .dropdown-item {
		padding: 0.55rem 0.8rem;
		border-radius: 8px;
		font-size: 0.875rem;
		color: var(--dc-slate-800);
	}

	.container-scroller .navbar .navbar-nav .nav-item.dropdown .navbar-dropdown .dropdown-item:hover,
	.container-scroller .navbar .navbar-nav .nav-item.dropdown .navbar-dropdown .dropdown-item:focus {
		background: var(--dc-lav-100);
		color: var(--dc-primary);
	}

	.container-scroller .navbar .navbar-nav .nav-item.dropdown .navbar-dropdown .dropdown-divider {
		margin: 0.35rem 0;
	}

	/* Profile: avatar circle + name. */
	.container-scroller .navbar .nav-profile > .nav-link {
		display: inline-flex;
		align-items: center;
		gap: 0.35rem;
		box-sizing: border-box;
		min-height: var(--cms-h-md);
		padding: 0 0.75rem 0 0.25rem;
		border: 1px solid var(--dc-slate-200);
		border-radius: 999px;
		color: var(--dc-slate-800);
		font-size: 0.85rem;
		font-weight: 600;
		transition: background 0.15s ease, border-color 0.15s ease;
	}

	.container-scroller .navbar .nav-profile > .nav-link:hover,
	.container-scroller .navbar .nav-profile > .nav-link.show {
		background: var(--dc-lav-100);
		border-color: var(--dc-lav-300);
	}

	.container-scroller .navbar .nav-profile > .nav-link i {
		margin: 0;
		color: var(--dc-primary);
		font-size: 1.9rem !important;
		line-height: 1;
	}

	/* ------------------------------------------------------------------
	 * Sidebar
	 * ---------------------------------------------------------------- */
	.container-scroller .page-body-wrapper {
		padding-top: var(--dc-topbar-h);
		min-height: 100vh;
	}

	.container-scroller .sidebar {
		position: fixed;
		top: var(--dc-topbar-h);
		bottom: 0;
		left: 0;
		width: var(--dc-sidebar-w);
		min-height: 0;
		display: flex;
		flex-direction: column;
		overflow-x: hidden;
		overflow-y: auto;
		background: #fff;
		border-right: 1px solid var(--dc-slate-200);
		font-family: var(--dc-font);
		z-index: 1020;
		scrollbar-width: thin;
	}

	.container-scroller .sidebar .nav:not(.sub-menu) {
		flex: 1 0 auto;
		flex-wrap: nowrap;
		margin: 0;
		padding: 0.6rem 0.75rem;
		overflow: visible;
	}

	.container-scroller .sidebar .nav:not(.sub-menu) > .nav-item {
		margin-top: 0.15rem;
		background: transparent;
	}

	.container-scroller .sidebar .nav .nav-item.cms-nav-group {
		display: block;
		margin: 0.35rem 0 0;
		padding: 0.65rem 0.75rem 0.25rem;
		font-size: 0.68rem;
		font-weight: 700;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: var(--dc-slate-400);
		white-space: nowrap;
	}

	.container-scroller .sidebar .nav .nav-item.cms-nav-group:first-child {
		margin-top: 0;
	}

	.container-scroller .sidebar .nav .nav-item .nav-link {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.58rem 0.8rem;
		border-radius: 9px;
		color: var(--dc-slate-600);
		font-weight: 500;
		transition: background 0.15s ease, color 0.15s ease;
	}

	.container-scroller .sidebar .nav .nav-item .nav-link i.menu-icon {
		width: 22px;
		margin: 0;
		font-size: 1.15rem;
		text-align: center;
		color: inherit;
		flex-shrink: 0;
	}

	.container-scroller .sidebar .nav .nav-item .nav-link .menu-title {
		font-size: 0.9rem;
		line-height: 1.25;
		white-space: normal;
		color: inherit;
	}

	.container-scroller .sidebar .nav:not(.sub-menu) > .nav-item:hover > .nav-link {
		background: var(--dc-lav-100);
		color: var(--dc-primary);
	}

	.container-scroller .sidebar .nav .nav-item:hover > .nav-link i,
	.container-scroller .sidebar .nav .nav-item:hover > .nav-link .menu-title {
		color: var(--dc-primary);
	}

	.container-scroller .sidebar .nav .nav-item.active > .nav-link,
	.container-scroller .sidebar .nav:not(.sub-menu) > .nav-item.active > .nav-link {
		background: var(--dc-primary);
		color: #fff;
		font-weight: 600;
		box-shadow: 0 4px 10px rgba(128, 0, 128, 0.2);
	}

	.container-scroller .sidebar .nav .nav-item.active > .nav-link i,
	.container-scroller .sidebar .nav .nav-item.active > .nav-link .menu-title,
	.container-scroller .sidebar .nav .nav-item.active:hover > .nav-link i,
	.container-scroller .sidebar .nav .nav-item.active:hover > .nav-link .menu-title {
		color: #fff;
	}

	.container-scroller .sidebar .nav:not(.sub-menu) > .nav-item.active {
		background: transparent;
	}

	.container-scroller .sidebar .nav .nav-item .nav-link:focus-visible {
		outline: 2px solid var(--dc-primary);
		outline-offset: 1px;
	}

	/* Role + user block pinned to the bottom of the sidebar. */
	.container-scroller .sidebar .cms-sidebar-footer {
		display: block;
		flex-shrink: 0;
		margin-top: auto;
		padding: 0.9rem 1.1rem;
		background: var(--dc-lav-100);
		border-top: 1px solid var(--dc-slate-200);
		overflow: hidden;
	}

	.container-scroller .sidebar .cms-sidebar-role {
		display: inline-block;
		margin-bottom: 0.35rem;
		padding: 0.2rem 0.6rem;
		border-radius: 999px;
		background: var(--dc-primary);
		color: #fff;
		font-size: 0.68rem;
		font-weight: 600;
		letter-spacing: 0.02em;
	}

	.container-scroller .sidebar .cms-sidebar-user {
		font-size: 0.85rem;
		font-weight: 600;
		color: var(--dc-slate-800);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.container-scroller .sidebar .cms-sidebar-email {
		font-size: 0.72rem;
		color: var(--dc-slate-600);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	/* Collapsed (icon-only) sidebar. */
	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .nav:not(.sub-menu) {
		padding: 0.6rem 0.5rem;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .nav .nav-item .nav-link {
		justify-content: center;
		padding: 0.62rem 0;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .nav .nav-item .nav-link .menu-title {
		display: none;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .nav .nav-item.cms-nav-group {
		height: 1px;
		margin: 0.55rem 0.5rem;
		padding: 0;
		background: var(--dc-slate-200);
		font-size: 0;
		overflow: hidden;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .cms-sidebar-footer {
		padding: 0.6rem 0;
		text-align: center;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .cms-sidebar-user,
	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .cms-sidebar-email {
		display: none;
	}

	body.cms-portal.sidebar-icon-only .container-scroller .sidebar .cms-sidebar-role {
		margin: 0;
		padding: 0.2rem 0;
		width: 44px;
		overflow: hidden;
		text-overflow: clip;
		white-space: nowrap;
		font-size: 0.6rem;
	}

	/* ------------------------------------------------------------------
	 * Main panel + page furniture
	 * ---------------------------------------------------------------- */
	.container-scroller .main-panel {
		margin-left: var(--dc-sidebar-w);
		width: calc(100% - var(--dc-sidebar-w));
		min-height: calc(100vh - var(--dc-topbar-h));
		background: var(--dc-lav-50);
	}

	.container-scroller .content-wrapper {
		background: var(--dc-lav-50);
		padding: 1.35rem;
	}

	.container-scroller .footer {
		background: #fff;
		border-top: 1px solid var(--dc-slate-200);
		padding: 0.85rem 1.6rem;
		font-family: var(--dc-font);
		font-size: 0.8rem;
	}

	/* Page titles: bold h4-sized heading + small muted subtitle. */
	.content-wrapper h3.font-weight-bold,
	.content-wrapper h3.fw-bold,
	.content-wrapper .col-12 > h3 {
		font-size: 1.48rem;
		font-weight: 700;
		color: #212529;
		letter-spacing: 0;
		line-height: 1.2;
	}

	.content-wrapper h6.font-weight-normal,
	.content-wrapper h6.text-muted,
	.content-wrapper .col-12 > p.text-muted,
	.content-wrapper .title-wrap > p.text-muted,
	.content-wrapper div > h3.font-weight-bold + p.text-muted {
		margin-top: 0.15rem;
		font-size: 0.79rem;
		font-weight: 400;
		color: rgba(33, 37, 41, 0.75) !important;
	}

	.content-wrapper .grid-margin {
		margin-bottom: 1.25rem;
	}

	/* ------------------------------------------------------------------
	 * Cards
	 * ---------------------------------------------------------------- */
	body.cms-portal .card {
		background: #fff;
		border: 1px solid var(--dc-slate-200);
		border-radius: 12px;
		box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
	}

	body.cms-portal .card .card-body {
		padding: 1.15rem 1.25rem;
	}

	body.cms-portal .card .card-title {
		margin-bottom: 1rem;
		color: var(--dc-slate-800);
		font-size: 1rem;
		font-weight: 700;
		text-transform: none;
		letter-spacing: -0.005em;
	}

	body.cms-portal .card .card-header {
		padding: 0.95rem 1.2rem;
		background: #fff;
		border-bottom: 1px solid var(--dc-slate-200);
		border-radius: 12px 12px 0 0;
	}

	body.cms-portal .card .card-footer {
		background: #fff;
		border-top: 1px solid var(--dc-slate-200);
	}

	/* KPI / statistic cards: white card, label + icon on top, big value below. */
	body.cms-portal .card.cms-kpi,
	body.cms-portal .card.cms-kpi:hover {
		background: #fff;
		color: var(--dc-slate-800);
	}

	body.cms-portal .card.cms-kpi {
		box-shadow: none;
		transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	}

	body.cms-portal .card.cms-kpi:hover {
		transform: translateY(-2px);
		border-color: var(--dc-lav-300);
		box-shadow: 0 8px 20px rgba(128, 0, 128, 0.08);
	}

	body.cms-portal .card.cms-kpi .card-body {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: start;
		column-gap: 0.75rem;
		padding: 1.1rem;
	}

	body.cms-portal .card.cms-kpi .card-body > p:first-child {
		grid-column: 1;
		grid-row: 1;
		margin: 0 !important;
		color: rgba(33, 37, 41, 0.75);
		font-size: 0.79rem;
		font-weight: 600;
	}

	body.cms-portal .card.cms-kpi .cms-kpi-icon {
		grid-column: 2;
		grid-row: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		border-radius: 10px;
		background: var(--dc-lav-100);
		color: var(--dc-primary);
		font-size: 1.2rem;
	}

	body.cms-portal .card.cms-kpi .cms-kpi-icon i {
		line-height: 1;
	}

	body.cms-portal .card.cms-kpi-success .cms-kpi-icon { background: #e7f5ee; color: var(--dc-success); }
	body.cms-portal .card.cms-kpi-danger .cms-kpi-icon { background: #fdecee; color: var(--dc-danger); }
	body.cms-portal .card.cms-kpi-warning .cms-kpi-icon { background: #fdf3df; color: var(--dc-warning); }
	body.cms-portal .card.cms-kpi-info .cms-kpi-icon { background: #e1f4f8; color: var(--dc-info); }

	body.cms-portal .card.cms-kpi .cms-stat-value {
		grid-column: 1 / -1;
		grid-row: 2;
		min-width: 0;
		overflow-wrap: anywhere;
		margin: 0.35rem 0 0;
		color: var(--dc-slate-800);
		font-size: 1.48rem;
		font-weight: 700;
		letter-spacing: 0;
		line-height: 1.2;
	}

	/* Plain stat cards that don't carry the new markup (any other page):
	   neutralise the SkyDash coloured fills so text stays readable. */
	body.cms-portal .card.card-tale:not(.cms-kpi),
	body.cms-portal .card.card-dark-blue:not(.cms-kpi),
	body.cms-portal .card.card-light-blue:not(.cms-kpi),
	body.cms-portal .card.card-light-danger:not(.cms-kpi) {
		background: var(--dc-lav-100);
		color: var(--dc-slate-800);
		border-color: var(--dc-lav-300);
	}

	/* ------------------------------------------------------------------
	 * Buttons
	 * ---------------------------------------------------------------- */
	/* CONTROL SIZE SYSTEM - every button, input, select and input-group part
	   uses one of three heights so anything placed side by side lines up:
	     small 32px / 13px text, default 38px / 14px text, large 46px / 16px.
	   Radius is always 8px. Icon-only buttons are squares of the same height. */
	body.cms-portal {
		--cms-h-sm: 32px;
		--cms-h-md: 38px;
		--cms-h-lg: 46px;
		--cms-radius: 8px;
	}

	body.cms-portal .btn:where(:not(.btn-close):not(.btn-link):not(.navbar-toggler):not(.cms-odo-chip-x)) {
		--bs-btn-padding-y: 0;
		--bs-btn-padding-x: 1rem;
		--bs-btn-font-size: 0.875rem;
		--bs-btn-border-radius: var(--cms-radius);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 0.4rem;
		box-sizing: border-box;
		min-height: var(--cms-h-md);
		padding: 0 1rem;
		border-radius: var(--cms-radius);
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.25;
		letter-spacing: 0;
		text-align: center;
		vertical-align: middle;
		transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
	}

	body.cms-portal .btn.btn-sm:where(:not(.btn-link):not(.btn-close)),
	body.cms-portal .btn-group-sm > .btn:where(:not(.btn-link)) {
		--bs-btn-padding-x: 0.75rem;
		--bs-btn-font-size: 0.8125rem;
		min-height: var(--cms-h-sm);
		padding: 0 0.75rem;
		font-size: 0.8125rem;
	}

	body.cms-portal .btn.btn-lg:where(:not(.btn-link)),
	body.cms-portal .btn-group-lg > .btn:where(:not(.btn-link)),
	body.cms-portal .btn.cms-cb-action-btn {
		--bs-btn-padding-x: 1.25rem;
		--bs-btn-font-size: 1rem;
		min-height: var(--cms-h-lg);
		padding: 0 1.25rem;
		font-size: 1rem;
	}

	/* Icon-only buttons (marked by assets/js/cms-ui-uniform.js) are squares. */
	body.cms-portal .btn.cms-btn-icon:where(:not(.btn-link)) {
		width: var(--cms-h-md);
		min-width: var(--cms-h-md);
		padding: 0;
	}

	body.cms-portal .btn.cms-btn-icon.btn-sm,
	body.cms-portal .btn-group-sm > .btn.cms-btn-icon {
		width: var(--cms-h-sm);
		min-width: var(--cms-h-sm);
	}

	body.cms-portal .btn.cms-btn-icon.btn-lg {
		width: var(--cms-h-lg);
		min-width: var(--cms-h-lg);
	}

	body.cms-portal .btn > i {
		font-size: 1.1em;
		line-height: 1;
	}

	/* Link-style buttons stay inline text, not boxes. */
	body.cms-portal .btn.btn-link {
		min-height: 0;
		padding: 0;
		font-size: 0.8125rem;
		font-weight: 600;
	}

	body.cms-portal .btn:focus-visible {
		outline: 2px solid var(--dc-primary);
		outline-offset: 2px;
	}

	body.cms-portal .btn-primary {
		--bs-btn-color: #fff;
		--bs-btn-bg: #800080;
		--bs-btn-border-color: #800080;
		--bs-btn-hover-color: #fff;
		--bs-btn-hover-bg: #5e005e;
		--bs-btn-hover-border-color: #5e005e;
		--bs-btn-focus-shadow-rgb: 128, 0, 128;
		--bs-btn-active-color: #fff;
		--bs-btn-active-bg: #4d004d;
		--bs-btn-active-border-color: #4d004d;
		--bs-btn-disabled-color: #fff;
		--bs-btn-disabled-bg: #800080;
		--bs-btn-disabled-border-color: #800080;
	}

	body.cms-portal .btn-primary:hover,
	body.cms-portal .btn-primary:focus {
		box-shadow: 0 4px 12px rgba(128, 0, 128, 0.25);
	}

	body.cms-portal .btn-outline-primary {
		--bs-btn-color: #800080;
		--bs-btn-border-color: #800080;
		--bs-btn-hover-color: #fff;
		--bs-btn-hover-bg: #800080;
		--bs-btn-hover-border-color: #800080;
		--bs-btn-focus-shadow-rgb: 128, 0, 128;
		--bs-btn-active-color: #fff;
		--bs-btn-active-bg: #5e005e;
		--bs-btn-active-border-color: #5e005e;
		--bs-btn-disabled-color: #800080;
		--bs-btn-disabled-border-color: #800080;
		background-color: #fff;
	}

	body.cms-portal .btn-outline-primary:hover {
		background-color: var(--dc-primary);
	}

	body.cms-portal .btn-outline-secondary,
	body.cms-portal .btn-light {
		--bs-btn-color: #475569;
		--bs-btn-bg: #fff;
		--bs-btn-border-color: #e2e8f0;
		--bs-btn-hover-color: #800080;
		--bs-btn-hover-bg: #f8f2f8;
		--bs-btn-hover-border-color: #dfc4df;
		--bs-btn-active-color: #5e005e;
		--bs-btn-active-bg: #efe3ef;
		--bs-btn-active-border-color: #dfc4df;
		--bs-btn-focus-shadow-rgb: 128, 0, 128;
		--bs-btn-disabled-color: #94a3b8;
		--bs-btn-disabled-border-color: #e2e8f0;
		background-color: #fff;
	}

	body.cms-portal .btn-secondary {
		--bs-btn-color: #5e005e;
		--bs-btn-bg: #efe3ef;
		--bs-btn-border-color: #efe3ef;
		--bs-btn-hover-color: #5e005e;
		--bs-btn-hover-bg: #dfc4df;
		--bs-btn-hover-border-color: #dfc4df;
		--bs-btn-active-color: #5e005e;
		--bs-btn-active-bg: #dfc4df;
		--bs-btn-active-border-color: #dfc4df;
		--bs-btn-focus-shadow-rgb: 128, 0, 128;
		--bs-btn-disabled-color: #5e005e;
		--bs-btn-disabled-bg: #efe3ef;
		--bs-btn-disabled-border-color: #efe3ef;
	}

	body.cms-portal .btn-outline-danger {
		--bs-btn-color: #dc3545;
		--bs-btn-border-color: #f1c2c7;
		--bs-btn-hover-color: #fff;
		--bs-btn-hover-bg: #dc3545;
		--bs-btn-hover-border-color: #dc3545;
		background-color: #fff;
	}

	body.cms-portal .btn-success {
		--bs-btn-bg: #198754;
		--bs-btn-border-color: #198754;
		--bs-btn-hover-bg: #157347;
		--bs-btn-hover-border-color: #146c43;
	}

	body.cms-portal .btn-danger {
		--bs-btn-bg: #dc3545;
		--bs-btn-border-color: #dc3545;
		--bs-btn-hover-bg: #bb2d3b;
		--bs-btn-hover-border-color: #b02a37;
	}

	/* ------------------------------------------------------------------
	 * Form controls
	 * ---------------------------------------------------------------- */
	body.cms-portal .form-control,
	body.cms-portal .form-select,
	body.cms-portal select.form-select,
	body.cms-portal .dataTables_wrapper select,
	body.cms-portal .select2-container--default .select2-selection--single {
		min-height: 38px;
		padding: 0.45rem 0.75rem;
		border: 1px solid var(--dc-slate-200);
		border-radius: 8px;
		background-color: #fff;
		color: var(--dc-slate-800);
		font-family: var(--dc-font);
		font-size: 0.875rem;
		line-height: 1.5;
	}

	body.cms-portal select.form-select,
	body.cms-portal .form-select {
		padding-right: 2.25rem;
	}

	body.cms-portal textarea.form-control {
		min-height: 80px;
	}

	/* Small controls: exactly 32px, 13px text - the same on every page. */
	body.cms-portal .form-control.form-control-sm,
	body.cms-portal input.form-control.form-control-sm,
	body.cms-portal .form-select.form-select-sm,
	body.cms-portal select.form-select.form-select-sm,
	body.cms-portal .input-group-sm > input.form-control,
	body.cms-portal .input-group-sm > .form-control,
	body.cms-portal .input-group-sm > .form-select,
	body.cms-portal .input-group-sm > .input-group-text {
		box-sizing: border-box;
		height: var(--cms-h-sm);
		min-height: var(--cms-h-sm);
		padding: 0 0.625rem;
		font-size: 0.8125rem;
		line-height: 1.5;
	}

	body.cms-portal .form-select.form-select-sm,
	body.cms-portal .input-group-sm > .form-select {
		padding-right: 2rem;
	}

	body.cms-portal .input-group-sm > .btn {
		min-height: var(--cms-h-sm);
	}

	/* Large controls (sign-in): exactly 46px. */
	body.cms-portal .form-control.form-control-lg,
	body.cms-portal .form-select.form-select-lg,
	body.cms-portal .input-group-lg > .form-control,
	body.cms-portal .input-group-lg > .form-select,
	body.cms-portal .input-group-lg > .input-group-text {
		box-sizing: border-box;
		min-height: var(--cms-h-lg);
		padding: 0 1rem;
		font-size: 1rem;
	}

	/* Default controls: exactly 38px (text inputs/selects; textareas keep their own height). */
	body.cms-portal input.form-control:where(:not(.form-control-sm):not(.form-control-lg):not([type="file"])),
	body.cms-portal select.form-select:where(:not(.form-select-sm):not(.form-select-lg)) {
		box-sizing: border-box;
		height: var(--cms-h-md);
		padding-top: 0;
		padding-bottom: 0;
	}

	body.cms-portal .input-group > .form-control:where(:not(.form-control-sm):not(.form-control-lg)),
	body.cms-portal .input-group > .form-select:where(:not(.form-select-sm):not(.form-select-lg)) {
		min-height: var(--cms-h-md);
	}

	body.cms-portal textarea.form-control {
		padding-top: 0.5rem;
		padding-bottom: 0.5rem;
	}

	body.cms-portal input[type="file"].form-control {
		box-sizing: border-box;
		min-height: var(--cms-h-md);
		padding: 0.4rem 0.75rem;
	}

	body.cms-portal input[type="file"].form-control.form-control-sm {
		min-height: var(--cms-h-sm);
		padding: 0.2rem 0.625rem;
	}

	/* Checkboxes, radios and switches: one size, plum when on. */
	body.cms-portal input[type="checkbox"].form-check-input,
	body.cms-portal input[type="radio"].form-check-input {
		width: 1.125rem;
		height: 1.125rem;
		margin-top: 0.15rem;
		border: 1px solid #94a3b8;
		accent-color: var(--dc-primary);
	}

	body.cms-portal .form-switch .form-check-input {
		width: 2.25rem;
		height: 1.125rem;
		border-radius: 2rem;
	}

	body.cms-portal .form-check-input:checked {
		border-color: var(--dc-primary);
	}

	body.cms-portal .form-control:focus,
	body.cms-portal .form-select:focus,
	body.cms-portal .select2-container--default.select2-container--focus .select2-selection--single,
	body.cms-portal .select2-container--default.select2-container--open .select2-selection--single {
		border-color: var(--dc-primary);
		box-shadow: 0 0 0 0.2rem rgba(128, 0, 128, 0.14);
		outline: 0;
	}

	body.cms-portal .form-control::placeholder {
		color: #64748b;
	}

	body.cms-portal .form-control:disabled,
	body.cms-portal .form-control[readonly],
	body.cms-portal .form-select:disabled {
		background-color: var(--dc-slate-50);
	}

	body.cms-portal .form-label,
	body.cms-portal label {
		font-size: 0.82rem;
		font-weight: 600;
		color: var(--dc-slate-800);
	}

	body.cms-portal .form-check label,
	body.cms-portal .form-check-label,
	body.cms-portal .form-switch label {
		font-weight: 400;
	}

	body.cms-portal .input-group-text {
		min-height: var(--cms-h-md);
		border: 1px solid var(--dc-slate-200);
		border-radius: 8px;
		background: var(--dc-lav-50);
		color: var(--dc-primary);
	}

	body.cms-portal .input-group > .form-control:not(:first-child),
	body.cms-portal .input-group > .form-select:not(:first-child) {
		border-top-left-radius: 0;
		border-bottom-left-radius: 0;
	}

	body.cms-portal .input-group > .form-control:not(:last-child),
	body.cms-portal .input-group > .form-select:not(:last-child) {
		border-top-right-radius: 0;
		border-bottom-right-radius: 0;
	}

	body.cms-portal .input-group > .input-group-text:not(:first-child) {
		border-top-left-radius: 0;
		border-bottom-left-radius: 0;
	}

	body.cms-portal .input-group > .input-group-text:not(:last-child) {
		border-top-right-radius: 0;
		border-bottom-right-radius: 0;
	}

	body.cms-portal .form-check-input:checked {
		background-color: var(--dc-primary);
		border-color: var(--dc-primary);
	}

	body.cms-portal .form-check-input:focus {
		border-color: var(--dc-primary);
		box-shadow: 0 0 0 0.2rem rgba(128, 0, 128, 0.14);
	}

	/* SkyDash's custom checkbox / radio helpers. */
	body.cms-portal .form-check .form-check-label input[type=checkbox] + .input-helper:before,
	body.cms-portal .form-check .form-check-label input[type=radio] + .input-helper:before {
		border-color: var(--dc-primary);
	}

	body.cms-portal .form-check .form-check-label input[type=checkbox]:checked + .input-helper:before,
	body.cms-portal .form-check .form-check-label input[type=radio]:checked + .input-helper:before {
		background: var(--dc-primary);
	}

	/* select2 dropdown. */
	body.cms-portal .select2-container--default .select2-selection--single .select2-selection__rendered {
		padding: 0;
		line-height: 1.5;
		color: var(--dc-slate-800);
	}

	body.cms-portal .select2-container--default .select2-selection--single .select2-selection__arrow {
		height: 100%;
		top: 0;
	}

	body.cms-portal .select2-dropdown {
		border: 1px solid var(--dc-lav-300);
		border-radius: 10px;
		box-shadow: 0 10px 28px rgba(30, 10, 30, 0.12);
		overflow: hidden;
	}

	body.cms-portal .select2-container--default .select2-results__option--highlighted[aria-selected],
	body.cms-portal .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
		background: var(--dc-primary);
		color: #fff;
	}

	body.cms-portal .select2-container--default .select2-results__option[aria-selected=true] {
		background: var(--dc-lav-100);
		color: var(--dc-primary-dark);
	}

	/* ------------------------------------------------------------------
	 * Tables
	 * ---------------------------------------------------------------- */
	body.cms-portal .table {
		--bs-table-bg: transparent;
		--bs-table-striped-bg: var(--dc-slate-50);
		--bs-table-hover-bg: var(--dc-lav-50);
		margin-bottom: 0;
		color: var(--dc-slate-800);
	}

	body.cms-portal .table thead th {
		padding: 0.75rem 0.85rem;
		background-color: var(--dc-lav-100);
		border-bottom: 1px solid var(--dc-lav-300);
		color: var(--dc-primary-dark);
		font-size: 0.76rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		white-space: nowrap;
	}

	body.cms-portal .table thead th:first-child { border-top-left-radius: 8px; }
	body.cms-portal .table thead th:last-child { border-top-right-radius: 8px; }

	body.cms-portal .table td,
	body.cms-portal .table tbody th {
		padding: 0.55rem 0.85rem;
		border-bottom: 1px solid var(--dc-slate-100);
		font-size: 0.9rem;
		line-height: 1.5;
		vertical-align: middle;
	}

	body.cms-portal .table tbody tr:last-child td {
		border-bottom: 0;
	}

	body.cms-portal .table-hover > tbody > tr:hover > *,
	body.cms-portal .table > tbody > tr:hover > * {
		background-color: var(--dc-lav-50);
	}

	body.cms-portal .table-striped > tbody > tr:nth-of-type(odd) > * {
		background-color: var(--dc-slate-50);
	}

	body.cms-portal .table-striped > tbody > tr:nth-of-type(odd):hover > * {
		background-color: var(--dc-lav-50);
	}

	body.cms-portal .cms-sortable:hover {
		color: var(--dc-primary);
	}

	body.cms-portal .table-responsive {
		border-radius: 8px;
	}

	/* ------------------------------------------------------------------
	 * Badges / status pills
	 * ---------------------------------------------------------------- */
	body.cms-portal .badge {
		padding: 0.35em 0.65em;
		border-radius: 6px;
		font-family: var(--dc-font);
		font-size: 0.72rem;
		font-weight: 700;
		line-height: 1.1;
		letter-spacing: 0;
	}

	body.cms-portal .badge-success,
	body.cms-portal .badge.bg-success { background: #e7f5ee !important; color: #146c43 !important; }
	body.cms-portal .badge-danger,
	body.cms-portal .badge.bg-danger { background: #fdecee !important; color: #b02a37 !important; }
	body.cms-portal .badge-warning,
	body.cms-portal .badge.bg-warning { background: #fdf3df !important; color: #8a5a00 !important; }
	body.cms-portal .badge-info,
	body.cms-portal .badge.bg-info { background: #e1f4f8 !important; color: #0b6b7c !important; }
	body.cms-portal .badge-secondary,
	body.cms-portal .badge.bg-secondary { background: var(--dc-slate-100) !important; color: var(--dc-slate-600) !important; }
	body.cms-portal .badge-primary,
	body.cms-portal .badge.bg-primary { background: var(--dc-lav-200) !important; color: var(--dc-primary-dark) !important; }
	body.cms-portal .badge.bg-light { background: var(--dc-lav-100) !important; color: var(--dc-primary) !important; border: 1px solid var(--dc-lav-300); }

	/* ------------------------------------------------------------------
	 * Modals, dropdowns, alerts, tabs, pagination, toasts
	 * ---------------------------------------------------------------- */
	body.cms-portal .modal-dialog {
		display: flex;
		align-items: center;
		min-height: calc(100% - 3.5rem);
	}

	body.cms-portal .modal-content {
		border: 0;
		border-radius: 14px;
		box-shadow: 0 1rem 3rem rgba(30, 10, 30, 0.3);
		overflow: hidden;
	}

	body.cms-portal .modal-header {
		padding: 1rem 1.25rem;
		background: var(--dc-primary);
		color: #fff;
		border-bottom: 0;
	}

	body.cms-portal .modal-title {
		font-size: 1.25rem;
		font-weight: 700;
		color: #fff;
	}

	body.cms-portal .modal-header .text-muted,
	body.cms-portal .modal-header p {
		color: rgba(255, 255, 255, 0.8) !important;
	}

	body.cms-portal .modal-header .btn-close {
		filter: invert(1) grayscale(100%) brightness(200%);
		opacity: 0.9;
	}

	body.cms-portal .modal-body {
		padding: 1.5rem;
	}

	body.cms-portal .modal-footer {
		padding: 0.85rem 1.25rem;
		background: #f8f9fa;
		border-top: 1px solid var(--dc-slate-200);
		gap: 0.5rem;
	}

	body.cms-portal .modal-backdrop.show {
		--bs-backdrop-opacity: 0.45;
	}

	body.cms-portal .dropdown-menu {
		border: 1px solid var(--dc-slate-200);
		border-radius: 10px;
		box-shadow: 0 12px 32px rgba(30, 10, 30, 0.14);
	}

	body.cms-portal .dropdown-item:hover,
	body.cms-portal .dropdown-item:focus {
		background: var(--dc-lav-100);
		color: var(--dc-primary);
	}

	body.cms-portal .dropdown-item.active,
	body.cms-portal .dropdown-item:active {
		background: var(--dc-primary);
		color: #fff;
	}

	body.cms-portal .alert {
		border-radius: 10px;
		font-size: 0.875rem;
	}

	body.cms-portal .nav-tabs {
		border-bottom: 1px solid var(--dc-slate-200);
	}

	body.cms-portal .nav-tabs .nav-link {
		border: 0;
		border-bottom: 2px solid transparent;
		color: var(--dc-slate-600);
		font-weight: 600;
	}

	body.cms-portal .nav-tabs .nav-link:hover {
		color: var(--dc-primary);
		border-bottom-color: var(--dc-lav-300);
	}

	body.cms-portal .nav-tabs .nav-link.active {
		background: transparent;
		color: var(--dc-primary);
		border-bottom-color: var(--dc-primary);
	}

	body.cms-portal .nav-pills .nav-link {
		border-radius: 8px;
		color: var(--dc-slate-600);
		font-weight: 600;
	}

	body.cms-portal .nav-pills .nav-link.active {
		background: var(--dc-primary);
		color: #fff;
	}

	body.cms-portal .page-link {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: var(--cms-h-sm);
		height: var(--cms-h-sm);
		padding: 0 0.5rem;
		border-color: var(--dc-slate-200);
		border-radius: 8px;
		margin: 0 2px;
		color: var(--dc-slate-600);
		font-size: 0.8125rem;
		line-height: 1;
	}

	body.cms-portal .page-link:hover {
		background: var(--dc-lav-100);
		border-color: var(--dc-lav-300);
		color: var(--dc-primary);
	}

	body.cms-portal .page-item.active .page-link {
		background: var(--dc-primary);
		border-color: var(--dc-primary);
		color: #fff;
	}

	body.cms-portal .list-group {
		--bs-list-group-active-bg: #800080;
		--bs-list-group-active-border-color: #800080;
	}

	body.cms-portal .list-group-item-action:hover,
	body.cms-portal .list-group-item-action:focus {
		background: var(--dc-lav-100);
		color: var(--dc-primary);
	}

	body.cms-portal .progress-bar {
		background-color: var(--dc-primary);
	}

	body.cms-portal .toast {
		border: 1px solid var(--dc-slate-200);
		border-radius: 10px;
		box-shadow: 0 10px 30px rgba(30, 10, 30, 0.16);
	}

	/* ------------------------------------------------------------------
	 * Module components that carry hard-coded indigo
	 * ---------------------------------------------------------------- */
	body.cms-portal .cms-appt-status-scheduled { background: var(--dc-lav-200); color: var(--dc-primary-dark); }
	body.cms-portal .cms-th-item-date,
	body.cms-portal .cms-td-avatar,
	body.cms-portal .cms-td-material-qty { background: var(--dc-lav-100); color: var(--dc-primary); }
	body.cms-portal .cms-td-material-name i { color: var(--dc-primary); }
	body.cms-portal .cms-td-notes { border-left-color: var(--dc-primary); }
	body.cms-portal .cms-dropzone { border-color: var(--dc-lav-300); background: #fff; }
	body.cms-portal .cms-dropzone.is-dragover,
	body.cms-portal .cms-dropzone:hover { border-color: var(--dc-primary); color: var(--dc-primary); background: var(--dc-lav-50); }
	body.cms-portal .cms-card-toggle,
	body.cms-portal .cms-card-invoice-details { color: var(--dc-primary); }
	body.cms-portal .cms-cb-balance-card {
		background: linear-gradient(160deg, #800080 0%, #4d004d 100%);
		border-radius: 14px;
		box-shadow: 0 8px 24px rgba(128, 0, 128, 0.18);
	}
	body.cms-portal .cms-cb-not-opened-banner {
		border: 1px solid var(--dc-lav-300);
		border-left: 4px solid var(--dc-primary);
		border-radius: 10px;
		background: var(--dc-lav-100);
		color: var(--dc-slate-800);
	}
	body.cms-portal .cms-ledger-count-badge { background: var(--dc-lav-200); color: var(--dc-primary-dark); }
	body.cms-portal .cms-card-chevron { color: var(--dc-primary); }
	body.cms-portal .page-link.active,
	body.cms-portal .active > .page-link { background-color: var(--dc-primary); border-color: var(--dc-primary); color: #fff; }
	body.cms-portal .pagination,
	body.cms-portal .pagination-sm { border-radius: 0; --bs-pagination-border-radius: 8px; }
	body.cms-portal .cms-calendar { border-color: var(--dc-slate-200); border-radius: 12px; }
	body.cms-portal .cms-calendar-head { background: var(--dc-lav-100); color: var(--dc-primary-dark); border-color: var(--dc-lav-200); }
	body.cms-portal .cms-calendar-slot:hover { background: var(--dc-lav-50); }
	body.cms-portal .cms-week-day { border-color: var(--dc-slate-200); border-radius: 10px; }
	body.cms-portal .cms-history-list,
	body.cms-portal .cms-th-item,
	body.cms-portal .cms-td-material,
	body.cms-portal .cms-td-payment { border-color: var(--dc-slate-200); border-radius: 10px; }

	/* ------------------------------------------------------------------
	 * Sign-in page (same SkyDash auth markup, DentaCore skin)
	 * ---------------------------------------------------------------- */
	.container-scroller .full-page-wrapper {
		background: linear-gradient(135deg, #f8f2f8 0%, #efe3ef 50%, #e5d1e5 100%);
	}

	.container-scroller .full-page-wrapper .content-wrapper.auth {
		background: transparent;
		min-height: 100vh;
		padding: 1.5rem 0;
	}

	.container-scroller .cms-auth-card {
		display: grid;
		grid-template-columns: 5fr 7fr;
		background: #fff;
		border: 1px solid var(--dc-lav-300);
		border-radius: 16px;
		box-shadow: 0 20px 45px rgba(128, 0, 128, 0.12);
		overflow: hidden;
	}

	.container-scroller .cms-auth-brand {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding: 2.5rem;
		background: linear-gradient(160deg, #800080 0%, #4d004d 100%);
		color: #fff;
	}

	.container-scroller .cms-auth-brand-mark {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin-bottom: 1.5rem;
		border-radius: 12px;
		background: #fff;
	}

	.container-scroller .cms-auth-brand-mark img {
		width: 30px;
		height: 30px;
		object-fit: contain;
	}

	.container-scroller .cms-auth-brand h3 {
		margin-bottom: 0.85rem;
		font-size: 1.45rem;
		font-weight: 700;
		line-height: 1.25;
		color: #fff;
	}

	.container-scroller .cms-auth-brand-lead {
		margin-bottom: 1.5rem;
		font-size: 0.9rem;
		line-height: 1.6;
		color: rgba(255, 255, 255, 0.9);
	}

	.container-scroller .cms-auth-brand-note {
		display: flex;
		flex-direction: column;
		gap: 0.2rem;
		padding: 1rem;
		border-radius: 12px;
		background: rgba(255, 255, 255, 0.12);
		font-size: 0.82rem;
		color: rgba(255, 255, 255, 0.8);
	}

	.container-scroller .cms-auth-brand-note strong {
		color: #fff;
		font-weight: 600;
	}

	.container-scroller .cms-auth-brand-foot {
		margin-top: 2rem;
		padding-top: 1rem;
		border-top: 1px solid rgba(255, 255, 255, 0.25);
		font-size: 0.78rem;
		color: rgba(255, 255, 255, 0.75);
	}

	.container-scroller .auth-form-light {
		background: #fff;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.container-scroller .auth-form-light .brand-logo {
		margin-bottom: 1.5rem;
	}

	.container-scroller .auth-form-light .brand-logo img {
		max-width: 220px;
		height: auto;
	}

	.container-scroller .auth-form-light h4 {
		font-size: 1.35rem;
		font-weight: 700;
		color: var(--dc-slate-800);
	}

	.container-scroller .auth-form-light h6 {
		font-size: 0.9rem;
		color: #64748b;
	}

	.container-scroller .auth-form-light .form-control.form-control-lg {
		min-height: 46px;
		font-size: 0.95rem;
	}

	.container-scroller .auth-form-light .auth-form-btn {
		padding: 0.7rem 1rem;
		font-size: 0.9rem;
		letter-spacing: 0.04em;
	}

	/* ------------------------------------------------------------------
	 * Card header bar + list pages (filters, table, pager)
	 * ---------------------------------------------------------------- */

	/* A card whose first element is a title gets the reference's header bar:
	   bold title, hairline under it, flush to the card edges. */
	body.cms-portal .card > .card-body > .card-title:first-child {
		margin: -1.15rem -1.25rem 1.15rem;
		padding: 0.95rem 1.2rem;
		border-bottom: 1px solid var(--dc-slate-200);
		font-size: 1rem;
		line-height: 1.3;
	}

	/* List pages: the card holds a toolbar, the table and the pager, all
	   rendered by cms-table.js. Make them read as the reference's filter bar
	   + flush table card. :has() only matches lists that really contain a
	   table, so calendar/detail cards keep their normal padding. */
	body.cms-portal .card > .card-body.cms-list-card-body:has(.cms-table-el) {
		padding: 0;
	}

	body.cms-portal .cms-list-card-body:has(.cms-table-el) > .mb-3 {
		margin-bottom: 0 !important;
		padding: 1rem 1.2rem 0;
	}

	body.cms-portal .cms-list-card-body :has(> .cms-table-search-group) {
		margin: 0 !important;
		padding: 1rem 1.2rem;
		border-bottom: 1px solid var(--dc-slate-200);
	}

	body.cms-portal .cms-list-card-body .cms-table-search-group {
		max-width: 360px !important;
		width: 100%;
	}

	body.cms-portal .cms-list-card-body .cms-table-filters .form-select,
	body.cms-portal .cms-list-card-body .cms-table-filters .form-control {
		min-height: 32px;
	}

	body.cms-portal .cms-list-card-body :has(> .cms-table-pagination) {
		margin: 0 !important;
		padding: 0.85rem 1.2rem;
		border-top: 1px solid var(--dc-slate-200);
	}

	body.cms-portal .cms-table-info {
		font-size: 0.8rem;
	}

	body.cms-portal .cms-list-card-body .table-responsive {
		margin: 0;
	}

	/* Row action buttons are ordinary small buttons (32px) - see the size system above. */
	body.cms-portal .cms-row-actions {
		display: inline-flex;
		justify-content: flex-end;
		gap: 0.35rem;
	}

	/* Reduced motion: no lift on hover, instant sidebar changes. */
	@media (prefers-reduced-motion: reduce) {
		body.cms-portal .card.cms-kpi:hover { transform: none; }
		.container-scroller .sidebar,
		.container-scroller .main-panel,
		.container-scroller .navbar .navbar-menu-wrapper,
		.container-scroller .navbar .navbar-brand-wrapper { transition: none; }
	}
}
