/*
 * @futurity/design — classic/jqwidgets.css: jQWidgets adapter for the Fty look.
 *
 * WHAT
 *   Makes stock jQWidgets (grid, dropdownlist, combobox, input/number/date inputs, listbox, menu, tree, tabs,
 *   window, calendar, buttons, checkbox, radio, scrollbar, splitter, tooltip, chart text) render like the Fty
 *   components, with no markup or script change in the host app. Loading this file IS the opt-in: it is not
 *   scoped to `.fty-classic`.
 *
 * JQWIDGETS VERSIONS / THEMES TARGETED
 *   3.x (Orion v5 runs 3.2.2 with `theme: 'bootstrap'`). Every jqx element carries a theme-neutral class and a
 *   themed twin (`jqx-grid-cell` + `jqx-grid-cell-bootstrap`). This file only ever names the theme-neutral
 *   classes, so it works over any theme (a spec guards that no selector names a theme).
 *
 * LOAD ORDER (after the host's jqx CSS)
 *   jqx.base.css → jqx.<theme>.css → tokens.css (optional) → classic.css → classic/jqwidgets.css
 *
 * HOW IT WINS (one approach, used throughout)
 *   Each rule mirrors the jqx.base.css / theme selector it overrides with the theme suffix dropped, at the same
 *   specificity or higher, and wins because it loads later: the theme's `.jqx-tabs-header-bootstrap` (one class)
 *   meets `.jqx-tabs-header`; the theme's `.jqx-widget-bootstrap .jqx-grid-cell-bootstrap` (two classes) meets
 *   `.jqx-widget .jqx-grid-cell`. Inside this file, a widget's own rule beats the generic `.jqx-fill-state-*`
 *   rules either by coming later at equal specificity or by naming one class more
 *   (`.jqx-button.jqx-fill-state-hover`), which is why the generic section comes first.
 *
 * !IMPORTANT (only where a jqx theme uses it; each rule says which)
 *   jqx themes paint the hover/selected states of list items, menu items, tree items, calendar cells and grid
 *   cells, tab title colours and popup corner radii with !important. Those rules repeat !important at the same or
 *   higher specificity. The only other !important beats an INLINE style jqx writes (the grid's loading box). Host apps that force jqx font sizes with !important (Orion.css does)
 *   keep them: this file never sets a font-size.
 *
 * PAINT ONLY
 *   jqWidgets computes geometry in JavaScript and writes inline width/height/top/left. This file changes colours,
 *   backgrounds, border colours, decorative radii, box-shadows, font family/weight/transform/letter-spacing and
 *   outlines only: no height, line-height, padding, margin, width, display, position or font-size. Thicker
 *   indicators (the selected tab's 2px underline) are drawn with an inset box-shadow, not a border.
 *   classic.css's `.fty-classic` element defaults (field look on text inputs, select, textarea) skip any element
 *   that carries a `jqx-*` class, so jqx's own inputs keep their geometry; the field look below is paint only.
 *
 * COLOUR MAPPING
 *   .jqx-widget (+ content/header/fill parts)  font-family var(--fty-font-sans) (jqx default is Verdana)
 *   .jqx-widget-header                       #f8fafc, #003366 600 text, rgba(0,0,0,.08) border
 *   .jqx-fill-state-normal / -hover / -pressed   #fff + rgba(0,0,0,.1) border / #f3f4f6 / #0e487e white
 *   .jqx-button                              FtyButton outline (hover #e9ebef); .jqx-primary navy #0e487e → #003366;
 *                                            2px #005a9c :focus-visible outline (as classic/bootstrap3.css .btn)
 *   .jqx-grid                                FtyDataGrid: 12px radius, rgba(0,0,0,.12) border; th #f9fafb 700 uppercase
 *                                            .05em #6b7280; cells #fff #030213, alt #fcfcfd, hover #f8fafc,
 *                                            selected #ebf2fa #003366; pager = FtyTablePager (ghost buttons)
 *   dropdownlist / combobox / inputs         field look: #fafafa (--input-background), rgba(0,0,0,.1), radius 8,
 *                                            focus #005a9c border + 3px ring
 *   .jqx-listbox / popups / menu dropdown    panel: #fff, rgba(0,0,0,.08), radius 8, panel shadow; items hover
 *                                            #f3f4f6, selected #ebf2fa #005a9c 600
 *   .jqx-tabs                                TabBar: white header, selected #003366 + 2px underline
 *   .jqx-window                              dialog: radius 12, dialog shadow, white #003366 titlebar;
 *                                            .jqx-window-modal #003366 (its opacity is jqx's inline modalOpacity —
 *                                            set modalOpacity: 0.45 to match the Fty overlay)
 *   .jqx-checkbox-default / radio            #005a9c when checked (box size stays jqx's boxSize option)
 *   scrollbar                                transparent track, #cbd5e1 thumb (hover #94a3b8)
 *   splitter                                 rgba(0,0,0,.08) borders, #f1f5f9 splitbar
 *   tooltip                                  #1e293b, white text, radius 6
 *   chart / gauge text                       Fty font, #374151 labels, #6b7280 descriptions
 *
 * TESTING NOTE
 *   Chrome will not load stylesheets from http://127.0.0.1 into an https page (mixed content / local-network
 *   access), so when trying this on a live https host, inject it as a <style> or serve it over https.
 *
 * PRINT
 *   The @media print block at the end removes the shadows this file adds and keeps checked boxes legible.
 */

