/* © 2025 Mark Kats. Все права защищены. Копирование и переработка запрещены. */

@import url('./components/buttons.css?v=1786046274');
@import url('./components/checkbox.css?v=1786046274');
@import url('./components/forms.css?v=1786046274');
@import url('./components/module-layout.css?v=1786046274');
@import url('./components/module-settings.css?v=1786046274');
@import url('./components/controller-table.css?v=1786046274');
@import url('./components/list-picker.css?v=1786046274');
@import url('./components/module-finance-register.css?v=1786046274');
@import url('./components/module-finance-settings.css?v=1786046274');

/* ── Design tokens ───────────────────────────────────────────────────────── */

:where(
	body:has(.project-base),
	body:has(.shd-module-page),
	body:has(.agents-page),
	body:has(.agents-terminal-page),
	body:has(.project-index-page),
	body:has(.projects-page),
	body:has(.organizations-page),
	body:has(.scheduling-page),
	body:has(#proposals),
	body:has(.proposal-result-page),
	body:has(.quiz-runtime),
	body:has(.inventory-page),
	body:has(.inventory-public-page),
	body:has(.documents-page),
	body:has(.documents-public-page),
	body:has(.crm-page),
	body:has(.notes-page),
	body:has(.notes-public-shell),
	body:has(.status-page),
	body:has(.tasks-page),
	body:has(#nav-panel)
) {
	--ui-page-bg: #101010;
	--ui-shell-bg: #171717;
	--ui-panel-bg: #202020;
	--ui-panel-bg-strong: #1c1c1c;
	--ui-table-bg: #202020;
	--ui-row: #242424;
	--ui-row-alt: #292929;
	--ui-row-hover: #303336;
	--ui-row-selected-bg: #303336;
	--ui-header-selected-bg: #3e4348;
	--ui-header-bg: #303437;
	--ui-header-bg-strong: #383c40;
	--ui-sticky-bg: #292929;
	--ui-sticky-bg-selected: #353535;
	--ui-group-row-bg: #202020;
	--ui-border-strong: #474b50;
	--ui-border: #43474c;
	--ui-border-grid: #35393e;
	--ui-header-border-v: #4d5359;
	--ui-text: #eaecf0;
	--ui-text-dim: #c0c2c5;
	--ui-text-muted: #96999d;
	--ui-accent: #c7b07a;
	--ui-accent-strong: #dcc796;
	--ui-accent-soft: rgba(199, 176, 122, 0.18);
	--ui-star-active-color: #facc15;
	--ui-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
	--ui-shadow-soft: 0 10px 26px rgba(0, 0, 0, 0.34);
	--ui-panel-chrome-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
	--pi-card-bg:
		linear-gradient(180deg, rgba(10, 12, 18, 0.5), rgba(10, 12, 18, 0.34)),
		linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
	--pi-card-bg-hover:
		linear-gradient(180deg, rgba(10, 12, 18, 0.42), rgba(10, 12, 18, 0.28)),
		linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.06));
	--pi-card-border: rgba(255, 255, 255, 0.14);
	--pi-card-border-hover: rgba(255, 255, 255, 0.24);
	--pi-card-shadow: none;
	--pi-card-shadow-hover: none;
	--ui-overlay-bg: rgba(27, 27, 27, 0.985);
	--ui-tooltip-bg: #1e1e1e;
	--ui-scrollbar-thumb: #53585e;
	--ui-scrollbar-thumb-hover: #656b72;
	--ui-scrollbar-track: #202020;
	--ui-surface: #1b1b1b;
	--ui-nav-pane-bg: rgba(255, 255, 255, 0.08);
	--ui-surface-soft: #252525;
	--ui-surface-hover: #3a3b3d;
	--ui-surface-raised: #252525;
	--ui-active-border: var(--ui-accent);
	--ui-button-active-border: #8a7a55;
	--ui-tab-active-bg: #3a3832;
	--ui-tab-active-border: #8a7a55;
	--ui-tab-active-text: #f2e8d2;
	--ui-primary-bg-hover: #403e37;
	--ui-primary-border-hover: #8a7a55;
	--ui-primary-text-hover: #f2e8d2;
	--ui-primary-bg-active: #34322d;
	--ui-primary-border-active: #77694a;
	--ui-primary-text-active: #f2e8d2;
	--ui-panel-head-bg: #262626;
	--ui-panel-footer-bg: #242424;
	--ui-focus-ring: rgba(199, 176, 122, 0.12);
	--ui-field-border: rgba(255, 255, 255, 0.2);
	--ui-z-context-menu: 1200;
}

