/* ExaGuards desktop windows: one look for every page.
   Loaded on every page, but every rule starts with html.exa-embedded, a class _Host.cshtml puts on the
   document only inside a desktop window, so the pages opened in a person's own tab keep their old look.
   The colours come from the desktop tokens (exa-desktop.css: --inv-*, --accent, --btn, --winbg), which
   switch with data-theme on the html element, so light and dark follow the same rules.
   The Agents list frame (exa-winpage.css) is the reference; this file brings the other widgets
   (Metronic / Bootstrap, Syncfusion, the Invoices theme) to the same look. */

/* ---------- Document surface ---------- */
html.exa-embedded { color-scheme: light; }
html.exa-embedded[data-theme=dark] { color-scheme: dark; }

html.exa-embedded body {
	background: var(--winbg);
	color: var(--inv-text);
	font-family: var(--fb);
}

html.exa-embedded #kt_app_root,
html.exa-embedded #kt_app_page,
html.exa-embedded #kt_app_content,
html.exa-embedded #kt_app_content_container {
	background: transparent;
	color: var(--inv-text);
}

html.exa-embedded * {
	scrollbar-width: thin;
	scrollbar-color: var(--selline) transparent;
}

html.exa-embedded a:not(.btn):not(.e-btn):not(.menu-link):not(.nav-link):not(.dropdown-item) { color: var(--accent); }
html.exa-embedded a:not(.btn):not(.e-btn):not(.menu-link):not(.nav-link):not(.dropdown-item):hover { color: var(--green); }

html.exa-embedded hr { border-color: var(--inv-line); opacity: 1; }

/* ---------- Metronic / Bootstrap variables ----------
   Remapped on the html element so every component that reads them (cards, inputs, tables, menus,
   modals, pagination) follows the desktop palette in both themes. */
html.exa-embedded {
	--kt-primary: #176916;
	--kt-primary-active: #14561A;
	--kt-primary-light: var(--accent-soft);
	--kt-primary-inverse: #FFFFFF;
	--kt-primary-rgb: 23, 105, 22;
	--bs-primary: #176916;
	--bs-primary-rgb: 23, 105, 22;

	--kt-body-bg: var(--winbg);
	--kt-body-color: var(--inv-text);
	--kt-app-bg-color: var(--winbg);
	--bs-body-bg: var(--winbg);
	--bs-body-color: var(--inv-text);
	--bs-border-color: var(--inv-line);
	--kt-border-color: var(--inv-line);
	--kt-border-dashed-color: var(--inv-line);

	--kt-light: var(--inv-soft);
	--kt-light-active: var(--inv-hover);
	--kt-light-inverse: var(--inv-text);

	--kt-gray-100: var(--inv-hover);
	--kt-gray-200: var(--inv-soft);
	--kt-gray-300: var(--inv-line);
	--kt-gray-400: var(--inv-faint);
	--kt-gray-500: var(--inv-faint);
	--kt-gray-600: var(--inv-muted);
	--kt-gray-700: var(--inv-muted);
	--kt-gray-800: var(--inv-text);
	--kt-gray-900: var(--inv-text);
	--bs-gray-100: var(--inv-hover);
	--bs-gray-200: var(--inv-soft);
	--bs-gray-300: var(--inv-line);
	--bs-gray-400: var(--inv-faint);
	--bs-gray-500: var(--inv-faint);
	--bs-gray-600: var(--inv-muted);
	--bs-gray-700: var(--inv-muted);
	--bs-gray-800: var(--inv-text);
	--bs-gray-900: var(--inv-text);

	--kt-text-dark: var(--inv-text);
	--kt-text-muted: var(--inv-faint);
	--kt-text-gray-100: var(--inv-hover);
	--kt-text-gray-200: var(--inv-soft);
	--kt-text-gray-300: var(--inv-line);
	--kt-text-gray-400: var(--inv-faint);
	--kt-text-gray-500: var(--inv-faint);
	--kt-text-gray-600: var(--inv-muted);
	--kt-text-gray-700: var(--inv-muted);
	--kt-text-gray-800: var(--inv-text);
	--kt-text-gray-900: var(--inv-text);

	--kt-card-bg: var(--inv-card);
	--kt-card-border-color: var(--inv-line);
	--kt-card-box-shadow: none;
	--kt-card-cap-bg: transparent;

	--kt-input-bg: var(--inv-card);
	--kt-input-color: var(--inv-text);
	--kt-input-border-color: var(--inv-line);
	--kt-input-placeholder-color: var(--inv-faint);
	--kt-input-disabled-bg: var(--inv-soft);
	--kt-input-disabled-border-color: var(--inv-line);
	--kt-input-focus-bg: var(--inv-card);
	--kt-input-focus-border-color: var(--accent);
	--kt-input-solid-bg: var(--inv-soft);
	--kt-input-solid-bg-focus: var(--inv-card);
	--kt-input-solid-color: var(--inv-text);
	--kt-input-solid-placeholder-color: var(--inv-faint);
	--kt-input-group-addon-bg: var(--inv-soft);
	--kt-input-group-addon-color: var(--inv-muted);

	--kt-form-check-input-bg: var(--inv-card);
	--kt-form-check-input-border: 1px solid var(--inv-line);
	--kt-form-check-input-checked-bg-color: var(--kt-primary);
	--kt-form-check-input-checked-border-color: var(--kt-primary);
	--kt-form-check-input-focus-border: var(--accent);
	--kt-form-check-label-color: var(--inv-text);

	--kt-component-active-bg: var(--kt-primary);
	--kt-component-hover-bg: var(--kt-primary);
	--kt-component-checked-bg: var(--kt-primary);
	--kt-component-active-color: #FFFFFF;
	--kt-component-hover-color: #FFFFFF;
	--kt-link-color: var(--accent);
	--kt-link-hover-color: var(--green);

	--kt-dropdown-bg: var(--inv-card);
	--kt-dropdown-box-shadow: var(--shadow);
	--kt-dropdown-border-color: var(--inv-line);
	--kt-dropdown-link-color: var(--inv-text);
	--kt-dropdown-link-hover-bg: var(--inv-hover);

	--kt-modal-bg: var(--inv-card);
	--kt-modal-box-shadow: var(--shadow);
	--kt-modal-border-color: var(--inv-line);
	--kt-modal-content-bg: var(--inv-card);
	--kt-modal-header-border-color: var(--inv-line);
	--kt-modal-footer-border-color: var(--inv-line);

	--kt-table-color: var(--inv-text);
	--kt-table-bg: transparent;
	--kt-table-border-color: var(--inv-line);
	--kt-table-striped-bg: var(--inv-soft);
	--kt-table-hover-bg: var(--inv-hover);
	--kt-table-hover-color: var(--inv-text);

	--kt-pagination-color: var(--inv-muted);
	--kt-pagination-bg: transparent;
	--kt-pagination-border-color: transparent;
	--kt-pagination-hover-color: var(--accent);
	--kt-pagination-hover-bg: var(--inv-hover);
	--kt-pagination-active-bg: var(--kt-primary);
	--kt-pagination-active-color: #FFFFFF;
	--kt-pagination-disabled-color: var(--inv-faint);
	--kt-pagination-disabled-bg: transparent;

	--kt-nav-tabs-border-color: var(--inv-line);
	--kt-nav-tabs-link-active-bg: var(--inv-card);
	--kt-nav-tabs-link-active-color: var(--accent);

	--kt-menu-link-bg-color-hover: var(--inv-hover);
	--kt-menu-link-bg-color-active: var(--accent-soft);
	--kt-menu-link-color-hover: var(--accent);
	--kt-menu-link-color-active: var(--accent);

	--kt-popover-bg: var(--inv-card);
	--kt-popover-border-color: var(--inv-line);
	--kt-popover-header-bg: var(--inv-soft);
	--kt-popover-body-color: var(--inv-text);

	--kt-accordion-bg: var(--inv-card);
	--kt-accordion-color: var(--inv-text);
	--kt-accordion-border-color: var(--inv-line);
	--kt-accordion-button-bg: var(--inv-card);
	--kt-accordion-button-active-bg: var(--inv-soft);
	--kt-accordion-button-active-color: var(--accent);

	--kt-offcanvas-bg: var(--inv-card);
	--kt-drawer-bg: var(--inv-card);
	--kt-scrollbar-color: var(--selline);
	--kt-scrollbar-hover-color: var(--selline);
}