/* ======================================================================================================
   Font — jqx.base.css and the themes set Verdana on these parts; font-family only, never size
   ====================================================================================================== */

.jqx-widget,
.jqx-widget-content,
.jqx-widget-header,
.jqx-fill-state-normal,
.jqx-fill-state-hover,
.jqx-fill-state-pressed,
.jqx-item,
.jqx-input,
.jqx-input-content,
.jqx-combobox-input {
	font-family: var(--fty-font-sans);
}

/* ======================================================================================================
   Generic surfaces and states (widget sections below refine them)
   ====================================================================================================== */

.jqx-widget {
	color: var(--fty-text);
}

.jqx-widget-content {
	color: var(--fty-text);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border);
}

.jqx-widget-header {
	color: var(--fty-heading);
	font-weight: 600;
	background-color: #f8fafc;
	border-color: var(--fty-border-subtle);
}

.jqx-fill-state-normal {
	color: var(--fty-text);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border);
}

.jqx-fill-state-hover {
	color: var(--fty-text);
	background-color: var(--fty-bg-hover);
	border-color: var(--fty-border);
}

.jqx-fill-state-pressed {
	color: #ffffff;
	background-color: var(--fty-blue-light);
	border-color: var(--fty-blue-light);
	box-shadow: none;
}

/* Focus: the bootstrap theme adds an 8px blue glow (`-webkit-box-shadow` only) to every focused part. Drop it here;
   fields, popups and the checkbox re-apply the Fty ring or panel shadow below, buttons use :focus-visible. */
.jqx-fill-state-focus {
	border-color: var(--fty-blue);
	-webkit-box-shadow: none;
	box-shadow: none;
}

.jqx-fill-state-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Decorative corner radii (jqx 3px, bootstrap theme 4px) → Fty 8px. Outer containers refine below. */
.jqx-rc-all {
	border-radius: var(--fty-radius-md);
}

.jqx-rc-t {
	border-top-left-radius: var(--fty-radius-md);
	border-top-right-radius: var(--fty-radius-md);
}

.jqx-rc-b {
	border-bottom-left-radius: var(--fty-radius-md);
	border-bottom-right-radius: var(--fty-radius-md);
}

.jqx-rc-l {
	border-top-left-radius: var(--fty-radius-md);
	border-bottom-left-radius: var(--fty-radius-md);
}

.jqx-rc-r {
	border-top-right-radius: var(--fty-radius-md);
	border-bottom-right-radius: var(--fty-radius-md);
}

.jqx-rc-tl {
	border-top-left-radius: var(--fty-radius-md);
}

.jqx-rc-tr {
	border-top-right-radius: var(--fty-radius-md);
}

.jqx-rc-bl {
	border-bottom-left-radius: var(--fty-radius-md);
}

.jqx-rc-br {
	border-bottom-right-radius: var(--fty-radius-md);
}

/* ======================================================================================================
   Buttons — .jqx-button → FtyButton outline; .jqx-primary etc. → the classic/bootstrap3.css .btn-* colours
   ====================================================================================================== */

.jqx-button {
	font-weight: 500;
	color: var(--fty-text);
	background-color: transparent;
	border-color: var(--fty-border);
	transition: background-color var(--fty-transition), border-color var(--fty-transition), color var(--fty-transition);
}

.jqx-button.jqx-fill-state-hover {
	color: var(--fty-text);
	background-color: var(--fty-bg-accent);
	border-color: var(--fty-border);
}

.jqx-button.jqx-fill-state-pressed {
	color: #ffffff;
	background-color: var(--fty-blue-light);
	border-color: var(--fty-blue-light);
}

.jqx-button:focus-visible {
	outline: 2px solid var(--fty-blue);
	outline-offset: 2px;
}