html[data-ui-theme='light']
	:where(
		body:has(.project-base),
		body:has(.shd-module-page),
		body:has(.agents-page),
		body:has(.agents-terminal-page),
		body:has(.project-index-page),
		body:has(.projects-page),
		body:has(.organizations-page),
		body:has(.scheduling-page),
		body:has(#proposals),
		body:has(.proposal-result-page),
		body:has(.quiz-runtime),
		body:has(.inventory-page),
		body:has(.inventory-public-page),
		body:has(.documents-page),
		body:has(.documents-public-page),
		body:has(.crm-page),
		body:has(.notes-page),
		body:has(.notes-public-shell),
		body:has(.status-page),
		body:has(.tasks-page),
		body:has(#nav-panel)
	) {
	--ui-page-bg: #edf1f5;
	--ui-shell-bg: #e8edf2;
	--ui-panel-bg: #f4f6f8;
	--ui-panel-bg-strong: #e4eaf0;
	--ui-table-bg: #f8fafc;
	--ui-row: #f8fafc;
	--ui-row-alt: #f1f5f9;
	--ui-row-hover: #e9eef3;
	--ui-row-selected-bg: #e3e9ef;
	--ui-header-selected-bg: #e5e8ec;
	--ui-header-bg: #e5eaef;
	--ui-header-bg-strong: #dbe2e9;
	--ui-sticky-bg: #e4eaf0;
	--ui-sticky-bg-selected: #d8e0e8;
	--ui-group-row-bg: #e4eaf0;
	--ui-border-strong: rgba(31, 41, 55, 0.24);
	--ui-border: rgba(31, 41, 55, 0.16);
	--ui-border-grid: rgba(31, 41, 55, 0.15);
	--ui-header-border-v: rgba(31, 41, 55, 0.25);
	--ui-text: rgb(29, 31, 37);
	--ui-text-dim: rgb(83, 89, 101);
	--ui-text-muted: rgb(97, 102, 112);
	--ui-accent: rgb(83, 89, 101);
	--ui-accent-strong: rgb(29, 31, 37);
	--ui-accent-soft: rgba(75, 85, 99, 0.12);
	--ui-shadow: 0 0 0 1px rgba(15, 23, 42, 0.07), 0 8px 22px rgba(15, 23, 42, 0.11);
	--ui-shadow-soft: 0 0 0 1px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.09);
	--ui-panel-chrome-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 2px rgba(15, 23, 42, 0.06);
	--pi-card-bg: #f8fafc;
	--pi-card-bg-hover: #e6e8eb;
	--pi-card-border: rgba(0, 0, 0, 0.14);
	--pi-card-border-hover: rgba(0, 0, 0, 0.18);
	--pi-card-shadow: var(--ui-card-depth-shadow);
	--pi-card-shadow-hover: var(--ui-card-depth-shadow-hover);
	--ui-overlay-bg: rgba(241, 245, 249, 0.985);
	--ui-tooltip-bg: #f8fafc;
	--ui-scrollbar-thumb: #c4c8ce;
	--ui-scrollbar-thumb-hover: #9ea4ab;
	--ui-scrollbar-track: #f2f4f8;
	--ui-surface: #e8edf2;
	--ui-nav-pane-bg: #f7f9fb;
	--ui-surface-soft: #f8fafc;
	--ui-surface-hover: #e1e8ef;
	--ui-surface-raised: #f8fafc;
	--ui-active-border: rgba(0, 0, 0, 0.18);
	--ui-button-active-border: rgba(0, 0, 0, 0.18);
	--ui-tab-active-bg: #e0e7ef;
	--ui-tab-active-bg-hover: #d6e0ea;
	--ui-tab-active-border: rgba(0, 0, 0, 0.27);
	--ui-tab-active-text: rgb(29, 31, 37);
	--ui-primary-bg-hover: #d9e0e7;
	--ui-primary-border-hover: #727d8c;
	--ui-primary-text-hover: rgb(29, 31, 37);
	--ui-primary-bg-active: #e6e8eb;
	--ui-primary-border-active: #687382;
	--ui-primary-text-active: rgb(29, 31, 37);
	--ui-panel-head-bg: #e4eaf0;
	--ui-panel-footer-bg: #e8edf2;
	--ui-focus-ring: rgba(58, 70, 88, 0.18);
	--ui-field-border: rgba(31, 41, 55, 0.17);
}

:where(.project-base) {
	--pb-column-selected-bg: #2e3134;
	--pb-cell-editing-bg: #3b3b3b;
	--pb-cell-empty-text: #8d8d8d;
	--pb-column-group-header-bg: #2c3033;
	--pb-view-origin-template: #d0a063;
	--pb-view-origin-user: #2c65d2;
	--pb-view-mode-shared: #2c65d2;
	--pb-view-mode-locked: #d81e00;
	--pb-view-mode-private: #009555;
	--pb-tab-custom-active-mix: #3a3832;
	--pb-external-tab-bg: #252a22;
	--pb-external-tab-border: #47493d;
	--pb-external-tab-text: #d9d1bd;
	--pb-external-tab-bg-hover: #2d3428;
	--pb-external-tab-border-hover: #666b57;
	--pb-external-tab-text-hover: #eee6d1;
	--pb-external-tab-bg-active: #262d22;
	--pb-external-tab-border-active: #5a5f4d;
	--pb-external-tab-text-active: #e3dbc6;
	--pb-script-btn-bg: #232a21;
	--pb-script-btn-border: #495544;
	--pb-script-btn-text: #d6e4d2;
	--pb-script-btn-bg-hover: #2b3328;
	--pb-script-btn-border-hover: #5c6957;
	--pb-script-btn-text-hover: #e2ecdf;
	--pb-toggle-bg: #2d2d2d;
	--pb-toggle-border: #4a4a4a;
	--pb-toggle-bg-hover: #3a3832;
	--pb-toggle-border-hover: #8a7a55;
	--pb-chip-link-bg: #2c353f;
	--pb-chip-link-border: #46525f;
	--pb-checkbox-bg: #2d2d2d;
	--pb-checkbox-border: #5a5a5a;
	--pb-checkbox-bg-hover: #3a3832;
	--pb-checkbox-border-hover: #8a7a55;
	--pb-checkbox-checked-bg: rgb(83, 89, 101);
	--pb-checkbox-checked-border: #dcc796;
	--pb-checkbox-checked-text: #171717;
	--pb-checkbox-disabled-bg: #242424;
	--pb-checkbox-disabled-border: #424242;
}
html[data-ui-theme='light'] :where(.project-base) {
	--pb-column-selected-bg: #e3e9ef;
	--pb-cell-editing-bg: #f8fafc;
	--pb-cell-empty-text: #5f6670;
	--pb-column-group-header-bg: #dbe2e9;
	--pb-tab-custom-active-mix: #dfe6ee;
	--pb-external-tab-bg: #f2f7ed;
	--pb-external-tab-border: #c9d8bd;
	--pb-external-tab-text: #43523b;
	--pb-external-tab-bg-hover: #e9f2e1;
	--pb-external-tab-border-hover: #a7bd95;
	--pb-external-tab-text-hover: #2f3d29;
	--pb-external-tab-bg-active: #dfebd7;
	--pb-external-tab-border-active: #9bb184;
	--pb-external-tab-text-active: #2b3826;
	--pb-script-btn-bg: #eef7ea;
	--pb-script-btn-border: #bfd7b6;
	--pb-script-btn-text: #2f673d;
	--pb-script-btn-bg-hover: #e3f0df;
	--pb-script-btn-border-hover: #a8c89e;
	--pb-script-btn-text-hover: #23512f;
	--pb-toggle-bg: #e8eef5;
	--pb-toggle-border: rgba(0, 0, 0, 0.1);
	--pb-toggle-bg-hover: #dce5ee;
	--pb-toggle-border-hover: rgba(0, 0, 0, 0.16);
	--pb-chip-link-bg: #dfe6eb;
	--pb-chip-link-border: #9da9b4;
	--pb-checkbox-bg: #f8fafc;
	--pb-checkbox-border: #8f9baa;
	--pb-checkbox-bg-hover: #e8eef5;
	--pb-checkbox-border-hover: rgba(0, 0, 0, 0.16);
	--pb-checkbox-checked-bg: rgb(83, 89, 101);
	--pb-checkbox-checked-border: rgb(29, 31, 37);
	--pb-checkbox-checked-text: #ffffff;
	--pb-checkbox-disabled-bg: #edf2f7;
	--pb-checkbox-disabled-border: #d1d5db;
}

.shd-module-brand-card {
	--shd-module-brand-title-text: #fff;
	--shd-module-brand-subtitle-text: rgba(214, 201, 170, 0.72);
	--shd-module-brand-icon-bg: rgba(199, 176, 122, 0.16);
	--shd-module-brand-icon-border: rgba(199, 176, 122, 0.45);
	--shd-module-brand-icon-text: #ffffff;
	--shd-module-brand-icon-bg-hover: rgba(199, 176, 122, 0.24);
	--shd-module-brand-icon-border-hover: rgba(199, 176, 122, 0.58);
	--shd-module-brand-button-bg: var(--ui-surface-soft);
	--shd-module-brand-button-border: var(--ui-border);
	--shd-module-brand-button-text: var(--ui-text);
	--shd-module-brand-button-bg-hover: var(--ui-surface-hover);
	--shd-module-brand-button-border-hover: var(--ui-border-strong);
}

html[data-ui-theme='light'] .shd-module-brand-card {
	--shd-module-brand-title-text: rgb(29, 31, 37);
	--shd-module-brand-subtitle-text: rgba(29, 31, 37, 0.78);
	--shd-module-brand-icon-bg: #e6edf4;
	--shd-module-brand-icon-border: rgba(0, 0, 0, 0.16);
	--shd-module-brand-icon-text: rgb(29, 31, 37);
	--shd-module-brand-icon-bg-hover: #dce5ee;
	--shd-module-brand-icon-border-hover: rgba(0, 0, 0, 0.16);
	--shd-module-brand-button-bg: #e8eef5;
	--shd-module-brand-button-border: rgba(0, 0, 0, 0.1);
	--shd-module-brand-button-text: rgb(29, 31, 37);
	--shd-module-brand-button-bg-hover: #dce5ee;
	--shd-module-brand-button-border-hover: rgba(0, 0, 0, 0.16);
}

/* ── Shared Discussion Controls ──────────────────────────────────────────── */

.discussions-message-action.discussions-message-star.is-active,
.discussions-activity-row-action.discussions-activity-star-action.is-active,
.discussions-activity-corner-action.discussions-activity-star-action.is-active,
.pb-discussion-star-button.pb-discussion-star-button.is-active,
.tor-discussion-star.tor-discussion-star.is-active {
	color: var(--ui-star-active-color);
}

/* ── Context Menus ───────────────────────────────────────────────────────── */

#pbContextMenuRoot {
	display: contents;
}