html.exa-embedded[data-theme=dark] {
	--kt-primary: #1E7B1D;
	--kt-primary-active: #26902A;
	--kt-primary-rgb: 76, 187, 75;
	--bs-primary: #1E7B1D;
	--bs-primary-rgb: 30, 123, 29;
}

html.exa-embedded .bg-white,
html.exa-embedded .bg-body { background-color: var(--inv-card) !important; }
html.exa-embedded .bg-light { background-color: var(--inv-soft) !important; }
html.exa-embedded .bg-hover-light:hover { background-color: var(--inv-hover) !important; }
html.exa-embedded .border-gray-200,
html.exa-embedded .border-gray-300 { border-color: var(--inv-line) !important; }
html.exa-embedded .text-primary,
html.exa-embedded .link-primary,
html.exa-embedded .text-active-primary.active,
html.exa-embedded .text-hover-primary:hover { color: var(--accent) !important; }
html.exa-embedded .text-dark,
html.exa-embedded .text-gray-900,
html.exa-embedded .text-gray-800 { color: var(--inv-text) !important; }
html.exa-embedded .text-gray-700,
html.exa-embedded .text-gray-600 { color: var(--inv-muted) !important; }
html.exa-embedded .text-muted,
html.exa-embedded .text-gray-500,
html.exa-embedded .text-gray-400 { color: var(--inv-faint) !important; }
html.exa-embedded .separator { border-bottom-color: var(--inv-line); }
html.exa-embedded .border { border-color: var(--inv-line) !important; }

/* ---------- Cards ---------- */
html.exa-embedded .card {
	background: var(--inv-card);
	color: var(--inv-text);
	border: 1px solid var(--inv-line);
	border-radius: 10px;
	box-shadow: none;
}
html.exa-embedded .card .card-header {
	background: transparent;
	border-bottom: 1px solid var(--inv-line);
	color: var(--inv-text);
}
html.exa-embedded .card .card-footer {
	background: transparent;
	border-top: 1px solid var(--inv-line);
}
html.exa-embedded .card .card-title,
html.exa-embedded .card .card-label { color: var(--inv-text); }
html.exa-embedded .shadow,
html.exa-embedded .shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, .12) !important; }

/* ---------- Buttons (Bootstrap / Metronic) ---------- */
html.exa-embedded .btn { border-radius: 8px; font-weight: 600; }

html.exa-embedded .btn.btn-primary {
	background: var(--btn);
	border-color: transparent;
	color: #FFFFFF;
}
html.exa-embedded .btn.btn-primary:hover:not(.btn-active),
html.exa-embedded .btn.btn-primary:focus:not(.btn-active),
html.exa-embedded .btn.btn-primary:active:not(.btn-active),
html.exa-embedded .btn.btn-check:checked + .btn.btn-primary,
html.exa-embedded .btn.btn-primary.active {
	background: var(--btn);
	border-color: transparent;
	color: #FFFFFF;
	filter: brightness(1.12);
}
html.exa-embedded .btn.btn-primary i,
html.exa-embedded .btn.btn-primary .svg-icon { color: #FFFFFF; }

html.exa-embedded .btn.btn-light,
html.exa-embedded .btn.btn-secondary,
html.exa-embedded .btn.btn-outline-secondary,
html.exa-embedded .btn.btn-active-light,
html.exa-embedded .btn.btn-bg-light {
	background: transparent;
	border: 1px solid var(--inv-line);
	color: var(--inv-text);
}
html.exa-embedded .btn.btn-light:hover:not(.btn-active),
html.exa-embedded .btn.btn-secondary:hover:not(.btn-active),
html.exa-embedded .btn.btn-outline-secondary:hover:not(.btn-active),
html.exa-embedded .btn.btn-active-light:hover:not(.btn-active),
html.exa-embedded .btn.btn-bg-light:hover:not(.btn-active),
html.exa-embedded .btn.btn-light:focus:not(.btn-active),
html.exa-embedded .btn.btn-secondary:focus:not(.btn-active) {
	background: var(--inv-hover);
	border-color: var(--inv-line);
	color: var(--inv-text);
}
html.exa-embedded .btn.btn-light i,
html.exa-embedded .btn.btn-secondary i { color: var(--inv-muted); }

html.exa-embedded .btn.btn-light-primary {
	background: var(--accent-soft);
	border-color: transparent;
	color: var(--accent);
}
html.exa-embedded .btn.btn-light-primary:hover:not(.btn-active),
html.exa-embedded .btn.btn-active-light-primary:hover:not(.btn-active),
html.exa-embedded .btn.btn-light-primary.active {
	background: var(--btn);
	color: #FFFFFF;
}
html.exa-embedded .btn.btn-active-color-primary:hover:not(.btn-active) i,
html.exa-embedded .btn.btn-active-color-primary:hover:not(.btn-active) { color: var(--accent); }
html.exa-embedded .btn-close { filter: none; }
html.exa-embedded[data-theme=dark] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }

/* ---------- Forms ---------- */
html.exa-embedded .form-control,
html.exa-embedded .form-select,
html.exa-embedded .input-group-text {
	background-color: var(--inv-card);
	border: 1px solid var(--inv-line);
	border-radius: 8px;
	color: var(--inv-text);
}
html.exa-embedded .input-group-text { background-color: var(--inv-soft); color: var(--inv-muted); }
html.exa-embedded .form-control.form-control-solid,
html.exa-embedded .form-select.form-select-solid {
	background-color: var(--inv-soft);
	border-color: transparent;
	color: var(--inv-text);
}
html.exa-embedded .form-control:focus,
html.exa-embedded .form-select:focus,
html.exa-embedded .form-control.form-control-solid:focus,
html.exa-embedded .form-select.form-select-solid:focus {
	background-color: var(--inv-card);
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
	color: var(--inv-text);
}
html.exa-embedded .form-control::placeholder,
html.exa-embedded textarea::placeholder { color: var(--inv-faint); opacity: 1; }
html.exa-embedded .form-control:disabled,
html.exa-embedded .form-select:disabled,
html.exa-embedded .form-control[readonly] { background-color: var(--inv-soft); color: var(--inv-muted); opacity: 1; }
html.exa-embedded .form-label,
html.exa-embedded .col-form-label,
html.exa-embedded .form-check-label { color: var(--inv-muted); }
html.exa-embedded .form-check-input { background-color: var(--inv-card); border: 1px solid var(--inv-line); }
html.exa-embedded .form-check-input:checked { background-color: var(--kt-primary); border-color: var(--kt-primary); }
html.exa-embedded[data-theme=dark] .form-select {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23A9C4AF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ---------- Tables (plain tables) ---------- */
html.exa-embedded .table { color: var(--inv-text); border-color: var(--inv-line); }
html.exa-embedded .table > :not(caption) > * > * {
	background-color: transparent;
	border-bottom-color: var(--inv-line);
	color: var(--inv-text);
	box-shadow: none;
}
html.exa-embedded .table > thead > tr > th,
html.exa-embedded .table > thead > tr > td {
	background-color: var(--inv-soft);
	color: var(--inv-muted);
	font-weight: 600;
}
html.exa-embedded .table-hover > tbody > tr:hover > *,
html.exa-embedded .table.table-row-bordered tbody tr:hover > * { background-color: var(--inv-hover); }
html.exa-embedded .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: var(--inv-soft); }
html.exa-embedded .table-row-dashed tbody tr,
html.exa-embedded .table-row-bordered tbody tr { border-bottom-color: var(--inv-line); }

/* ---------- Modals, dropdowns, tabs, badges, alerts ---------- */
html.exa-embedded .modal-content {
	background: var(--inv-card);
	color: var(--inv-text);
	border: 1px solid var(--inv-line);
	border-radius: 12px;
	box-shadow: var(--shadow);
}
html.exa-embedded .modal-header { border-bottom: 1px solid var(--inv-line); }
html.exa-embedded .modal-footer { border-top: 1px solid var(--inv-line); }
html.exa-embedded .modal-title { color: var(--inv-text); font-weight: 700; }

html.exa-embedded .dropdown-menu,
html.exa-embedded .menu-sub-dropdown {
	background: var(--inv-card);
	color: var(--inv-text);
	border: 1px solid var(--inv-line);
	border-radius: 8px;
	box-shadow: var(--shadow);
}
html.exa-embedded .dropdown-item { color: var(--inv-text); }
html.exa-embedded .dropdown-item:hover,
html.exa-embedded .dropdown-item:focus { background: var(--inv-hover); color: var(--inv-text); }
html.exa-embedded .dropdown-divider { border-top-color: var(--inv-line); }
html.exa-embedded .menu-sub .menu-link { color: var(--inv-text); }
html.exa-embedded .menu-sub .menu-link:hover { background: var(--inv-hover); color: var(--accent); }

html.exa-embedded .nav-tabs { border-bottom-color: var(--inv-line); }
html.exa-embedded .nav-line-tabs { border-bottom-color: var(--inv-line); }
html.exa-embedded .nav-line-tabs .nav-item .nav-link { color: var(--inv-muted); }
html.exa-embedded .nav-line-tabs .nav-item .nav-link.active,
html.exa-embedded .nav-line-tabs .nav-item .show > .nav-link,
html.exa-embedded .nav-line-tabs .nav-item .nav-link:hover:not(.disabled) {
	color: var(--accent);
	border-bottom-color: var(--accent);
}
html.exa-embedded .nav-tabs .nav-link { color: var(--inv-muted); }
html.exa-embedded .nav-tabs .nav-link.active {
	background: var(--inv-card);
	border-color: var(--inv-line) var(--inv-line) var(--inv-card);
	color: var(--accent);
}
html.exa-embedded .nav-pills .nav-link.active,
html.exa-embedded .nav-pills .show > .nav-link { background: var(--accent-soft); color: var(--accent); }

