/*
 * @futurity/design — classic.css: framework-agnostic Fty primitives for server-rendered apps.
 *
 * WHY
 *   The Vue components' styles are `<style scoped>`, so plain server-rendered HTML (ASP.NET Razor,
 *   jQuery apps) cannot reuse dist/style.css. This file reproduces the Fty components' look as plain,
 *   unscoped CSS so legacy apps (first consumer: Orion v5 — Bootstrap 3 + jqWidgets + jQuery UI) can
 *   match the Futurity Platform. Every value is taken from the component `<style>` blocks under
 *   src/components (the .vue file is the source of truth).
 *
 * LOAD ORDER
 *   1. tokens.css            — optional; the :root design tokens. classic.css falls back to the same
 *                              values when it is absent.
 *   2. classic.css           — this file: --fty-* variables, .fty-c-* primitives, opt-in element defaults.
 *   3. classic/*.css         — framework adapters (bootstrap3, jquery-ui, jqwidgets, icheck, jgrowl), built
 *                              on the variables and primitives below. Load them AFTER the framework's own CSS.
 *
 * OPT-IN MODEL
 *   - The :root variables and the .fty-c-* classes are inert until markup uses them.
 *   - Element defaults (body font/colour/background, headings, links, text inputs, select, textarea) apply
 *     ONLY under an ancestor with class `fty-classic` (put it on <html> or <body>). They carry the weight of
 *     one element selector — `:where(.fty-classic) a` is (0,0,1) — so any class selector beats them, and they
 *     beat a framework's bare-element rules only when this file loads after it.
 *   - Form-control defaults skip any input/textarea/select that carries a `jqx-*` class: jqWidgets sizes its own
 *     inputs in JavaScript, and classic/jqwidgets.css paints them (the exclusion adds no specificity).
 *   - Buttons are never restyled globally; only `.fty-c-btn` is.
 *   - No resets outside `.fty-classic`, no !important, px units only (hosts set different root font sizes:
 *     Orion 13px, orion.web.app 15px).
 *
 * NAMING
 *   Variables: --fty-*.  Primitives: .fty-c-<block>, modifiers .fty-c-<block>--<mod>, elements
 *   .fty-c-<block>__<el>, states .is-active / .is-selected / .is-disabled / .is-invalid (plus the native
 *   :disabled, [aria-invalid="true"], [aria-selected="true"], [aria-disabled="true"] where they apply).
 *   Some primitives expose per-instance custom properties (--fty-btn-*, --fty-accent, --fty-toast-accent)
 *   so adapters can map a framework class onto a primitive by setting variables only.
 *
 * PRINT
 *   The @media print block at the end removes shadows, gradients, blurs and backgrounds this file adds and
 *   switches white-on-colour text back to dark, so printed pages stay plain and legible.
 */

/* ======================================================================================================
   Variables
   ====================================================================================================== */