.pb-context-menu {
	--ui-filter-bg: #243c2d;
	--ui-filter-border: #4f725a;
	--ui-filter-text: #dcefe2;
	--ui-filter-text-dim: #8f9f8d;
	--ui-filter-text-bright: #d8eadc;
	--ui-filter-cell: #1d3326;
	--ui-group-bg: #382c44;
	--ui-group-border: #6f5a81;
	--ui-group-text: #e9def4;
	--ui-group-text-dim: #978ca2;
	--ui-group-text-bright: #e8dbf4;
	--ui-group-cell: #2c2237;
	--ui-sort-bg: #3c3023;
	--ui-sort-border: #7a5f45;
	--ui-sort-text: #efdfc5;
	--ui-sort-text-dim: #9d917e;
	--ui-sort-text-bright: #eddcc1;
	--ui-sort-cell: #33271a;
	--ui-hide-bg: #28404a;
	--ui-hide-border: #557588;
	--ui-hide-text: #ddecf4;
	--ui-hide-text-dim: #8c9aa3;
	--ui-hide-text-bright: #dbe8f1;
	--ui-hide-cell: #1e3040;
}

.pb-context-menu {
	position: fixed;
	display: grid;
	gap: 2px;
	min-width: 235px;
	width: 235px;
	max-width: calc(100vw - 16px);
	max-height: calc(100vh - 24px);
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--ui-panel-bg);
	border: 1px solid var(--ui-border-strong);
	border-radius: 12px;
	box-shadow: var(--ui-shadow);
	outline: 1px solid var(--ui-border);
	z-index: var(--ui-z-context-menu);
	padding: 4px;
	font:
		13px/1.35 'Artifakt Element',
		system-ui,
		-apple-system,
		'Segoe UI',
		sans-serif;
	animation: shd-context-menu-enter 120ms ease-out both;
}