html.exa-embedded .badge.badge-light-primary { background: var(--accent-soft); color: var(--accent); }
html.exa-embedded .badge.badge-primary { background: var(--kt-primary); color: #FFFFFF; }
html.exa-embedded .page-link { background: transparent; border-color: transparent; color: var(--inv-muted); }
html.exa-embedded .page-item.active .page-link { background: var(--kt-primary); color: #FFFFFF; }
html.exa-embedded .page-item .page-link:hover { background: var(--inv-hover); color: var(--accent); }
html.exa-embedded .progress { background: var(--inv-soft); }
html.exa-embedded .bg-primary { background-color: var(--kt-primary) !important; }

/* The shell's own tab style (DesktopShell.razor) is light only */
html.exa-embedded .custom-tab > .e-tab-header .e-toolbar-items { background: var(--inv-soft); border-radius: 8px; }
html.exa-embedded .custom-tab > .e-tab-header .e-toolbar-item.e-active { background: var(--inv-card); border: 1px solid var(--inv-line) !important; }
html.exa-embedded .custom-tab > .e-tab-header .e-toolbar-item .e-tab-wrap,
html.exa-embedded .custom-tab > .e-tab-header .e-toolbar-item .e-tab-text { color: var(--inv-text); }
html.exa-embedded .custom-tab .e-content { background: transparent; }

/* ---------- Syncfusion: grid ---------- */
html.exa-embedded .e-grid {
	background-color: var(--inv-card);
	border: 1px solid var(--inv-line);
	border-radius: 10px;
	color: var(--inv-text);
	font-family: var(--fb);
	overflow: hidden;
}
html.exa-embedded .e-grid .e-gridheader,
html.exa-embedded .e-grid .e-headercontent {
	background-color: var(--inv-soft);
	border-bottom: 1px solid var(--inv-line);
	border-top: 0;
}
html.exa-embedded .e-grid .e-headercell,
html.exa-embedded .e-grid .e-detailheadercell {
	background-color: var(--inv-soft);
	border-color: var(--inv-line);
	color: var(--inv-muted);
	font-size: 12px;
	font-weight: 600;
}
html.exa-embedded .e-grid .e-headercell .e-headertext,
html.exa-embedded .e-grid .e-headercell .e-sortfilterdiv,
html.exa-embedded .e-grid .e-headercell .e-icons { color: var(--inv-muted); }
html.exa-embedded .e-grid .e-gridcontent,
html.exa-embedded .e-grid .e-content { background-color: var(--inv-card); }
html.exa-embedded .e-grid .e-table,
html.exa-embedded .e-grid .e-headercontent,
html.exa-embedded .e-grid .e-gridheader .e-table {
	background-color: transparent;
	border-color: var(--inv-line);
}
html.exa-embedded .e-grid .e-rowcell,
html.exa-embedded .e-grid .e-summarycell,
html.exa-embedded .e-grid .e-detailrowcollapse,
html.exa-embedded .e-grid .e-detailrowexpand {
	background-color: var(--inv-card);
	border-color: var(--inv-line);
}
/* Syncfusion paints the cell text with :not(...):not(...) selectors that out-rank a plain override; a cell with its own inline colour keeps it */
html.exa-embedded .e-grid .e-rowcell:not([style*="color"]),
html.exa-embedded .e-grid .e-summarycell:not([style*="color"]),
html.exa-embedded .e-grid .e-detailrowcollapse,
html.exa-embedded .e-grid .e-detailrowexpand {
	color: var(--inv-text) !important;
}
html.exa-embedded .e-grid .e-altrow .e-rowcell { background-color: var(--inv-card); }
html.exa-embedded .e-grid.e-gridhover .e-row:hover .e-rowcell:not(.e-active):not(.e-cellselectionbackground):not([style*="background"]),
html.exa-embedded .e-grid .e-row:hover .e-rowcell:not(.e-active):not(.e-cellselectionbackground):not([style*="background"]) {
	background-color: var(--inv-hover) !important;
	color: var(--inv-text) !important;
}
html.exa-embedded .e-grid .e-row .e-rowcell.e-active,
html.exa-embedded .e-grid .e-row .e-rowcell.e-cellselectionbackground,
html.exa-embedded .e-grid .e-row[aria-selected=true] .e-rowcell:not([style*="background"]) {
	background-color: var(--accent-soft) !important;
	color: var(--inv-text) !important;
}
html.exa-embedded .e-grid .e-emptyrow td { color: var(--inv-faint); background-color: var(--inv-card); }
html.exa-embedded .e-grid .e-filterbarcell,
html.exa-embedded .e-grid .e-groupdroparea {
	background-color: var(--inv-soft);
	border-color: var(--inv-line);
	color: var(--inv-muted);
}
html.exa-embedded .e-grid .e-toolbar { background-color: var(--inv-card) !important; border-color: var(--inv-line); }
html.exa-embedded .e-grid .e-pager,
html.exa-embedded .e-grid .e-gridpager {
	background-color: var(--inv-card);
	border-color: var(--inv-line);
	color: var(--inv-muted);
}
html.exa-embedded .e-grid .e-columnheader .e-icons:hover { color: var(--accent); }

/* ---------- Syncfusion: pager ---------- */
html.exa-embedded .e-pager {
	background-color: var(--inv-card);
	border-color: var(--inv-line);
	color: var(--inv-muted);
}
html.exa-embedded .e-pager .e-pagercontainer {
	background-color: transparent;
	border-color: var(--inv-line);
}
html.exa-embedded .e-pager div.e-parentmsgbar,
html.exa-embedded .e-pager .e-pagerconstant,
html.exa-embedded .e-pager .e-pagesizes .e-pagerconstant { color: var(--inv-muted); }
html.exa-embedded .e-pager .e-numericitem:not(.e-currentitem),
html.exa-embedded .e-pager .e-pp:not(.e-disable),
html.exa-embedded .e-pager .e-np:not(.e-disable),
html.exa-embedded .e-pager .e-pp:not(.e-disable) .e-icons,
html.exa-embedded .e-pager .e-np:not(.e-disable) .e-icons,
html.exa-embedded .e-pager .e-first:not(.e-disable),
html.exa-embedded .e-pager .e-prev:not(.e-disable),
html.exa-embedded .e-pager .e-next:not(.e-disable),
html.exa-embedded .e-pager .e-last:not(.e-disable) {
	background-color: transparent;
	color: var(--inv-muted);
}
html.exa-embedded .e-pager .e-numericitem:not(.e-currentitem):hover,
html.exa-embedded .e-pager .e-pp:not(.e-disable):hover,
html.exa-embedded .e-pager .e-np:not(.e-disable):hover,
html.exa-embedded .e-pager .e-first:not(.e-disable):hover,
html.exa-embedded .e-pager .e-prev:not(.e-disable):hover,
html.exa-embedded .e-pager .e-next:not(.e-disable):hover,
html.exa-embedded .e-pager .e-last:not(.e-disable):hover {
	background-color: var(--inv-hover);
	color: var(--accent);
}
html.exa-embedded .e-pager .e-numericitem.e-currentitem,
html.exa-embedded .e-pager .e-numericitem.e-currentitem:hover {
	background: var(--btn);
	border-radius: 6px;
	color: #FFFFFF;
}
html.exa-embedded .e-pager .e-disable,
html.exa-embedded .e-pager .e-disable .e-icons { color: var(--inv-faint); opacity: .6; }

/* ---------- Syncfusion: dialog ---------- */
html.exa-embedded .e-dialog {
	background-color: var(--inv-card);
	border: 1px solid var(--inv-line);
	border-radius: 12px;
	box-shadow: var(--shadow);
	color: var(--inv-text);
	font-family: var(--fb);
}
html.exa-embedded .e-dialog .e-dlg-header-content {
	background-color: var(--inv-card);
	border-bottom: 1px solid var(--inv-line);
	border-radius: 12px 12px 0 0;
	color: var(--inv-text);
}
html.exa-embedded .e-dialog .e-dlg-header { color: var(--inv-text); font-weight: 700; }
html.exa-embedded .e-dialog .e-dlg-content { background-color: var(--inv-card); color: var(--inv-text); }
html.exa-embedded .e-dialog .e-footer-content {
	background-color: var(--inv-card);
	border-top: 1px solid var(--inv-line);
	border-radius: 0 0 12px 12px;
}
html.exa-embedded .e-dialog .e-dlg-closeicon-btn { color: var(--inv-muted); background: transparent; border-color: transparent; }
html.exa-embedded .e-dialog .e-dlg-closeicon-btn:hover { background: var(--inv-hover); color: var(--inv-text); }
html.exa-embedded .e-dialog .e-dlg-closeicon-btn .e-icons { color: inherit; }
html.exa-embedded .e-dlg-overlay { background-color: rgba(8, 16, 11, .45); opacity: 1; }
html.exa-embedded[data-theme=dark] .e-dlg-overlay { background-color: rgba(0, 0, 0, .6); }

/* ---------- A window that shows one record (opened by a "view in a new window" button) ----------
   The address of such a window ends in ?exaopen=kind:id: the list page opens that record's popup by itself. _Host marks the page "exa-recordonly" at once,
   so the list is never drawn; exa-desktop.js (watchRecord) marks the record's popup "exa-ro-main" and closes the window when the popup is closed.
   The popup fills the window. Popups that open on top of it (a confirmation, an edit form) keep their own size. */
html.exa-recordonly #kt_app_root { visibility: hidden; }
html.exa-recordonly .e-dlg-container { visibility: visible; }
html.exa-recordonly .e-dlg-container .e-dlg-overlay { background-color: transparent !important; }
html.exa-recordonly .e-dialog.exa-ro-main {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	min-width: 0 !important;
	top: 0 !important;
	left: 0 !important;
	margin: 0 !important;
	border-radius: 0;
	border: 0;
	box-shadow: none;
}

/* ---------- Syncfusion: inputs ---------- */
html.exa-embedded .e-input-group,
html.exa-embedded .e-input-group.e-control-wrapper,
html.exa-embedded .e-float-input,
html.exa-embedded .e-float-input.e-control-wrapper {
	background-color: var(--inv-card);
	border-color: var(--inv-line);
	border-radius: 8px;
	color: var(--inv-text);
}
html.exa-embedded .e-input-group input.e-input,
html.exa-embedded .e-input-group.e-control-wrapper input.e-input,
html.exa-embedded .e-input-group textarea.e-input,
html.exa-embedded .e-float-input input,
html.exa-embedded .e-float-input textarea,
html.exa-embedded input.e-input,
html.exa-embedded textarea.e-input {
	background-color: transparent;
	color: var(--inv-text);
}
html.exa-embedded input.e-input,
html.exa-embedded textarea.e-input,
html.exa-embedded .e-input-group,
html.exa-embedded .e-input-group.e-control-wrapper { border-color: var(--inv-line); }
html.exa-embedded .e-input-group input.e-input::placeholder,
html.exa-embedded input.e-input::placeholder,
html.exa-embedded textarea.e-input::placeholder { color: var(--inv-faint); }
html.exa-embedded .e-input-group.e-input-focus,
html.exa-embedded .e-input-group.e-control-wrapper.e-input-focus,
html.exa-embedded .e-float-input.e-input-focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}
html.exa-embedded .e-input-group .e-input-group-icon,
html.exa-embedded .e-input-group.e-control-wrapper .e-input-group-icon {
	background: transparent;
	border-color: var(--inv-line);
	color: var(--inv-muted);
}
html.exa-embedded .e-input-group .e-input-group-icon:hover,
html.exa-embedded .e-input-group.e-control-wrapper .e-input-group-icon:hover { background: var(--inv-hover); color: var(--accent); }
html.exa-embedded .e-float-input label.e-float-text,
html.exa-embedded .e-float-input.e-control-wrapper label.e-float-text,
html.exa-embedded .e-float-input .e-float-text { color: var(--inv-faint); }
html.exa-embedded .e-float-input.e-input-focus label.e-float-text,
html.exa-embedded .e-float-input.e-input-focus .e-float-text { color: var(--accent); }
html.exa-embedded .e-input-group.e-disabled,
html.exa-embedded .e-input-group.e-control-wrapper.e-disabled { background-color: var(--inv-soft); }

/* ---------- Syncfusion: popups, lists, dropdown menus ---------- */
html.exa-embedded .e-popup,
html.exa-embedded .e-dropdown-popup,
html.exa-embedded .e-ddl.e-popup {
	background-color: var(--inv-card);
	border: 1px solid var(--inv-line);
	border-radius: 8px;
	box-shadow: var(--shadow);
	color: var(--inv-text);
}
html.exa-embedded .e-popup .e-content,
html.exa-embedded .e-dropdown-popup ul,
html.exa-embedded .e-popup .e-list-parent { background-color: var(--inv-card); color: var(--inv-text); }
html.exa-embedded .e-popup .e-list-item,
html.exa-embedded .e-dropdown-popup ul .e-item,
html.exa-embedded .e-popup .e-list-group-item {
	background-color: transparent;
	color: var(--inv-text);
}
html.exa-embedded .e-popup .e-list-item.e-hover,
html.exa-embedded .e-popup .e-list-item:hover,
html.exa-embedded .e-popup .e-list-item.e-item-focus,
html.exa-embedded .e-dropdown-popup ul .e-item:hover,
html.exa-embedded .e-dropdown-popup ul .e-item.e-focused {
	background-color: var(--inv-hover);
	color: var(--inv-text);
}
html.exa-embedded .e-popup .e-list-item.e-active,
html.exa-embedded .e-popup .e-list-item.e-active.e-hover,
html.exa-embedded .e-popup .e-list-item.e-active:hover,
html.exa-embedded .e-dropdown-popup ul .e-item.e-selected {
	background-color: var(--accent-soft);
	color: var(--accent);
}
html.exa-embedded .e-popup .e-list-group-item,
html.exa-embedded .e-popup .e-list-header { background-color: var(--inv-soft); color: var(--inv-muted); }
html.exa-embedded .e-dropdown-popup ul .e-item .e-menu-icon { color: var(--inv-muted); }
html.exa-embedded .e-dropdown-popup ul .e-separator { border-bottom-color: var(--inv-line); }
html.exa-embedded .e-ddl .e-input-group-icon,
html.exa-embedded .e-multi-select-wrapper .e-ddl-icon { color: var(--inv-muted); }
html.exa-embedded .e-multi-select-wrapper .e-chips { background-color: var(--accent-soft); color: var(--accent); border-radius: 6px; }
html.exa-embedded .e-multi-select-wrapper .e-chips > .e-chipcontent { color: var(--accent); }

/* ---------- Syncfusion: buttons ---------- */
html.exa-embedded .e-btn { border-radius: 8px; font-family: var(--fb); font-weight: 600; }

html.exa-embedded .e-btn.e-primary:not(.e-outline):not(.e-flat),
html.exa-embedded .e-btn.e-success:not(.e-outline):not(.e-flat),
html.exa-embedded .e-btn.e-primary:not(.e-outline):not(.e-flat):focus,
html.exa-embedded .e-btn.e-success:not(.e-outline):not(.e-flat):focus {
	background: var(--btn);
	border-color: transparent;
	color: #FFFFFF;
}
html.exa-embedded .e-btn.e-primary:not(.e-outline):not(.e-flat):hover,
html.exa-embedded .e-btn.e-success:not(.e-outline):not(.e-flat):hover,
html.exa-embedded .e-btn.e-primary:not(.e-outline):not(.e-flat):active,
html.exa-embedded .e-btn.e-success:not(.e-outline):not(.e-flat):active {
	background: var(--btn);
	border-color: transparent;
	color: #FFFFFF;
	filter: brightness(1.12);
}
html.exa-embedded .e-btn.e-primary:not(.e-outline):not(.e-flat) .e-btn-icon,
html.exa-embedded .e-btn.e-success:not(.e-outline):not(.e-flat) .e-btn-icon { color: #FFFFFF; }
html.exa-embedded .e-btn.e-primary:disabled,
html.exa-embedded .e-btn.e-success:disabled { opacity: .55; filter: none; }

html.exa-embedded .e-btn.e-light,
html.exa-embedded .e-btn:not(.e-primary):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info):not(.e-link):not(.e-flat):not(.e-outline):not(.e-orange):not(.e-icon-btn):not(.e-round):not([class*="dv-"]):not([class*="wp-"]) {
	background: transparent;
	border: 1px solid var(--inv-line);
	color: var(--inv-text);
}
html.exa-embedded .e-btn.e-light:hover,
html.exa-embedded .e-btn.e-light:focus,
html.exa-embedded .e-btn.e-light:active,
html.exa-embedded .e-btn:not(.e-primary):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info):not(.e-link):not(.e-flat):not(.e-outline):not(.e-orange):not(.e-icon-btn):not(.e-round):not([class*="dv-"]):not([class*="wp-"]):hover,
html.exa-embedded .e-btn:not(.e-primary):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info):not(.e-link):not(.e-flat):not(.e-outline):not(.e-orange):not(.e-icon-btn):not(.e-round):not([class*="dv-"]):not([class*="wp-"]):focus {
	background: var(--inv-hover);
	border-color: var(--inv-line);
	color: var(--inv-text);
}
html.exa-embedded .e-btn.e-light .e-btn-icon { color: var(--inv-muted); }
html.exa-embedded .e-btn.e-outline.e-primary { color: var(--accent); border-color: var(--accent); background: transparent; }
html.exa-embedded .e-btn.e-flat.e-primary,
html.exa-embedded .e-btn.e-link { color: var(--accent); }