.jqx-fill-state-normal.jqx-primary {
	color: #ffffff;
	background-color: var(--fty-blue-light);
	border-color: var(--fty-blue-light);
}

.jqx-fill-state-hover.jqx-primary,
.jqx-fill-state-pressed.jqx-primary {
	color: #ffffff;
	background-color: var(--fty-blue-dark);
	border-color: var(--fty-blue-dark);
}

.jqx-fill-state-normal.jqx-success {
	color: #ffffff;
	background-color: var(--fty-green-save);
	border-color: var(--fty-green-save);
}

.jqx-fill-state-hover.jqx-success,
.jqx-fill-state-pressed.jqx-success {
	color: #ffffff;
	background-color: #2b8c45;
	border-color: #2b8c45;
}

.jqx-fill-state-normal.jqx-info {
	color: #ffffff;
	background-color: var(--fty-blue);
	border-color: var(--fty-blue);
}

.jqx-fill-state-hover.jqx-info,
.jqx-fill-state-pressed.jqx-info {
	color: #ffffff;
	background-color: #004578;
	border-color: #004578;
}

.jqx-fill-state-normal.jqx-warning {
	color: #ffffff;
	background-color: var(--fty-orange);
	border-color: var(--fty-orange);
}

.jqx-fill-state-hover.jqx-warning,
.jqx-fill-state-pressed.jqx-warning {
	color: #ffffff;
	background-color: var(--fty-orange-hover);
	border-color: var(--fty-orange-hover);
}

.jqx-fill-state-normal.jqx-danger {
	color: var(--fty-destructive-fg);
	background-color: var(--fty-destructive);
	border-color: var(--fty-destructive);
}

.jqx-fill-state-hover.jqx-danger,
.jqx-fill-state-pressed.jqx-danger {
	color: var(--fty-destructive-fg);
	background-color: #b9123a;
	border-color: #b9123a;
}

.jqx-fill-state-normal.jqx-inverse {
	color: #ffffff;
	background-color: var(--fty-primary);
	border-color: var(--fty-primary);
}

.jqx-fill-state-hover.jqx-inverse,
.jqx-fill-state-pressed.jqx-inverse {
	color: #ffffff;
	background-color: #1f2937;
	border-color: #1f2937;
}

/* ======================================================================================================
   Fields — dropdownlist / combobox / input / numberinput / datetimeinput → FtySelect / FtyInput field look.
   The outer element carries the field; the inner parts jqx positions go transparent.
   ====================================================================================================== */

.jqx-input,
.jqx-dropdownlist-state-normal,
.jqx-combobox-state-normal {
	color: var(--fty-text);
	background-color: var(--fty-bg-input);
	border-color: var(--fty-border);
	-webkit-box-shadow: none;
	box-shadow: none;
	transition: border-color var(--fty-transition), box-shadow var(--fty-transition), background-color var(--fty-transition);
}

.jqx-input.jqx-rc-all,
.jqx-dropdownlist-state-normal.jqx-rc-all,
.jqx-combobox-state-normal.jqx-rc-all {
	border-radius: var(--fty-radius-md);
}

.jqx-input-content,
.jqx-combobox-content,
.jqx-combobox-input,
.jqx-dropdownlist-content {
	color: var(--fty-text);
	background-color: transparent;
	-webkit-box-shadow: none;
	box-shadow: none;
}

/* The focused combobox's inner content: the theme's `.jqx-combobox-content-focus` glow goes, the ring is on the
   outer field. */
.jqx-combobox-content.jqx-combobox-content-focus {
	border-color: transparent;
	-webkit-box-shadow: none;
	box-shadow: none;
}

.jqx-input::placeholder,
.jqx-input-content::placeholder,
.jqx-combobox-input::placeholder {
	color: var(--fty-text-muted);
}

/* Hovered and open dropdowns stay fields (jqx adds the generic hover/pressed fill states). */
.jqx-dropdownlist-state-normal.jqx-fill-state-hover,
.jqx-combobox-state-normal.jqx-fill-state-hover {
	color: var(--fty-text);
	background-color: var(--fty-bg-input);
	border-color: var(--fty-border-hover);
}