@keyframes shd-context-menu-enter {
	from {
		opacity: 0;
		transform: translateY(1px);
	}

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

@media (prefers-reduced-motion: reduce) {
	.pb-context-menu {
		animation: none;
	}
}

html[data-ui-theme='light'] .pb-context-menu {
	--ui-filter-bg: #dcefe1;
	--ui-filter-border: rgba(34, 120, 61, 0.32);
	--ui-filter-text: #21492c;
	--ui-filter-text-dim: #456b4f;
	--ui-filter-text-bright: #173d22;
	--ui-filter-cell: #dcefe1;
	--ui-group-bg: #e8ddf3;
	--ui-group-border: rgba(91, 64, 148, 0.31);
	--ui-group-text: #443050;
	--ui-group-text-dim: #5c4b69;
	--ui-group-text-bright: #352342;
	--ui-group-cell: #e8ddf3;
	--ui-sort-bg: #f4e2c7;
	--ui-sort-border: rgba(156, 94, 26, 0.32);
	--ui-sort-text: #50391d;
	--ui-sort-text-dim: #705735;
	--ui-sort-text-bright: #3f2b14;
	--ui-sort-cell: #f4e2c7;
	--ui-hide-bg: #dcecee;
	--ui-hide-border: rgba(52, 109, 116, 0.31);
	--ui-hide-text: #294f56;
	--ui-hide-text-dim: #4b6b70;
	--ui-hide-text-bright: #203f46;
	--ui-hide-cell: #dcecee;
	background: #f8fafc;
}

html[data-ui-theme='light'] .pb-context-menu button.pb-context-menu-button-base-kind {
	background: #f2f4f8;
	border-color: rgba(75, 85, 99, 0.3);
}

html[data-ui-theme='light'] .pb-context-menu button.pb-context-menu-action {
	background: #f8fafc;
	border-color: rgba(75, 85, 99, 0.26);
}

html[data-ui-theme='light'] .pb-context-menu button.pb-context-menu-button-base-kind:hover,
html[data-ui-theme='light'] .pb-context-menu button.pb-context-menu-action:hover {
	background: #f2f4f8;
	border-color: rgba(75, 85, 99, 0.38);
}

.pb-context-menu :where(button) {
	width: 100%;
	text-align: left;
	display: grid;
	gap: 2px;
	background: transparent;
	border: 1px solid transparent;
	box-sizing: border-box;
	color: var(--ui-text);
	padding: 4px 8px;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	transition:
		background-color 0.14s ease,
		color 0.14s ease,
		opacity 0.14s ease;
}

.pb-context-menu .pb-context-menu-submenu-trigger {
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	text-align: left;
}

.pb-context-menu .pb-context-menu-label {
	min-width: 0;
	white-space: normal;
	overflow-wrap: anywhere;
}

.pb-context-menu .pb-context-menu-submenu-arrow {
	color: var(--ui-text-muted);
	font-size: 18px;
	line-height: 1;
}

.pb-context-menu.pb-context-menu-submenu {
	width: 280px;
	max-width: min(360px, calc(100vw - 16px));
	max-height: min(520px, calc(100vh - 16px));
	overflow-y: auto;
}

.pb-context-menu .pb-context-menu-item:focus-visible {
	outline: 2px solid var(--ui-focus-ring);
	outline-offset: -2px;
}

.pb-context-menu .pb-context-menu-item.danger {
	color: var(--status-danger-text);
}

.pb-context-menu .pb-context-menu-item.danger:hover,
.pb-context-menu .pb-context-menu-item.danger:focus-visible {
	background: var(--status-danger-bg-hover);
	color: var(--status-danger-text-hover);
}

.pb-context-menu strong {
	font-weight: 500;
}

.pb-context-menu :where(button):hover {
	background: var(--ui-surface-hover);
}

.pb-context-menu :where(button):disabled {
	cursor: default;
	opacity: 0.45;
	pointer-events: none;
	box-shadow: none;
}

.pb-context-menu button.pb-context-menu-button-base-kind {
	background: var(--ui-surface-soft);
}

.pb-context-menu button.pb-context-menu-button-base-kind:hover,
.pb-context-menu button.pb-context-menu-action:hover {
	background: var(--ui-surface-hover);
	color: var(--ui-text);
}

.pb-context-menu button.pb-context-menu-action.is-filter-applied {
	background: var(--ui-filter-bg);
	border-color: transparent;
	color: var(--ui-filter-text);
}

.pb-context-menu button.pb-context-menu-action.is-group-applied {
	background: var(--ui-group-bg);
	border-color: transparent;
	color: var(--ui-group-text);
}

.pb-context-menu button.pb-context-menu-action.is-sort-applied {
	background: var(--ui-sort-bg);
	border-color: transparent;
	color: var(--ui-sort-text);
}

.pb-context-menu button.pb-context-menu-action.is-hide-fields-applied {
	background: var(--ui-hide-bg);
	border-color: transparent;
	color: var(--ui-hide-text);
}

.pb-context-menu button.pb-context-menu-action.is-filter-applied:hover,
.pb-context-menu button.pb-context-menu-action.is-group-applied:hover,
.pb-context-menu button.pb-context-menu-action.is-sort-applied:hover,
.pb-context-menu button.pb-context-menu-action.is-hide-fields-applied:hover {
	filter: brightness(1.16);
}

.pb-context-inline-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 3px 9px;
	border-radius: 8px;
}