/* ---------- Syncfusion: tabs, toolbar, accordion ---------- */
html.exa-embedded .e-tab { background: transparent; border-color: var(--inv-line); }
html.exa-embedded .e-tab .e-tab-header,
html.exa-embedded .e-tab .e-tab-header .e-toolbar-items { background: transparent; }
html.exa-embedded .e-tab .e-tab-header::before { border-color: var(--inv-line); }
html.exa-embedded .e-tab .e-tab-header .e-toolbar-item .e-tab-text,
html.exa-embedded .e-tab .e-tab-header .e-toolbar-item .e-tab-icon { color: var(--inv-muted); }
html.exa-embedded .e-tab .e-tab-header .e-toolbar-item:hover .e-tab-text,
html.exa-embedded .e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-text,
html.exa-embedded .e-tab .e-tab-header .e-toolbar-item.e-active .e-tab-icon { color: var(--accent); }
html.exa-embedded .e-tab .e-tab-header .e-indicator { background: var(--accent); }
html.exa-embedded .e-tab .e-content { background: transparent; color: var(--inv-text); }
html.exa-embedded .e-tab .e-tab-header .e-hor-nav { background: var(--inv-card); }

html.exa-embedded .e-toolbar { border-color: var(--inv-line); color: var(--inv-text); }
html.exa-embedded .e-toolbar .e-toolbar-items { background: transparent; }
html.exa-embedded .e-toolbar .e-toolbar-item .e-tbar-btn { background: transparent; color: var(--inv-muted); border-radius: 6px; }
html.exa-embedded .e-toolbar .e-toolbar-item .e-tbar-btn:hover { background: var(--inv-hover); color: var(--inv-text); }
html.exa-embedded .e-toolbar .e-toolbar-item .e-tbar-btn .e-icons,
html.exa-embedded .e-toolbar .e-toolbar-item .e-tbar-btn-text { color: inherit; }