.jqx-dropdownlist-state-normal.jqx-fill-state-pressed,
.jqx-dropdownlist-state-normal.jqx-fill-state-focus,
.jqx-combobox-state-normal.jqx-combobox-state-focus,
.jqx-combobox-state-normal.jqx-fill-state-focus,
.jqx-combobox-state-normal:focus-within,
.jqx-input.jqx-fill-state-focus,
.jqx-input.jqx-numberinput-focus,
.jqx-input:focus,
.jqx-input:focus-within {
	color: var(--fty-text);
	background-color: var(--background, #ffffff);
	border-color: var(--fty-blue);
	box-shadow: var(--fty-focus-ring);
	outline: none;
}

/* Arrow / calendar / spin buttons inside a field: no button chrome, the icon only. */
.jqx-combobox-arrow-normal,
.jqx-combobox-arrow-hover,
.jqx-combobox-arrow-selected,
.jqx-action-button,
.jqx-input .jqx-fill-state-normal {
	background-color: transparent;
	border-color: transparent;
}

.jqx-input .jqx-fill-state-hover,
.jqx-input .jqx-fill-state-pressed,
.jqx-combobox-arrow-normal.jqx-fill-state-hover,
.jqx-combobox-arrow-normal.jqx-fill-state-pressed,
.jqx-action-button.jqx-fill-state-hover,
.jqx-action-button.jqx-fill-state-pressed {
	background-color: var(--fty-bg-hover);
	border-color: transparent;
}

.jqx-dropdownlist-state-normal .jqx-icon-arrow-down,
.jqx-dropdownlist-state-normal .jqx-icon-arrow-up,
.jqx-combobox-arrow-normal .jqx-icon-arrow-down,
.jqx-combobox-arrow-normal .jqx-icon-arrow-up {
	opacity: 0.6;
}

/* ======================================================================================================
   Panels and items — listbox, popups, menu, tree (FtySelect panel + options)
   ====================================================================================================== */

.jqx-listbox,
.jqx-tree,
.jqx-panel {
	color: var(--fty-text);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
}

.jqx-popup {
	border-color: var(--fty-border-subtle);
}

/* The bootstrap theme pins popup corners with `.jqx-popup-bootstrap { border-radius: 4px !important }` and
   `.jqx-popup-bootstrap.jqx-fill-state-focus-bootstrap` (two classes, !important): repeated here to win. */
.jqx-popup,
.jqx-popup.jqx-fill-state-focus {
	border-radius: var(--fty-radius-md) !important;
}

.jqx-listbox.jqx-popup,
.jqx-calendar.jqx-popup,
.jqx-menu-dropdown,
.jqx-menu-vertical.jqx-popup {
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
	box-shadow: var(--fty-shadow-panel);
}

/* A focused (standalone) listbox: `.jqx-listbox-bootstrap.jqx-fill-state-focus-bootstrap` sets #b2b2b2 and an
   inset shadow. A popup listbox is also .jqx-popup and keeps the panel look from the next rule. */
.jqx-listbox.jqx-fill-state-focus {
	border-color: var(--fty-blue);
	-webkit-box-shadow: none;
	box-shadow: none;
}

/* The theme's focused popup shadow is two classes. */
.jqx-popup.jqx-fill-state-focus {
	border-color: var(--fty-border-subtle);
	box-shadow: var(--fty-shadow-panel);
}

.jqx-listitem-state-normal,
.jqx-menu-item,
.jqx-tree-item {
	color: var(--fty-text);
}

.jqx-listitem-state-normal.jqx-rc-all,
.jqx-menu-item.jqx-rc-all,
.jqx-tree-item.jqx-rc-all {
	border-radius: var(--fty-radius-sm);
}

.jqx-listitem-state-group {
	color: var(--fty-text-secondary);
	font-weight: 600;
}

/* Hover: the bootstrap theme paints these with !important (one class, plus two-class menu/input-popup forms). */
.jqx-listitem-state-hover,
.jqx-menu-item-hover,
.jqx-tree-item-hover,
.jqx-menu-vertical .jqx-menu-item-top-hover,
.jqx-input-popup .jqx-fill-state-hover,
.jqx-input-popup .jqx-fill-state-pressed,
.jqx-input-button-header {
	color: var(--fty-text) !important;
	background-color: var(--fty-bg-hover) !important;
	border-color: transparent !important;
}

/* Selected: the bootstrap theme paints these #428bca with !important. */
.jqx-listitem-state-selected,
.jqx-menu-item-selected,
.jqx-tree-item-selected,
.jqx-menu-vertical .jqx-menu-item-top-selected {
	font-weight: 600;
	color: var(--fty-blue) !important;
	background-color: var(--fty-bg-selected) !important;
	border-color: transparent !important;
}

/* Horizontal menu bar */
.jqx-menu.jqx-widget-header {
	color: var(--fty-text-body);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
}

.jqx-menu-vertical {
	background-color: var(--fty-bg-surface);
}

.jqx-menu-item-top {
	font-weight: 500;
	color: var(--fty-text-body);
}

/* Top-level menu hover/open: bootstrap theme uses the generic fill states (no !important on these). */
.jqx-menu-item-top-hover,
.jqx-menu-item-top.jqx-fill-state-hover {
	color: var(--fty-text);
	background-color: var(--fty-bg-hover);
	border-color: transparent;
}

.jqx-menu-item-top-selected,
.jqx-menu-item-top.jqx-fill-state-pressed {
	color: var(--fty-blue);
	background-color: var(--fty-bg-selected);
	border-color: transparent;
}

.jqx-menu-item-separator {
	background-color: var(--fty-border-gray);
}

/* The theme swaps in white arrows on a selected (#428bca) item; the selected item is light here. */
.jqx-menu-item-arrow-right-selected,
.jqx-menu-item-arrow-top-right {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' fill='none' stroke='%23005a9c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.jqx-menu-item-arrow-left-selected,
.jqx-menu-item-arrow-top-left {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M10 4L6 8l4 4' fill='none' stroke='%23005a9c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ======================================================================================================
   Grid — FtyDataGrid + FtyTablePager
   ====================================================================================================== */

.jqx-grid {
	border-color: var(--fty-border-card);
}

.jqx-grid.jqx-rc-all {
	border-radius: var(--fty-radius-lg);
}

/* jqx already clips the grid body in this wrapper (overflow: hidden !important); rounding it keeps the header
   and pager corners inside the 12px border. */
.jqx-grid > .jqx-overflow-hidden {
	border-radius: 11px;
}

.jqx-widget .jqx-grid-content {
	background-color: var(--fty-bg-surface);
}

/* The "Loading..." box jqxGrid shows while it binds data is written with an INLINE style (font-family: verdana;
   color #767676; background #f6f6f6; border-color #898989). Only !important beats an inline style; paint only. */
.jqx-grid .jqx-fill-state-normal[style*="verdana"] {
	font-family: var(--fty-font-sans) !important;
	color: var(--fty-text-muted) !important;
	background: var(--fty-bg-surface) !important;
	border-color: var(--fty-border) !important;
	box-shadow: var(--fty-shadow-card);
}

/* Column headers. The header strip also holds the filter row, so only the header cells get the type. */
.jqx-widget .jqx-grid-header {
	background-color: #f9fafb;
	border-color: var(--fty-border-subtle);
}

.jqx-widget .jqx-grid-column-header,
.jqx-widget .jqx-grid-columngroup-header {
	color: var(--fty-text-secondary);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	background-color: #f9fafb;
	border-color: var(--fty-border-subtle);
}

/* Sort / filter icon holders inside a header carry .jqx-widget-header: let the header colour show through. */
.jqx-widget .jqx-grid-column-header .jqx-widget-header {
	background-color: transparent;
}

.jqx-widget .jqx-grid-column-menubutton,
.jqx-widget .jqx-grid-column-sortascbutton,
.jqx-widget .jqx-grid-column-sortdescbutton,
.jqx-widget .jqx-grid-column-filterbutton {
	background-color: transparent;
	border-color: var(--fty-border-subtle);
}

/* Cells — order matters: base, sort/filter, alt, pinned, filter row, then hover and selected. */
.jqx-widget .jqx-grid-cell,
.jqx-widget .jqx-grid-group-cell {
	color: var(--fty-text);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
}

.jqx-widget .jqx-grid-cell-sort,
.jqx-widget .jqx-grid-cell-filter {
	background-color: var(--fty-bg-surface);
}

.jqx-widget .jqx-grid-cell-alt,
.jqx-widget .jqx-grid-cell-sort-alt,
.jqx-widget .jqx-grid-cell-filter-alt {
	background-color: #fcfcfd;
}

.jqx-widget .jqx-grid-cell-pinned {
	background-color: var(--fty-bg-surface);
}

.jqx-widget .jqx-grid-cell-pinned-alt {
	background-color: #fcfcfd;
}

.jqx-widget .jqx-grid-cell-filter-row {
	background-color: var(--fty-bg-surface);
}

/* Filter-row and pager editors: compact fields. */
.jqx-grid-cell-filter-row .jqx-input.jqx-rc-all,
.jqx-grid-cell-filter-row .jqx-dropdownlist-state-normal.jqx-rc-all,
.jqx-grid-pager .jqx-input.jqx-rc-all,
.jqx-grid-pager .jqx-dropdownlist-state-normal.jqx-rc-all {
	border-radius: var(--fty-radius-sm);
}

/* Hover: `.jqx-grid-cell-hover-bootstrap` sets colour, background and border with !important. */
.jqx-widget .jqx-grid-cell-hover {
	color: var(--fty-text) !important;
	background-color: var(--fty-bg-row-hover) !important;
	border-color: var(--fty-border-subtle) !important;
}

/* Selected: `.jqx-grid-cell-selected-bootstrap` paints #428bca/white with !important. */
.jqx-widget .jqx-grid-cell-selected {
	color: var(--fty-heading) !important;
	background-color: var(--fty-bg-selected) !important;
	border-color: var(--fty-border-subtle) !important;
}

/* Drag-selection rectangle: `.jqx-grid-selectionarea-bootstrap` uses !important. */
.jqx-widget .jqx-grid-selectionarea {
	background-color: rgba(0, 90, 156, 0.15) !important;
	border-color: var(--fty-blue) !important;
}

/* The theme swaps white group arrows into a selected (#428bca) cell; the selected cell is light here. */
.jqx-grid-cell.jqx-grid-cell-selected > .jqx-grid-group-expand {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23003366' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.jqx-grid-cell.jqx-grid-cell-selected > .jqx-grid-group-collapse {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' fill='none' stroke='%23003366' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Group rows */
.jqx-widget .jqx-grid-groups-row {
	color: var(--fty-heading);
	font-weight: 600;
}

.jqx-widget .jqx-grid-groups-row-details {
	color: var(--fty-text-muted);
	font-weight: 400;
}

.jqx-widget .jqx-grid-empty-cell {
	color: var(--fty-text-muted);
}

/* Groups header, toolbar, status bar: light bars. */
.jqx-widget .jqx-grid-groups-header,
.jqx-widget .jqx-grid-toolbar,
.jqx-widget .jqx-grid-statusbar {
	color: var(--fty-text-body);
	background-color: var(--fty-bg-row-hover);
	border-color: var(--fty-border-subtle);
}

/* Group-by chips in the groups header → FtySelect chip. */
.jqx-widget .jqx-grid-group-column {
	color: var(--fty-blue);
	font-weight: 500;
	background-color: var(--fty-bg-selected);
	border-color: rgba(0, 90, 156, 0.2);
	border-radius: var(--fty-radius-xl);
}

.jqx-widget .jqx-grid-group-column-line {
	background-color: var(--fty-border-hover);
}

/* Pager → FtyTablePager: white bar, top divider, muted info text, ghost buttons. */
.jqx-widget .jqx-grid-pager,
.jqx-widget .jqx-grid-pager-top {
	color: var(--fty-text-muted);
	font-weight: 400;
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-card);
}

.jqx-grid-pager .jqx-button,
.jqx-grid-pager-top .jqx-button {
	background-color: transparent;
	border-color: transparent;
}

.jqx-grid-pager .jqx-button.jqx-fill-state-hover,
.jqx-grid-pager-top .jqx-button.jqx-fill-state-hover {
	background-color: var(--fty-bg-hover);
	border-color: transparent;
}

.jqx-grid-pager .jqx-button.jqx-fill-state-pressed,
.jqx-grid-pager-top .jqx-button.jqx-fill-state-pressed {
	background-color: var(--fty-border-gray);
	border-color: transparent;
}

.jqx-widget .jqx-grid-pager-number {
	color: var(--fty-text-secondary);
	font-weight: 500;
	border-radius: var(--fty-radius-md);
}

.jqx-widget .jqx-grid-pager-number:hover {
	background-color: var(--fty-bg-hover);
}

.jqx-widget .jqx-grid-pager-number-selected,
.jqx-widget .jqx-grid-pager-number.jqx-fill-state-pressed {
	color: #ffffff;
	background-color: var(--fty-blue-light);
	border-color: var(--fty-blue-light);
}

/* Bottom-right corner between the scroll bars. */
.jqx-grid-bottomright,
.jqx-panel-bottomright,
.jqx-listbox-bottomright {
	background-color: var(--fty-bg-surface);
}

/* ======================================================================================================
   Scroll bars — transparent track, light rounded thumb (sizes stay jqx's)
   ====================================================================================================== */

.jqx-scrollbar.jqx-widget-content,
.jqx-scrollbar-state-normal {
	background-color: transparent;
	border-color: transparent;
}

.jqx-scrollbar-button-state-normal,
.jqx-scrollbar-button-state-hover,
.jqx-scrollbar-button-state-pressed {
	background-color: transparent;
	border-color: transparent;
	opacity: 0.6;
}

.jqx-scrollbar-thumb-state-normal,
.jqx-scrollbar-thumb-state-normal-horizontal {
	background-color: #cbd5e1;
	border-color: transparent;
	border-radius: var(--fty-radius-pill);
}

.jqx-scrollbar-thumb-state-hover,
.jqx-scrollbar-thumb-state-hover-horizontal {
	background-color: #94a3b8;
	border-color: transparent;
}

.jqx-scrollbar-thumb-state-pressed,
.jqx-scrollbar-thumb-state-pressed-horizontal {
	background-color: #64748b;
	border-color: transparent;
}

/* ======================================================================================================
   Tabs — TabBar
   ====================================================================================================== */

.jqx-tabs {
	border-color: var(--fty-border-subtle);
}

.jqx-tabs-header,
.jqx-tabs-header-bottom {
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-gray);
	box-shadow: none;
}

.jqx-tabs-arrow-background {
	background-color: var(--fty-bg-surface);
}

/* Tab titles: `.jqx-tabs-title-bootstrap { color: #0088cc !important }`. */
.jqx-tabs-title {
	font-weight: 500;
	color: var(--fty-text-secondary) !important;
	background-color: transparent;
	border-color: transparent;
}

/* `.jqx-tabs-title-hover-top-bootstrap { color: #005580 !important }`. */
.jqx-tabs-title-hover-top,
.jqx-tabs-title-hover-bottom {
	color: var(--fty-text-body) !important;
	background-color: transparent;
	border-color: transparent;
	box-shadow: inset 0 -2px 0 var(--fty-border-hover);
}

/* `.jqx-tabs-title-selected-top-bootstrap { color: #555555 !important }`. The 2px underline is an inset shadow
   so the tab keeps jqx's border widths. */
.jqx-tabs-title-selected-top,
.jqx-tabs-selection-tracker-top {
	color: var(--fty-heading) !important;
	background-color: transparent;
	border-color: transparent;
	box-shadow: inset 0 -2px 0 var(--fty-heading);
}

.jqx-tabs-title-selected-bottom,
.jqx-tabs-selection-tracker-bottom {
	color: var(--fty-heading) !important;
	background-color: transparent;
	border-color: transparent;
	box-shadow: inset 0 2px 0 var(--fty-heading);
}

.jqx-tabs-content {
	background-color: var(--fty-bg-surface);
}

/* ======================================================================================================
   Window — FtyDialog
   ====================================================================================================== */

.jqx-window {
	border-color: var(--fty-border-subtle);
	box-shadow: var(--fty-shadow-dialog);
}

/* A window is also a .jqx-popup, whose radius the theme pins with !important (see Panels). */
.jqx-window.jqx-popup {
	border-radius: var(--fty-radius-lg) !important;
}

.jqx-docking .jqx-window,
.jqx-docking-panel .jqx-window {
	box-shadow: none;
}

.jqx-window-header {
	color: var(--fty-heading);
	font-weight: 600;
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-gray);
}

.jqx-window-content {
	color: var(--fty-text);
	background-color: var(--fty-bg-surface);
}

.jqx-window-modal {
	background-color: var(--fty-blue-dark);
}

/* ======================================================================================================
   Calendar / datetimeinput popup — FtyDatePicker panel
   ====================================================================================================== */

.jqx-calendar {
	color: var(--fty-text);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
}

.jqx-calendar-title-header {
	color: var(--fty-heading);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
}

.jqx-calendar-title-content {
	font-weight: 600;
}

.jqx-calendar-column-header,
.jqx-calendar-row-header,
.jqx-calendar-top-left-header {
	color: var(--fty-text-secondary);
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-subtle);
}