.pb-context-inline-label {
	min-width: 0;
	color: var(--ui-text);
	white-space: nowrap;
}

.pb-context-inline-actions {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	flex: 0 0 auto;
}

.pb-context-menu .pb-context-inline-choice {
	width: auto;
	min-width: 26px;
	padding: 0px 7px;
	text-align: center;
	border: 1px solid var(--ui-border-strong);
	background: var(--ui-surface-soft);
	border-radius: 8px;
}

.pb-context-menu .pb-context-inline-choice:hover {
	background: var(--ui-surface-hover);
}

.pb-context-menu .pb-context-inline-choice.is-active {
	border-color: var(--ui-accent);
	background: var(--ui-accent-soft);
	color: var(--ui-accent-strong);
}

.pb-context-color-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
	min-width: 220px;
	padding: 4px;
}

.pb-context-color-clear {
	grid-column: 1 / -1;
}

.pb-context-menu .pb-context-color-swatch {
	display: block;
	width: 100%;
	height: 30px;
	padding: 0;
	appearance: none;
	border-radius: 10px;
	border: 1px solid var(--ui-border);
	background-color: var(--ui-swatch-color);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.pb-context-menu .pb-context-color-swatch.is-active {
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.96);
}

.pb-context-meta {
	color: var(--ui-text-dim);
	font-size: 11px;
}