html.exa-embedded .e-accordion { background: var(--inv-card); border-color: var(--inv-line); }
html.exa-embedded .e-accordion .e-acrdn-item { background: var(--inv-card); border-color: var(--inv-line); }
html.exa-embedded .e-accordion .e-acrdn-item .e-acrdn-header,
html.exa-embedded .e-accordion .e-acrdn-item.e-select > .e-acrdn-header { background: var(--inv-soft); color: var(--inv-text); }
html.exa-embedded .e-accordion .e-acrdn-item .e-acrdn-header .e-acrdn-header-content { color: var(--inv-text); }
html.exa-embedded .e-accordion .e-acrdn-item .e-acrdn-panel,
html.exa-embedded .e-accordion .e-acrdn-item > .e-toggle-animation .e-acrdn-content { background: var(--inv-card); color: var(--inv-text); }
html.exa-embedded .e-accordion .e-acrdn-item .e-toggle-icon { color: var(--inv-muted); }

/* ---------- Syncfusion: calendar and date pickers ---------- */
html.exa-embedded .e-calendar,
html.exa-embedded .e-bigger .e-calendar {
	background-color: var(--inv-card);
	color: var(--inv-text);
}
html.exa-embedded .e-calendar .e-header,
html.exa-embedded .e-calendar .e-header .e-title { background-color: var(--inv-card); color: var(--inv-text); }
html.exa-embedded .e-calendar .e-header .e-icon-container .e-prev,
html.exa-embedded .e-calendar .e-header .e-icon-container .e-next { color: var(--inv-muted); }
html.exa-embedded .e-calendar .e-content th,
html.exa-embedded .e-calendar .e-content td.e-other-month > span.e-day { color: var(--inv-faint); }
html.exa-embedded .e-calendar .e-content td .e-day { color: var(--inv-text); }
html.exa-embedded .e-calendar .e-content td:hover .e-day,
html.exa-embedded .e-calendar .e-content td.e-focused-date .e-day { background-color: var(--inv-hover); color: var(--inv-text); }
html.exa-embedded .e-calendar .e-content td.e-selected .e-day,
html.exa-embedded .e-calendar .e-content td.e-selected:hover .e-day { background: var(--btn); color: #FFFFFF; }
html.exa-embedded .e-calendar .e-content td.e-today .e-day { border: 1px solid var(--accent); color: var(--accent); }
html.exa-embedded .e-calendar .e-footer-container { background: var(--inv-card); border-top: 1px solid var(--inv-line); }
html.exa-embedded .e-calendar .e-footer-container .e-btn { color: var(--accent); }
html.exa-embedded .e-datepicker.e-popup-wrapper,
html.exa-embedded .e-datetimepicker.e-popup-wrapper,
html.exa-embedded .e-daterangepicker.e-popup { background: var(--inv-card); border-color: var(--inv-line); }
html.exa-embedded .e-timepicker.e-popup .e-list-item { color: var(--inv-text); }

/* ---------- Syncfusion: check, radio, switch ---------- */
html.exa-embedded .e-checkbox-wrapper .e-label,
html.exa-embedded .e-radio + label,
html.exa-embedded .e-switch-wrapper ~ .e-label { color: var(--inv-text); }
html.exa-embedded .e-checkbox-wrapper .e-frame { background-color: var(--inv-card); border-color: var(--inv-line); }
html.exa-embedded .e-checkbox-wrapper .e-frame.e-check,
html.exa-embedded .e-checkbox-wrapper .e-frame.e-stop {
	background-color: var(--kt-primary);
	border-color: var(--kt-primary);
	color: #FFFFFF;
}
html.exa-embedded .e-radio + label::before { background-color: var(--inv-card); border-color: var(--inv-line); }
html.exa-embedded .e-radio:checked + label::before { border-color: var(--kt-primary); }
html.exa-embedded .e-radio:checked + label::after { background-color: var(--kt-primary); }
html.exa-embedded .e-switch-wrapper .e-switch-inner { background-color: var(--inv-line); border-color: var(--inv-line); }
html.exa-embedded .e-switch-wrapper .e-switch-inner.e-switch-active { background-color: var(--kt-primary); border-color: var(--kt-primary); }
html.exa-embedded .e-switch-wrapper .e-switch-handle { background-color: #FFFFFF; }

/* ---------- Syncfusion: tooltip, toast, spinner, misc ---------- */
html.exa-embedded .e-spinner-pane.e-spin-show { background-color: rgba(246, 251, 245, .55); }
html.exa-embedded[data-theme=dark] .e-spinner-pane.e-spin-show { background-color: rgba(15, 28, 20, .6); }
html.exa-embedded .e-card { background-color: var(--inv-card); border-color: var(--inv-line); color: var(--inv-text); }
html.exa-embedded .e-card .e-card-header,
html.exa-embedded .e-card .e-card-content { color: var(--inv-text); }
html.exa-embedded .e-treeview .e-list-text,
html.exa-embedded .e-treeview .e-icons { color: var(--inv-text); }
html.exa-embedded .e-treeview .e-list-item.e-hover > .e-fullrow { background-color: var(--inv-hover); }
html.exa-embedded .e-treeview .e-list-item.e-active > .e-fullrow { background-color: var(--accent-soft); }
html.exa-embedded .e-richtexteditor,
html.exa-embedded .e-richtexteditor .e-rte-content { background-color: var(--inv-card); border-color: var(--inv-line); color: var(--inv-text); }
html.exa-embedded .e-richtexteditor .e-toolbar-wrapper,
html.exa-embedded .e-richtexteditor .e-toolbar { background-color: var(--inv-soft) !important; }

/* ---------- Invoices theme (.inv-*) ----------
   Its tokens are blue and purple and light only; they follow the desktop palette here, and the
   surfaces it paints with a plain white follow the theme. */
/* The desktop palette uses the same --inv-* names, and .inv-scope redeclares them on its own element, so the desktop values are aliased on the root first and .inv-scope takes them from the aliases */
html.exa-embedded {
	--ex-text: var(--inv-text);
	--ex-muted: var(--inv-muted);
	--ex-faint: var(--inv-faint);
	--ex-line: var(--inv-line);
	--ex-soft: var(--inv-soft);
	--ex-good: var(--inv-good);
	--ex-good-soft: var(--inv-good-soft);
	--ex-warn: var(--inv-warn);
	--ex-warn-soft: var(--inv-warn-soft);
	--ex-amber: var(--inv-amber);
	--ex-amber-soft: var(--inv-amber-soft);
}
html.exa-embedded .inv-scope {
	--inv-text: var(--ex-text);
	--inv-muted: var(--ex-muted);
	--inv-faint: var(--ex-faint);
	--inv-line: var(--ex-line);
	--inv-soft: var(--ex-soft);
	--inv-accent: var(--accent);
	--inv-accent-soft: var(--accent-soft);
	--inv-good: var(--ex-good);
	--inv-good-soft: var(--ex-good-soft);
	--inv-warn: var(--ex-warn);
	--inv-warn-soft: var(--ex-warn-soft);
	--inv-amber: var(--ex-amber);
	--inv-amber-soft: var(--ex-amber-soft);
}
html.exa-embedded .inv-scope .inv-btn--primary { background: var(--btn); border-color: transparent; color: #FFFFFF; }
html.exa-embedded[data-theme=dark] .inv-scope .inv-btn,
html.exa-embedded[data-theme=dark] .inv-scope .inv-stat,
html.exa-embedded[data-theme=dark] .inv-scope .inv-search input,
html.exa-embedded[data-theme=dark] .inv-scope .inv-seg,
html.exa-embedded[data-theme=dark] .inv-scope .inv-tablewrap,
html.exa-embedded[data-theme=dark] .inv-scope .inv-card,
html.exa-embedded[data-theme=dark] .inv-scope textarea.inv-input,
html.exa-embedded[data-theme=dark] .inv-scope .inv-line__name:focus,
html.exa-embedded[data-theme=dark] .inv-scope .inv-line__num:focus,
html.exa-embedded[data-theme=dark] .inv-scope .inv-thumb,
html.exa-embedded[data-theme=dark] .inv-scope .inv-thumb img,
html.exa-embedded[data-theme=dark] .inv-scope .inv-taxsel,
html.exa-embedded[data-theme=dark] .inv-scope .inv-step,
html.exa-embedded[data-theme=dark] .inv-scope .inv-fcard,
html.exa-embedded[data-theme=dark] .inv-scope .inv-tld,
html.exa-embedded[data-theme=dark] .inv-scope .inv-grouprow__pic {
	background: var(--inv-card);
	border-color: var(--inv-line);
	color: var(--inv-text);
}
html.exa-embedded[data-theme=dark] .inv-scope .inv-btn--primary { background: var(--btn); border-color: transparent; color: #FFFFFF; }
html.exa-embedded[data-theme=dark] .inv-scope .inv-btn:hover { background: var(--inv-hover); border-color: var(--inv-faint); }
html.exa-embedded .inv-scope .inv-btn--primary:hover { background: var(--btn); filter: brightness(1.08); }
html.exa-embedded[data-theme=dark] .inv-scope .inv-btn--primary:hover { background: var(--btn); border-color: transparent; filter: brightness(1.12); }
html.exa-embedded[data-theme=dark] .inv-scope .inv-table td { border-bottom-color: var(--inv-line); }
html.exa-embedded[data-theme=dark] .inv-scope .inv-table tbody tr.inv-grouprow:hover > td { background: var(--inv-hover); }
html.exa-embedded[data-theme=dark] .inv-scope .inv-typeicon { background: var(--inv-soft); }
html.exa-embedded[data-theme=dark] .inv-scope .inv-dot { background: var(--inv-line); }
html.exa-embedded .inv-scope .inv-input,
html.exa-embedded .inv-scope select.inv-input,
html.exa-embedded .inv-scope .inv-search input { color: var(--inv-text); }
html.exa-embedded[data-theme=dark] .inv-scope .inv-input,
html.exa-embedded[data-theme=dark] .inv-scope select.inv-input { background: var(--inv-card); border-color: var(--inv-line); }

/* ---------- AI Assistant page (/assistant) ----------
   The page is sized for a browser tab (the chat box is 100vh - 150px high inside padding), which left a blank band under it in a window.
   Inside a window the assistant fills the whole window instead: the page is a column the height of the window and the chat box takes what is left. */
html.exa-embedded .ai-scope:not(.ai-dockwrap) {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	padding: 8px 0;
}

html.exa-embedded .ai-scope:not(.ai-dockwrap) > .ai-shell:not(.ai-shell--dock) {
	flex: 1 1 auto;
	height: auto;
	min-height: 0;
}

/* ---------- Reconnect and error cards (_Master.cshtml) ---------- */
html.exa-embedded[data-theme=dark] .rc-card,
html.exa-embedded[data-theme=dark] .ee-fatal-card { background: var(--inv-card); color: var(--inv-text); border-color: var(--inv-line); }