.jqx-calendar-cell.jqx-rc-all {
	border-radius: var(--fty-radius-sm);
}

.jqx-calendar-cell-today {
	font-weight: 700;
	color: var(--fty-text);
	background-color: transparent;
	border-color: var(--fty-blue);
}

/* Hover/selected: the bootstrap theme uses !important. */
.jqx-calendar-cell-hover {
	color: var(--fty-text) !important;
	background-color: var(--fty-bg-hover) !important;
	border-color: transparent !important;
}

.jqx-calendar-cell-selected {
	color: #ffffff !important;
	background-color: var(--fty-blue) !important;
	border-color: var(--fty-blue) !important;
}

/* ======================================================================================================
   Checkbox / radio — FtyCheckbox. Box size is jqx's boxSize option (default 13px); paint only here.
   The checked state lives on an inner span, so the box is painted with :has() (no :has → plain theme check).
   ====================================================================================================== */

.jqx-checkbox-default {
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-check);
}

.jqx-checkbox-default.jqx-rc-all {
	border-radius: 4px;
}

.jqx-checkbox-default.jqx-fill-state-hover {
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-blue);
}

.jqx-checkbox-default:has(.jqx-checkbox-check-checked),
.jqx-checkbox-default:has(.jqx-checkbox-check-indeterminate) {
	background-color: var(--fty-blue);
	border-color: var(--fty-blue);
}