.pb-context-menu-separator {
	height: 1px;
	margin: 4px 6px;
	background: var(--ui-border-strong);
	opacity: 0.72;
}

.pb-form-save-error {
	margin-top: 8px;
	padding: 10px 12px;
	border: 1px solid var(--status-danger-border);
	border-radius: 10px;
	background: var(--status-danger-bg);
	color: var(--status-danger-text);
	font-size: 12px;
	line-height: 1.4;
	white-space: pre-wrap;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

.pb-pagination-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 30px;
	padding: 0 10px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	color: var(--ui-text);
	text-decoration: none;
	font:
		500 12px/1 'Artifakt Element',
		system-ui,
		sans-serif;
	cursor: pointer;
	transition:
		background-color 0.14s ease,
		border-color 0.14s ease;
}

.pb-pagination-link.is-active {
	border-color: var(--ui-tab-active-border);
	background: var(--ui-tab-active-bg);
	color: var(--ui-tab-active-text);
}

.pb-pagination-link.is-disabled {
	opacity: 0.4;
	pointer-events: none;
}

.pb-pagination-link:not(.is-active):not(.is-disabled):hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.22);
}

/* Module layout contract moved to components/module-layout.css. */

/* ── Reports page ────────────────────────────────────────── */

.finance-reports-two-col {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.finance-reports-widget-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-auto-rows: 112px;
	gap: 6px;
}

.shd-overview-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	grid-auto-rows: 112px;
	gap: 6px;
}

.finance-reports-widget-grid .finance-editor-section--wide {
	grid-column: 1 / -1;
}

.finance-overview-grid > .finance-widget-width--2,
.finance-reports-widget-grid > .finance-widget-width--2,
.shd-overview-grid > .finance-widget-width--2 {
	grid-column: span 2;
}

.finance-overview-grid > .finance-widget-width--3,
.finance-reports-widget-grid > .finance-widget-width--3,
.shd-overview-grid > .finance-widget-width--3 {
	grid-column: span 3;
}

.finance-overview-grid > .finance-widget-width--4,
.finance-reports-widget-grid > .finance-widget-width--4,
.shd-overview-grid > .finance-widget-width--4 {
	grid-column: span 4;
}

.finance-overview-grid > .finance-widget-width--5,
.finance-reports-widget-grid > .finance-widget-width--5,
.shd-overview-grid > .finance-widget-width--5 {
	grid-column: span 5;
}

.finance-overview-grid > .finance-widget-width--6,
.finance-reports-widget-grid > .finance-widget-width--6,
.shd-overview-grid > .finance-widget-width--6 {
	grid-column: span 6;
}