:root {
	/* Brand blues */
	--fty-blue-dark: #003366;
	--fty-blue-light: #0e487e;
	--fty-blue: #005a9c;
	--fty-blue-sky: #6e91b2;
	--fty-blue-thin: #3e6d97;
	--fty-blue-bright: #1565c0;

	/* Brand greens */
	--fty-green: #8bc53f;
	--fty-green-dark: #4a8300;
	--fty-green-income: #2e7d32;
	--fty-green-save: #34a853;

	/* Brand oranges */
	--fty-orange: #ff6f00;
	--fty-orange-hover: #e66400;
	--fty-orange-dark: #ec7006;
	--fty-orange-active: #cc5a00;

	/* Banner gradient (ListPageBanner / SectionBanner / app header) */
	--fty-gradient-start: #003366;
	--fty-gradient-mid: #0e487e;
	--fty-gradient-end: #1565c0;
	--fty-gradient: linear-gradient(to right, var(--fty-gradient-start), var(--fty-gradient-mid), var(--fty-gradient-end));

	/* Semantic (tokens.css values where they exist, with the same fallbacks) */
	--fty-primary: var(--primary, #030213);
	--fty-primary-fg: var(--primary-foreground, #ffffff);
	--fty-secondary: var(--secondary, oklch(0.95 0.0058 264.53));
	--fty-secondary-fg: var(--secondary-foreground, #030213);
	--fty-destructive: var(--destructive, #d4183d);
	--fty-destructive-fg: var(--destructive-foreground, #ffffff);
	--fty-required: #ef4444;

	/* Backgrounds */
	--fty-bg-page: #f0f4f8;
	--fty-bg-surface: var(--card, #ffffff);
	--fty-bg-input: var(--input-background, #fafafa);
	--fty-bg-hover: #f3f4f6;
	--fty-bg-accent: var(--accent, #e9ebef);
	--fty-bg-selected: #ebf2fa;
	--fty-bg-selected-hover: #dbe8f5;
	--fty-bg-row-hover: #f8fafc;
	--fty-bg-th: rgba(249, 250, 251, 0.8);
	--fty-bg-skeleton: #e5e7eb;
	--fty-bg-skeleton-shine: #f3f4f6;
	--fty-bg-heading: rgba(14, 72, 126, 0.05);
	--fty-overlay: rgba(0, 51, 102, 0.45);

	/* Borders */
	--fty-border: var(--border, rgba(0, 0, 0, 0.1));
	--fty-border-subtle: rgba(0, 0, 0, 0.08);
	--fty-border-card: rgba(0, 0, 0, 0.12);
	--fty-border-gray: #e5e7eb;
	--fty-border-hover: #d1d5db;
	--fty-border-check: rgba(0, 0, 0, 0.25);

	/* Text */
	--fty-text: var(--foreground, #030213);
	--fty-text-muted: var(--muted-foreground, #717182);
	--fty-text-secondary: #6b7280;
	--fty-text-body: #374151;
	--fty-text-label: #4b5563;
	--fty-heading: #003366;
	--fty-link: #005a9c;
	--fty-link-hover: #003366;
	--fty-banner-subtitle: #93c5fd;
	--fty-section-banner-subtitle: #bfdbfe;

	/* Status palettes (FtyBadge; alert borders are the matching 200 shade) */
	--fty-success-bg: #d1fae5;
	--fty-success-fg: #047857;
	--fty-success-border: #a7f3d0;
	--fty-warning-bg: #fef3c7;
	--fty-warning-fg: #b45309;
	--fty-warning-border: #fde68a;
	--fty-danger-bg: #fee2e2;
	--fty-danger-fg: #b91c1c;
	--fty-danger-border: #fecaca;
	--fty-info-bg: #dbeafe;
	--fty-info-fg: #1d4ed8;
	--fty-info-border: #bfdbfe;

	/* Damage levels */
	--fty-damage-destroyed: #bf2024;
	--fty-damage-major: #015287;
	--fty-damage-minor: #5e9c42;
	--fty-damage-affected: #fbba16;
	--fty-damage-pending: #919395;

	/* Radii */
	--fty-radius-sm: 6px;
	--fty-radius-md: 8px;
	--fty-radius-lg: 12px;
	--fty-radius-xl: 16px;
	--fty-radius-pill: 9999px;

	/* Sizing */
	--fty-field-height: 36px;
	--fty-field-height-sm: 32px;
	--fty-field-height-lg: 40px;

	/* Effects */
	--fty-focus-ring: 0 0 0 3px rgba(0, 90, 156, 0.1);
	--fty-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
	--fty-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px -1px rgba(0, 0, 0, 0.12);
	--fty-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--fty-shadow-panel: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	--fty-shadow-dialog: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
	--fty-transition: 0.15s;

	/* Typography */
	--fty-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--fty-font-size: 14px;
	--fty-font-size-sm: 13px;
	--fty-font-size-xs: 12px;

	/* Icons (SVG data URIs, used as background-image) */
	--fty-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23717182' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--fty-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--fty-icon-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8h7' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	--fty-icon-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='%23ffffff'/%3E%3C/svg%3E");
}

/* ======================================================================================================
   Button — FtyButton
   Colours are driven by per-instance variables so an adapter can map e.g. `.btn-primary` by setting
   --fty-btn-* only. Color is repeated on :hover/:focus so a framework `a:hover` rule cannot recolour an
   <a class="fty-c-btn">.
   ====================================================================================================== */

.fty-c-btn {
	--fty-btn-bg: var(--fty-primary);
	--fty-btn-fg: var(--fty-primary-fg);
	--fty-btn-border: transparent;
	--fty-btn-hover-bg: var(--fty-btn-bg);
	--fty-btn-hover-opacity: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	height: var(--fty-field-height);
	padding: 6px 16px;
	font-family: inherit;
	font-size: var(--fty-font-size);
	font-weight: 500;
	line-height: 1.5;
	background: var(--fty-btn-bg);
	border: 1px solid var(--fty-btn-border);
	border-radius: var(--fty-radius-md);
	cursor: pointer;
	white-space: nowrap;
	vertical-align: middle;
	user-select: none;
	transition: background-color var(--fty-transition), border-color var(--fty-transition), box-shadow var(--fty-transition), opacity var(--fty-transition);
}

.fty-c-btn,
.fty-c-btn:hover,
.fty-c-btn:focus {
	color: var(--fty-btn-fg);
	text-decoration: none;
}

.fty-c-btn:hover:not(:disabled):not(.is-disabled):not([aria-disabled="true"]) {
	background: var(--fty-btn-hover-bg);
	opacity: var(--fty-btn-hover-opacity);
}

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

.fty-c-btn:disabled,
.fty-c-btn.is-disabled,
.fty-c-btn[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Sizes (md is the base) */
.fty-c-btn--sm {
	height: var(--fty-field-height-sm);
	padding: 4px 12px;
	font-size: var(--fty-font-size-xs);
}

.fty-c-btn--lg {
	height: var(--fty-field-height-lg);
	padding: 8px 24px;
	font-size: var(--fty-font-size);
}

/* Variants */
.fty-c-btn--primary {
	--fty-btn-bg: var(--fty-primary);
	--fty-btn-fg: var(--fty-primary-fg);
	--fty-btn-hover-bg: var(--fty-primary);
	--fty-btn-hover-opacity: 0.9;
}

.fty-c-btn--cta {
	--fty-btn-bg: var(--fty-orange);
	--fty-btn-fg: #ffffff;
	--fty-btn-hover-bg: var(--fty-orange-hover);
	--fty-btn-hover-opacity: 1;
	border-radius: var(--fty-radius-md);
	box-shadow: var(--fty-shadow-sm);
}

.fty-c-btn--navy {
	--fty-btn-bg: var(--fty-blue-light);
	--fty-btn-fg: #ffffff;
	--fty-btn-hover-bg: var(--fty-blue-dark);
	--fty-btn-hover-opacity: 1;
}

.fty-c-btn--fitblue {
	--fty-btn-bg: var(--fty-blue-dark);
	--fty-btn-fg: #ffffff;
	--fty-btn-hover-bg: var(--fty-blue-sky);
	--fty-btn-hover-opacity: 1;
	font-weight: 700;
	border-radius: var(--fty-radius-lg);
}

.fty-c-btn--outline {
	--fty-btn-bg: transparent;
	--fty-btn-fg: var(--fty-text);
	--fty-btn-border: var(--fty-border);
	--fty-btn-hover-bg: var(--fty-bg-accent);
	--fty-btn-hover-opacity: 1;
	border-radius: var(--fty-radius-lg);
}

.fty-c-btn--ghost {
	--fty-btn-bg: transparent;
	--fty-btn-fg: var(--fty-text);
	--fty-btn-hover-bg: var(--fty-bg-accent);
	--fty-btn-hover-opacity: 1;
}

.fty-c-btn--danger {
	--fty-btn-bg: var(--fty-destructive);
	--fty-btn-fg: #ffffff;
	--fty-btn-hover-bg: var(--fty-destructive);
	--fty-btn-hover-opacity: 0.9;
}

/* ======================================================================================================
   Field — FtyInput / FtyNumber / FtyDatePicker / FtyPassword / FtyTextarea
   .fty-c-field is the opt-in class; the :where(.fty-classic) selectors are the element defaults (no width,
   one element of specificity). `:not(:where([class*="jqx-"]))` leaves jqWidgets' own inputs alone.
   ====================================================================================================== */

.fty-c-field {
	display: block;
	width: 100%;
}

.fty-c-field,
.fty-c-select,
:where(.fty-classic) input:not(:where([class*="jqx-"])):where([type="text"], [type="email"], [type="password"], [type="search"], [type="tel"], [type="url"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], :not([type])),
:where(.fty-classic) textarea:not(:where([class*="jqx-"])),
:where(.fty-classic) select:not(:where([class*="jqx-"])) {
	box-sizing: border-box;
	height: var(--fty-field-height);
	padding: 6px 12px;
	font-family: inherit;
	font-size: var(--fty-font-size);
	font-weight: 400;
	line-height: 1.5;
	color: var(--fty-text);
	background-color: var(--fty-bg-input);
	border: 1px solid var(--fty-border);
	border-radius: var(--fty-radius-md);
	transition: border-color var(--fty-transition), box-shadow var(--fty-transition), background-color var(--fty-transition);
}

.fty-c-field:focus,
.fty-c-select:focus,
:where(.fty-classic) input:not(:where([class*="jqx-"])):where([type="text"], [type="email"], [type="password"], [type="search"], [type="tel"], [type="url"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], :not([type])):focus,
:where(.fty-classic) textarea:not(:where([class*="jqx-"])):focus,
:where(.fty-classic) select:not(:where([class*="jqx-"])):focus {
	background-color: var(--background, #ffffff);
	border-color: var(--fty-blue);
	box-shadow: var(--fty-focus-ring);
	outline: none;
}

.fty-c-field:disabled,
.fty-c-select:disabled,
:where(.fty-classic) input:not(:where([class*="jqx-"])):where([type="text"], [type="email"], [type="password"], [type="search"], [type="tel"], [type="url"], [type="number"], [type="date"], [type="datetime-local"], [type="month"], [type="time"], [type="week"], :not([type])):disabled,
:where(.fty-classic) textarea:not(:where([class*="jqx-"])):disabled,
:where(.fty-classic) select:not(:where([class*="jqx-"])):disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.fty-c-field.is-invalid,
.fty-c-field[aria-invalid="true"],
.fty-c-select.is-invalid,
.fty-c-select[aria-invalid="true"],
:where(.fty-classic) input:not(:where([class*="jqx-"])):where([aria-invalid="true"]),
:where(.fty-classic) textarea:not(:where([class*="jqx-"])):where([aria-invalid="true"]),
:where(.fty-classic) select:not(:where([class*="jqx-"])):where([aria-invalid="true"]) {
	border-color: var(--fty-destructive);
}

.fty-c-field::placeholder,
:where(.fty-classic) input:not(:where([class*="jqx-"]))::placeholder,
:where(.fty-classic) textarea:not(:where([class*="jqx-"]))::placeholder {
	color: var(--fty-text-muted);
	opacity: 1;
}

textarea.fty-c-field,
:where(.fty-classic) textarea:not(:where([class*="jqx-"])) {
	height: auto;
	max-width: 100%; /* a cols-sized textarea grows with the 14px field font; keep it inside its dialog/column */
	padding: 10px 12px;
	line-height: 1.6;
	resize: vertical;
}

/* ======================================================================================================
   Label — FieldLabel
   ====================================================================================================== */

.fty-c-label {
	display: block;
	margin-bottom: 8px;
	font-size: var(--fty-font-size);
	font-weight: 500;
	line-height: 20px;
	color: var(--fty-text-label);
}

.fty-c-label__required {
	margin-left: 2px;
	color: var(--fty-required);
}

/* ======================================================================================================
   Select — native <select> styled as the FtySelect (filled) trigger, with an SVG chevron.
   Shares the field rule above for colours/border/focus; this block sets FtySelect's geometry.
   Element default: single-value selects under .fty-classic get the chevron (field height kept).
   ====================================================================================================== */

.fty-c-select,
:where(.fty-classic) select:not(:where([class*="jqx-"])):where(:not([multiple]):not([size]), [size="1"]) {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 32px;
	background-image: var(--fty-icon-chevron);
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 10px 6px;
	cursor: pointer;
}

/* Multi-value selects keep their list height. */
:where(.fty-classic) select:not(:where([class*="jqx-"])):where([multiple], [size]:not([size="1"])) {
	height: auto;
}

.fty-c-select {
	max-width: 100%;
	height: var(--fty-field-height-lg);
	padding-top: 0;
	padding-bottom: 0;
	padding-left: 12px;
	text-align: left;
}

.fty-c-select--sm {
	height: var(--fty-field-height-sm);
	padding-left: 8px;
	padding-right: 26px;
	font-size: var(--fty-font-size-sm);
	border-radius: var(--fty-radius-sm);
	background-position: right 8px center;
}

.fty-c-select[multiple] {
	height: auto;
	padding: 4px;
	background-image: none;
}

.fty-c-select:disabled {
	cursor: not-allowed;
}

/* ======================================================================================================
   Panel + option — FtySelect / FtyMultiSelect dropdown, menus
   ====================================================================================================== */

.fty-c-panel {
	box-sizing: border-box;
	padding: 4px;
	background: #ffffff;
	border: 1px solid var(--fty-border-subtle);
	border-radius: var(--fty-radius-md);
	box-shadow: var(--fty-shadow-panel);
}

.fty-c-option {
	--fty-option-fg: var(--fty-text);
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 8px 12px;
	font-family: inherit;
	font-size: var(--fty-font-size);
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
	background: none;
	border: none;
	border-radius: var(--fty-radius-sm);
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background-color 0.1s;
}

.fty-c-option,
.fty-c-option:hover,
.fty-c-option:focus {
	color: var(--fty-option-fg);
	text-decoration: none;
}

.fty-c-option:hover,
.fty-c-option.is-active {
	background: var(--fty-bg-hover);
}

.fty-c-option.is-selected,
.fty-c-option[aria-selected="true"] {
	--fty-option-fg: var(--fty-blue);
	background: var(--fty-bg-selected);
	font-weight: 600;
}

.fty-c-option.is-selected:hover,
.fty-c-option.is-selected.is-active,
.fty-c-option[aria-selected="true"]:hover {
	background: var(--fty-bg-selected-hover);
}

.fty-c-option:disabled,
.fty-c-option.is-disabled,
.fty-c-option[aria-disabled="true"] {
	opacity: 0.5;
	cursor: not-allowed;
	background: none;
}

/* ======================================================================================================
   Check — native checkbox / radio (FtyMultiSelect check box geometry)
   ====================================================================================================== */

.fty-c-check {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	flex-shrink: 0;
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	background-color: #ffffff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 16px 16px;
	border: 1px solid var(--fty-border-check);
	border-radius: 4px;
	cursor: pointer;
	transition: background-color var(--fty-transition), border-color var(--fty-transition), box-shadow var(--fty-transition);
}

.fty-c-check[type="radio"] {
	border-radius: 50%;
}

.fty-c-check:checked,
.fty-c-check:indeterminate {
	background-color: var(--fty-blue);
	border-color: var(--fty-blue);
}

.fty-c-check:checked {
	background-image: var(--fty-icon-check);
}

.fty-c-check[type="radio"]:checked {
	background-image: var(--fty-icon-dot);
}

.fty-c-check:indeterminate {
	background-image: var(--fty-icon-dash);
}

.fty-c-check:focus-visible {
	outline: none;
	border-color: var(--fty-blue);
	box-shadow: var(--fty-focus-ring);
}

.fty-c-check:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ======================================================================================================
   Card — FtyCard (+ CardHeader title/subtitle, AccentCard left accent)
   ====================================================================================================== */

.fty-c-card {
	box-sizing: border-box;
	background: var(--fty-bg-surface);
	border: 1px solid var(--fty-border-card);
	border-radius: var(--fty-radius-xl);
	box-shadow: var(--fty-shadow-card);
	overflow: hidden;
}

.fty-c-card__header {
	padding: 16px 24px;
	border-bottom: 1px solid var(--fty-border-card);
}

.fty-c-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	color: var(--fty-heading);
}

.fty-c-card__subtitle {
	margin: 2px 0 0;
	font-size: var(--fty-font-size-xs);
	line-height: 16px;
	color: var(--fty-text-secondary);
}

.fty-c-card__body {
	padding: 24px;
}

.fty-c-card__footer {
	padding: 16px 24px;
	border-top: 1px solid var(--fty-border-card);
}

/* Set --fty-accent on the element (or an ancestor) to change the accent colour. */
.fty-c-card--accent {
	border-left: 4px solid var(--fty-accent, var(--fty-blue));
}

/* ======================================================================================================
   Badges — FtyBadge, CountBadge
   ====================================================================================================== */

.fty-c-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 2px 8px;
	font-size: var(--fty-font-size-xs);
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	vertical-align: middle;
	color: var(--fty-secondary-fg);
	background: var(--fty-secondary);
	border-radius: var(--fty-radius-sm);
}

.fty-c-badge--pill {
	border-radius: var(--fty-radius-pill);
}

.fty-c-badge--primary {
	color: var(--fty-primary-fg);
	background: var(--fty-primary);
}

.fty-c-badge--secondary {
	color: var(--fty-secondary-fg);
	background: var(--fty-secondary);
}

.fty-c-badge--success {
	color: var(--fty-success-fg);
	background: var(--fty-success-bg);
}

.fty-c-badge--warning {
	color: var(--fty-warning-fg);
	background: var(--fty-warning-bg);
}

.fty-c-badge--danger {
	color: var(--fty-danger-fg);
	background: var(--fty-danger-bg);
}

.fty-c-badge--info {
	color: var(--fty-info-fg);
	background: var(--fty-info-bg);
}

.fty-c-count {
	display: inline-block;
	padding: 2px 10px;
	font-size: var(--fty-font-size-sm);
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	color: var(--fty-text-secondary);
	background: var(--fty-bg-hover);
	border-radius: var(--fty-radius-pill);
}

/* ======================================================================================================
   Banners and headings — ListPageBanner, SectionBanner, Heading
   ====================================================================================================== */

.fty-c-banner {
	box-sizing: border-box;
	padding: 24px;
	color: #ffffff;
	background: var(--fty-gradient);
}

.fty-c-banner__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: -0.5px;
	color: #ffffff;
}

.fty-c-banner__subtitle {
	margin: 4px 0 0;
	font-size: var(--fty-font-size);
	line-height: 20px;
	color: var(--fty-banner-subtitle);
}

.fty-c-section-banner {
	box-sizing: border-box;
	min-height: 80px;
	padding: 20px 24px;
	color: #ffffff;
	background: var(--fty-gradient);
	border-radius: var(--fty-radius-lg);
	box-shadow: var(--fty-shadow-md);
}

.fty-c-section-banner__title {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 28px;
	letter-spacing: -0.5px;
	color: #ffffff;
}

.fty-c-section-banner__subtitle {
	margin: 4px 0 0;
	font-size: var(--fty-font-size);
	line-height: 20px;
	color: var(--fty-section-banner-subtitle);
}

.fty-c-heading {
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	background: var(--fty-bg-heading);
}

.fty-c-heading__title {
	margin: 0;
	padding: 8px 0 0 20px;
	font-size: 18px;
	font-weight: 700;
	line-height: 28px;
	color: var(--fty-heading);
}

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

.fty-c-tabs {
	display: flex;
	box-sizing: border-box;
	margin: 0;
	padding: 0 24px;
	list-style: none;
	background: #ffffff;
	border-bottom: 1px solid var(--fty-border-gray);
}

.fty-c-tab {
	--fty-tab-fg: var(--fty-text-secondary);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: -1px;
	padding: 12px 16px;
	font-family: inherit;
	font-size: var(--fty-font-size);
	font-weight: 500;
	line-height: 20px;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	cursor: pointer;
	transition: color var(--fty-transition), border-color var(--fty-transition);
}

.fty-c-tab,
.fty-c-tab:hover,
.fty-c-tab:focus {
	color: var(--fty-tab-fg);
	text-decoration: none;
}

.fty-c-tab:hover:not(:disabled):not(.is-disabled) {
	--fty-tab-fg: var(--fty-text-body);
	border-bottom-color: var(--fty-border-hover);
}

.fty-c-tab.is-active,
.fty-c-tab.is-active:hover,
.fty-c-tab[aria-selected="true"],
.fty-c-tab[aria-selected="true"]:hover {
	--fty-tab-fg: var(--fty-heading);
	border-bottom-color: var(--fty-heading);
}

.fty-c-tab:disabled,
.fty-c-tab.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ======================================================================================================
   Table — FtyDataGrid
   td does not force nowrap (FtyDataGrid does): legacy tables rely on wrapping.
   ====================================================================================================== */

.fty-c-table {
	width: 100%;
	border-collapse: collapse;
}

.fty-c-table th {
	padding: 12px;
	font-size: var(--fty-font-size-xs);
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.6px;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--fty-text-secondary);
	background: var(--fty-bg-th);
}

.fty-c-table td {
	padding: 12px;
	font-size: var(--fty-font-size);
	color: var(--fty-text);
}

.fty-c-table tbody tr {
	border-bottom: 1px solid var(--fty-border-subtle);
	transition: background-color 0.1s;
}

.fty-c-table tbody tr:hover {
	background: var(--fty-bg-row-hover);
}

.fty-c-table--compact th,
.fty-c-table--compact td {
	padding: 8px;
}

.fty-c-table__empty {
	padding: 48px;
	font-size: var(--fty-font-size);
	text-align: center;
	color: var(--fty-text-muted);
}

/* ======================================================================================================
   Pager — FtyTablePager
   ====================================================================================================== */

.fty-c-pager {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	width: 100%;
	padding: 12px 24px;
	border-top: 1px solid var(--fty-border-card);
}

.fty-c-pager__info {
	font-size: var(--fty-font-size);
	color: var(--fty-text-muted);
}

.fty-c-pager__controls {
	display: flex;
	align-items: center;
	gap: 4px;
}

.fty-c-pager__btn {
	--fty-pager-fg: var(--fty-text-secondary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-family: inherit;
	font-size: var(--fty-font-size-sm);
	font-weight: 500;
	background: transparent;
	border: none;
	border-radius: var(--fty-radius-md);
	cursor: pointer;
	transition: background-color var(--fty-transition), color var(--fty-transition);
}

.fty-c-pager__btn,
.fty-c-pager__btn:hover,
.fty-c-pager__btn:focus {
	color: var(--fty-pager-fg);
	text-decoration: none;
}

.fty-c-pager__btn:hover:not(:disabled):not(.is-disabled) {
	background: var(--fty-bg-hover);
}

.fty-c-pager__btn:disabled,
.fty-c-pager__btn.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.fty-c-pager__btn.is-active,
.fty-c-pager__btn.is-active:hover:not(:disabled):not(.is-disabled) {
	--fty-pager-fg: #ffffff;
	background: var(--fty-blue-light);
}

.fty-c-pager__btn.is-active:hover:not(:disabled):not(.is-disabled) {
	background: var(--fty-blue-dark);
}

/* ======================================================================================================
   Dialog — FtyDialog / ConfirmModal (orion.web.app .fty-overlay)
   ====================================================================================================== */

.fty-c-dialog__overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: var(--fty-overlay);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.fty-c-dialog {
	box-sizing: border-box;
	max-width: 100%;
	color: var(--fty-text);
	background: #ffffff;
	border-radius: var(--fty-radius-lg);
	box-shadow: var(--fty-shadow-dialog);
	overflow: hidden;
}

.fty-c-dialog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
}

.fty-c-dialog__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 28px;
	color: var(--fty-heading);
}

.fty-c-dialog__body {
	padding: 16px;
}

.fty-c-dialog__footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px;
	text-align: right;
	border-top: 1px solid var(--fty-border-gray);
}

/* ======================================================================================================
   Skeleton — FtySkeleton bone
   ====================================================================================================== */

.fty-c-skeleton {
	display: block;
	max-width: 100%;
	min-height: 16px;
	background-color: var(--fty-bg-skeleton);
	background-image: linear-gradient(90deg, var(--fty-bg-skeleton) 0%, var(--fty-bg-skeleton-shine) 50%, var(--fty-bg-skeleton) 100%);
	background-size: 200% 100%;
	border-radius: var(--fty-radius-sm);
	animation: fty-c-skeleton-shimmer 1.4s ease-in-out infinite;
}

.fty-c-skeleton--block {
	border-radius: var(--fty-radius-lg);
}

.fty-c-skeleton--circle {
	border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
	.fty-c-skeleton {
		animation: none;
		background-image: none;
	}
}

@keyframes fty-c-skeleton-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}

/* ======================================================================================================
   Alert — inline message box, badge palettes (default: info)
   ====================================================================================================== */

.fty-c-alert {
	box-sizing: border-box;
	padding: 12px 16px;
	font-size: var(--fty-font-size);
	line-height: 1.5;
	color: var(--fty-info-fg);
	background: var(--fty-info-bg);
	border: 1px solid var(--fty-info-border);
	border-radius: var(--fty-radius-md);
}

.fty-c-alert--success {
	color: var(--fty-success-fg);
	background: var(--fty-success-bg);
	border-color: var(--fty-success-border);
}

.fty-c-alert--warning {
	color: var(--fty-warning-fg);
	background: var(--fty-warning-bg);
	border-color: var(--fty-warning-border);
}

.fty-c-alert--danger {
	color: var(--fty-danger-fg);
	background: var(--fty-danger-bg);
	border-color: var(--fty-danger-border);
}

.fty-c-alert--info {
	color: var(--fty-info-fg);
	background: var(--fty-info-bg);
	border-color: var(--fty-info-border);
}

/* ======================================================================================================
   Toast — white card with a 4px severity accent (default: brand blue)
   ====================================================================================================== */

.fty-c-toast {
	--fty-toast-accent: var(--fty-blue);
	box-sizing: border-box;
	padding: 12px 16px;
	font-size: var(--fty-font-size);
	line-height: 1.5;
	color: var(--fty-text);
	background: #ffffff;
	border: 1px solid var(--fty-border-subtle);
	border-left: 4px solid var(--fty-toast-accent);
	border-radius: var(--fty-radius-lg);
	box-shadow: var(--fty-shadow-panel);
}

.fty-c-toast__title {
	margin: 0;
	font-size: var(--fty-font-size);
	font-weight: 600;
	color: var(--fty-text);
}

.fty-c-toast__body {
	margin: 2px 0 0;
	font-size: var(--fty-font-size-sm);
	color: var(--fty-text-muted);
}

.fty-c-toast--success {
	--fty-toast-accent: var(--fty-success-fg);
}

.fty-c-toast--warning {
	--fty-toast-accent: var(--fty-warning-fg);
}

.fty-c-toast--danger {
	--fty-toast-accent: var(--fty-danger-fg);
}

.fty-c-toast--info {
	--fty-toast-accent: var(--fty-info-fg);
}

/* ======================================================================================================
   Element defaults — only under .fty-classic (see header). Form controls are in the Field/Select sections.
   ====================================================================================================== */

html:where(.fty-classic),
:where(.fty-classic) body,
body:where(.fty-classic) {
	font-family: var(--fty-font-sans);
	color: var(--fty-text);
	background-color: var(--fty-bg-page);
}

:where(.fty-classic) h1,
:where(.fty-classic) h2,
:where(.fty-classic) h3,
:where(.fty-classic) h4,
:where(.fty-classic) h5,
:where(.fty-classic) h6 {
	color: var(--fty-heading);
}

:where(.fty-classic) a {
	color: var(--fty-link);
}

:where(.fty-classic) a:hover,
:where(.fty-classic) a:focus {
	color: var(--fty-link-hover);
}

/* ======================================================================================================
   Print — keep printed pages plain: no shadows, gradients, blur or added backgrounds; dark text.
   ====================================================================================================== */

@media print {
	html:where(.fty-classic),
	:where(.fty-classic) body,
	body:where(.fty-classic) {
		background-color: transparent;
	}

	.fty-c-btn,
	.fty-c-card,
	.fty-c-panel,
	.fty-c-dialog,
	.fty-c-section-banner,
	.fty-c-field,
	.fty-c-select,
	.fty-c-check {
		box-shadow: none;
	}

	.fty-c-btn {
		--fty-btn-bg: transparent;
		--fty-btn-hover-bg: transparent;
		--fty-btn-fg: var(--fty-text);
		--fty-btn-border: var(--fty-border-check);
	}

	.fty-c-banner,
	.fty-c-section-banner {
		color: var(--fty-heading);
		background: none;
	}

	.fty-c-banner__title,
	.fty-c-section-banner__title {
		color: var(--fty-heading);
	}

	.fty-c-banner__subtitle,
	.fty-c-section-banner__subtitle {
		color: var(--fty-text-secondary);
	}

	.fty-c-heading,
	.fty-c-table th,
	.fty-c-skeleton,
	.fty-c-count,
	.fty-c-option.is-selected,
	.fty-c-option[aria-selected="true"] {
		background: none;
	}

	.fty-c-badge,
	.fty-c-alert {
		background: none;
		border: 1px solid currentColor;
	}

	.fty-c-badge--primary {
		color: var(--fty-text);
	}

	.fty-c-pager__btn.is-active,
	.fty-c-pager__btn.is-active:hover:not(:disabled):not(.is-disabled) {
		--fty-pager-fg: var(--fty-text);
		background: none;
		font-weight: 700;
	}

	/* Native controls print reliably; a background-image check mark may not. */
	.fty-c-check,
	.fty-c-check:checked,
	.fty-c-check:indeterminate {
		appearance: auto;
		-webkit-appearance: auto;
		background: none;
		border: none;
	}

	.fty-c-select,
	:where(.fty-classic) select:not(:where([class*="jqx-"])) {
		background-image: none;
	}

	.fty-c-dialog__overlay {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		background: none;
	}

	.fty-c-toast {
		display: none;
	}
}