.jqx-checkbox-default:has(.jqx-checkbox-check-checked) .jqx-checkbox-check-checked {
	background: var(--fty-icon-check) center / contain no-repeat;
}

.jqx-checkbox-default:has(.jqx-checkbox-check-indeterminate) .jqx-checkbox-check-indeterminate {
	background: var(--fty-icon-dash) center / contain no-repeat;
}

.jqx-checkbox:focus-visible .jqx-checkbox-default,
.jqx-radiobutton:focus-visible .jqx-radiobutton-default {
	box-shadow: var(--fty-focus-ring);
}

.jqx-radiobutton-default {
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-border-check);
}

.jqx-radiobutton-default.jqx-fill-state-hover {
	background-color: var(--fty-bg-surface);
	border-color: var(--fty-blue);
}

.jqx-radiobutton-default:has(.jqx-radiobutton-check-checked) {
	border-color: var(--fty-blue);
}

.jqx-radiobutton-check-checked,
.jqx-radiobutton-check-checked.jqx-fill-state-pressed {
	background-color: var(--fty-blue);
	border-color: var(--fty-blue);
}

/* ======================================================================================================
   Splitter, expander parts, progress bar, slider
   ====================================================================================================== */

.jqx-splitter {
	border-color: var(--fty-border-subtle);
}