.finance-overview-grid > .finance-widget-height--1,
.finance-reports-widget-grid > .finance-widget-height--1 {
	grid-row: span 1;
}

.finance-overview-grid > .finance-widget-height--2,
.finance-reports-widget-grid > .finance-widget-height--2 {
	grid-row: span 2;
}

.finance-overview-grid > .finance-widget-height--3,
.finance-reports-widget-grid > .finance-widget-height--3 {
	grid-row: span 3;
}

.finance-overview-grid > .finance-widget-height--4,
.finance-reports-widget-grid > .finance-widget-height--4 {
	grid-row: span 4;
}

.finance-overview-grid > .finance-widget-height--5,
.finance-reports-widget-grid > .finance-widget-height--5 {
	grid-row: span 5;
}

.finance-overview-grid > .finance-widget-height--6,
.finance-reports-widget-grid > .finance-widget-height--6 {
	grid-row: span 6;
}

.finance-overview-grid > .finance-surface,
.finance-reports-widget-grid > .finance-surface,
.finance-reports-widget-grid > .finance-editor-section {
	height: 100%;
	min-height: 0;
	position: relative;
	background: var(--ui-surface-raised);
	overflow: hidden;
}

.finance-reports-widget-grid > .finance-surface,
.finance-reports-widget-grid > .finance-editor-section {
	display: flex;
	flex-direction: column;
}

.finance-reports-widget-grid > .finance-surface > :not(.finance-surface-head):not(.finance-widget-size-toggle) {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
}

.finance-overview-grid .finance-chart-wrap,
.finance-reports-widget-grid .finance-chart-wrap {
	min-height: 0;
	height: auto;
}

.finance-reports-widget-grid .finance-reports-chart,
.finance-reports-widget-grid .finance-chart-wrap--bar,
.finance-reports-widget-grid .finance-chart-wrap--stacked {
	min-height: 0;
	height: auto;
}

.finance-overview-grid .finance-mini-breakdown,
.finance-reports-widget-grid .finance-editor-table-wrap {
	min-height: 0;
	overflow: auto;
}

.finance-reports-widget-grid .finance-editor-table-wrap {
	overflow-x: hidden;
}

.finance-reports-widget-grid .finance-editor-table-wrap .shd-table {
	width: 100%;
	min-width: 0;
	table-layout: fixed;
}

@media (max-width: 1100px) {
	.finance-kpi-grid,
	.finance-kpi-grid--compact,
	.shd-overview-kpi-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.finance-overview-grid,
	.shd-overview-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.finance-overview-grid .finance-surface--chart {
		grid-column: 1 / -1;
		grid-row: span 1;
		min-height: 300px;
	}

	.finance-settings-form-grid,
	.finance-settings-toggle-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.shd-table-shell {
		min-height: 0;
	}

	.finance-register-toolbar {
		flex: 0 0 auto;
		display: grid;
		grid-template-columns: 1fr;

		align-items: start;
		gap: 6px;
	}

	.finance-register-toolbar + .shd-table-shell {
		margin-top: 0;
	}

	.finance-register-export-actions {
		overflow-x: auto;
		overflow-y: hidden;
	}
}

@media (max-width: 760px) {
	.finance-kpi-grid,
	.finance-kpi-grid--compact,
	.shd-overview-kpi-grid,
	.finance-settings-dialog-body--compact,
	.finance-settings-readonly-grid,
	.finance-settings-dialog .finance-catalog-form {
		grid-template-columns: 1fr;
	}

	.finance-settings-form-grid,
	.finance-settings-toggle-grid {
		grid-template-columns: 1fr;
	}

	.finance-settings-section {
		width: 100%;
	}
}