.jqx-splitter-splitbar-vertical,
.jqx-splitter-splitbar-horizontal {
	background-color: #f1f5f9;
	border-color: var(--fty-border-subtle);
}

.jqx-splitter-splitbar-hover,
.jqx-splitter-splitbar-vertical.jqx-fill-state-hover,
.jqx-splitter-splitbar-horizontal.jqx-fill-state-hover {
	background-color: #e2e8f0;
	border-color: var(--fty-border-subtle);
}

.jqx-splitter-collapse-button-vertical,
.jqx-splitter-collapse-button-horizontal {
	background-color: #cbd5e1;
	border-color: #cbd5e1;
}

.jqx-progressbar-value,
.jqx-progressbar-value-vertical {
	background-color: var(--fty-blue);
}

.jqx-slider-track {
	background-color: var(--fty-border-gray);
	border-color: transparent;
}

.jqx-slider-rangebar {
	background-color: var(--fty-blue);
	border-color: var(--fty-blue);
}

/* ======================================================================================================
   Tooltip and notification
   ====================================================================================================== */

.jqx-tooltip {
	box-shadow: var(--fty-shadow-md);
}

.jqx-tooltip.jqx-popup {
	border-radius: var(--fty-radius-sm) !important;
}

.jqx-tooltip-main,
.jqx-tooltip-text {
	color: #ffffff;
	background-color: #1e293b;
	border-color: #1e293b;
	border-radius: var(--fty-radius-sm);
}