/* Reports/overview grid mobile responsive */
@media (max-width: 760px) {
	.finance-overview-grid,
	.finance-reports-widget-grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
	}

	.finance-overview-grid > .finance-widget-width--2,
	.finance-overview-grid > .finance-widget-width--3,
	.finance-overview-grid > .finance-widget-width--4,
	.finance-overview-grid > .finance-widget-width--5,
	.finance-overview-grid > .finance-widget-width--6,
	.finance-reports-widget-grid > .finance-widget-width--2,
	.finance-reports-widget-grid > .finance-widget-width--3,
	.finance-reports-widget-grid > .finance-widget-width--4,
	.finance-reports-widget-grid > .finance-widget-width--5,
	.finance-reports-widget-grid > .finance-widget-width--6,
	.finance-reports-widget-grid .finance-editor-section--wide {
		grid-column: auto;
	}

	.finance-overview-grid > .finance-widget-height--1,
	.finance-overview-grid > .finance-widget-height--2,
	.finance-overview-grid > .finance-widget-height--3,
	.finance-overview-grid > .finance-widget-height--4,
	.finance-overview-grid > .finance-widget-height--5,
	.finance-overview-grid > .finance-widget-height--6,
	.finance-reports-widget-grid > .finance-widget-height--1,
	.finance-reports-widget-grid > .finance-widget-height--2,
	.finance-reports-widget-grid > .finance-widget-height--3,
	.finance-reports-widget-grid > .finance-widget-height--4,
	.finance-reports-widget-grid > .finance-widget-height--5,
	.finance-reports-widget-grid > .finance-widget-height--6 {
		grid-row: auto;
	}

	.finance-reports-page {
		overflow-y: auto;
	}

	.finance-reports-widget-grid {
		align-content: start;
	}

	.finance-reports-widget-grid > .finance-surface,
	.finance-reports-widget-grid > .finance-editor-section {
		height: auto;
		min-height: 0;
		min-width: 0;
		overflow: visible;
		padding: 6px;
	}

	.finance-reports-widget-grid .finance-editor-section-head {
		align-items: flex-start;
		flex-wrap: wrap;
		gap: 5px;
		margin-bottom: 6px;
	}

	.finance-reports-widget-grid .finance-editor-section-title {
		min-width: 0;
		font-size: 13px;
		line-height: 1.15;
	}

	.finance-reports-widget-grid .finance-chart-wrap,
	.finance-reports-widget-grid .finance-reports-chart,
	.finance-reports-widget-grid .finance-chart-wrap--bar,
	.finance-reports-widget-grid .finance-chart-wrap--stacked {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		min-height: 220px;
		height: 220px;
		overflow: hidden;
	}

	.finance-reports-widget-grid .finance-chart-wrap canvas {
		max-width: 100%;
	}

	.finance-reports-widget-grid .finance-editor-table-wrap {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		overflow-x: auto;
		overflow-y: auto;
	}

	.finance-reports-widget-grid .finance-editor-table-wrap .shd-table {
		width: max-content;
		min-width: 640px;
		table-layout: auto;
	}

	.finance-reports-widget-grid [data-finance-report-widget='pl'] .shd-table {
		min-width: 520px;
	}

	.finance-reports-widget-grid [data-finance-report-widget='budget_gaps'] .shd-table,
	.finance-reports-widget-grid [data-finance-report-widget='settlements'] .shd-table {
		min-width: 680px;
	}

	.finance-reports-widget-grid [data-finance-report-widget='payment_calendar'] .shd-table,
	.finance-reports-widget-grid [data-finance-report-widget='aging'] .shd-table {
		min-width: 820px;
	}

	.finance-reports-widget-grid .finance-editor-table-wrap .shd-table th,
	.finance-reports-widget-grid .finance-editor-table-wrap .shd-table td {
		max-width: 180px;
		white-space: nowrap;
	}

	.finance-report-kpi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.finance-report-kpi-grid .finance-kpi {
		min-height: 66px;
		padding: 8px;
	}

	.finance-report-kpi-grid .finance-kpi-value {
		font-size: 17px;
		line-height: 1.05;
	}

	.finance-rep-summary {
		flex-wrap: nowrap;
		width: 100%;
		overflow-x: auto;
		padding-bottom: 1px;
	}

	.finance-rep-summary-item {
		flex: 0 0 auto;
		font-size: 11px;
	}

	.finance-reports-cat-list {
		margin-top: 6px;
	}

	.finance-reports-cat-row {
		grid-template-columns: minmax(110px, 1fr) 42px minmax(72px, max-content);
		gap: 5px;
		font-size: 11px;
	}
}

@media (max-width: 760px) {
	.finance-report-presets {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 2px;
	}

	.finance-rep-summary {
		gap: 10px;
	}
}

@media (max-width: 560px) {
	.finance-kpi-grid,
	.finance-kpi-grid--compact,
	.shd-overview-kpi-grid,
	.finance-report-kpi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.finance-kpi,
	.shd-overview-kpi {
		min-height: 64px;
		padding: 9px 10px;
	}

	.finance-kpi-label {
		font-size: 10px;
	}

	.finance-kpi-value {
		margin-top: 4px;
		font-size: 18px;
	}

	.finance-kpi-trend {
		font-size: 10px;
	}
}