/* Only the pointing side shows: jqx.base.css makes the other sides transparent with !important. */
.jqx-tooltip-arrow {
	border-color: #1e293b;
}

.jqx-notification {
	border-radius: var(--fty-radius-lg);
	box-shadow: var(--fty-shadow-panel);
}

/* ======================================================================================================
   Chart and gauge text (jqx.base.css only: one class, SVG text — fill plus color)
   ====================================================================================================== */

.jqx-chart-axis-text,
.jqx-chart-label-text,
.jqx-chart-tooltip-text,
.jqx-chart-legend-text,
.jqx-chart-title-text,
.jqx-gauge-label,
.jqx-gauge-caption {
	font-family: var(--fty-font-sans);
	fill: var(--fty-text-body);
	color: var(--fty-text-body);
}

.jqx-chart-axis-description,
.jqx-chart-title-description {
	font-family: var(--fty-font-sans);
	fill: var(--fty-text-secondary);
	color: var(--fty-text-secondary);
}

/* ======================================================================================================
   Print — no shadows; checked boxes keep their fill
   ====================================================================================================== */

@media print {
	.jqx-window,
	.jqx-popup,
	.jqx-popup.jqx-fill-state-focus,
	.jqx-listbox.jqx-popup,
	.jqx-calendar.jqx-popup,
	.jqx-menu-dropdown,
	.jqx-menu-vertical.jqx-popup,
	.jqx-tooltip,
	.jqx-notification,
	.jqx-input:focus-within,
	.jqx-combobox-state-normal:focus-within {
		box-shadow: none;
	}

	.jqx-checkbox-default:has(.jqx-checkbox-check-checked),
	.jqx-checkbox-default:has(.jqx-checkbox-check-indeterminate),
	.jqx-radiobutton-check-checked {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}
