/* СГЕНЕРИРОВАНО tools/build-frag-css.js — НЕ править руками;
 * перегенерировать при изменении report-editor.css/report-constructor.css
 * (запуск из корня /var/www: node html/tools/build-frag-css.js).
 * Скоупнут под .report-frag — алгоритм общий с renderer.js (scopeCss):
 * каждый селектор префиксован, html/body/:root → корень фрагмента,
 * ведущий .dark-theme → .report-frag--dark. Runtime-fallback при
 * рассинхронизации — ReportRenderer.preloadFragmentCss(). */
.report-frag, .report-frag { overflow: auto !important; height: auto !important; }
.report-frag #report-editor {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 100px);
	overflow: hidden;
}
.report-frag #report-editor #main-layout {
	flex-direction: row-reverse;
}
.report-frag #report-editor #left-panel {
	border-right: none;
	border-left: 1px solid var(--border-color);
	background: var(--card-bg);
}
.report-frag #report-editor #center-panel {
	background: var(--bg-color);
}
.report-frag #report-editor #drop-zone {
	background: var(--bg-color);
}
.report-frag--dark #report-editor #left-panel { background: var(--card-bg); }
.report-frag--dark #report-editor .panel-section h3 { color: var(--text-color); }
.report-frag--dark #report-editor .draggable-item {
	background: var(--button-bg);
	color: var(--text-color);
	border-color: var(--border-color);
}
.report-frag--dark #report-editor .draggable-item:hover { background: var(--menu-hover); }
.report-frag--dark #report-editor #desktop-header {
	background: var(--card-bg);
	border-bottom-color: var(--border-color);
	color: var(--text-color);
}
.report-frag--dark #report-editor #report-name-display { color: var(--text-color); }
.report-frag--dark #report-editor .drop-zone {
	background: var(--bg-color);
}
.report-frag--dark #report-editor #empty-desktop-hint { color: var(--text-color); opacity: 0.5; }
.report-frag #report-editor .header-country-wrap {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}
.report-frag #report-editor .header-country-label { font-size: 14px; }
.report-frag #report-editor #report-country-select {
	padding: 3px 8px;
	font-size: 13px;
	border: 1px solid var(--input-border);
	border-radius: 4px;
	background: var(--input-bg);
	color: var(--input-text);
	cursor: pointer;
	max-width: 200px;
}
.report-frag #report-country-select:disabled { opacity: 0.5; cursor: not-allowed; }
.report-frag #report-editor #report-name-display {
	cursor: default;
}
.report-frag #report-editor #report-name-display:hover {
	background: transparent;
	border-color: transparent;
}
.report-frag #report-editor .header-test-badge {
	display: inline-block;
	padding: 0 6px;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	border-radius: 8px;
	background: var(--menu-hover);
	color: var(--text-color);
	border: 1px solid var(--border-color);
	white-space: nowrap;
	cursor: help;
}
.report-frag #report-editor .header-country-wrap.rs-selector-hidden {
	display: none;
}
.report-frag #report-toolbar {
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid var(--border-color);
	background: var(--card-bg);
}
.report-frag #report-toolbar button {
	padding: 6px 14px;
	font-size: 13px;
}
.report-frag #report-toolbar .toolbar-spacer { flex: 1; }
.report-frag .preview-container {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: var(--bg-color);
	z-index: 100;
	display: flex;
	flex-direction: column;
}
.report-frag .preview-toolbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-bottom: 1px solid var(--border-color);
	background: var(--card-bg);
}
.report-frag .preview-iframe {
	flex: 1;
	width: 100%;
	border: none;
	background: #fff;
}
.report-frag--dark #report-editor .report-container {
	border-color: var(--border-color) !important;
}
.report-frag--dark #report-editor .container-drop-zone {
	background: transparent;
}
.report-frag--dark #report-editor .widget-item {
	background: var(--card-bg);
	border-color: var(--border-color);
}
.report-frag--dark #report-editor .widget-item.selected {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px var(--primary);
}
.report-frag--dark #report-editor .widget-type-label {
	background: var(--menu-bg);
	color: var(--text-color);
}
.report-frag--dark #report-editor .container-col {
	border-color: var(--border-color) !important;
}
.report-frag--dark #report-editor .container-col.drag-over, .report-frag--dark #report-editor .container-col.selected {
	border-color: var(--primary) !important;
}
.report-frag--dark #report-editor h3, .report-frag--dark #report-editor .cd-section-header {
	border-color: var(--border-color) !important;
}
.report-frag--dark #report-editor .container-drag-handle, .report-frag--dark #report-editor .widget-drag-handle {
	background: var(--button-bg);
	border-color: var(--border-color);
	color: var(--text-color);
}
.report-frag--dark #report-editor .container-drag-handle:hover, .report-frag--dark #report-editor .widget-drag-handle:hover {
	background: var(--menu-hover);
	color: var(--text-color);
}
.report-frag--dark #report-editor .container-action-btn {
	background: var(--button-bg);
	border-color: var(--border-color);
	color: var(--text-color);
}
.report-frag--dark #report-editor .container-action-btn:hover {
	background: #e74c3c;
	color: #fff;
	border-color: #e74c3c;
}
.report-frag--dark #report-editor .chart-widget-loading {
	background: var(--menu-bg);
	border-color: var(--border-color);
	color: var(--subtle, #8aa0c0);
}
.report-frag--dark #report-editor .widget-text-content table th {
	background: var(--tbl-head-bg, #273449);
	color: var(--text-color, #e2e8f0);
}
.report-frag--dark #report-editor .widget-text-content table th, .report-frag--dark #report-editor .widget-text-content table td {
	
	border-color: var(--table-border, rgba(148,163,184,0.5));
}
.report-frag--dark #report-editor .widget-text-content table tr:nth-child(even) td {
	background: var(--tbl-even-bg, #1b2536);
}
.report-frag #report-editor .modal-overlay {
	background: rgba(0,0,0,0.5);
}
.report-frag--dark #report-editor .modal-window {
	background: var(--card-bg);
	color: var(--text-color);
}
.report-frag--dark #report-editor .modal-header {
	background: var(--primary);
	border-bottom-color: var(--border-color);
}
.report-frag--dark #report-editor .settings-field label { color: var(--text-color); }
.report-frag--dark #report-editor .settings-field input, .report-frag--dark #report-editor .settings-field select, .report-frag--dark #report-editor .settings-field textarea {
	background: var(--input-bg);
	color: var(--input-text);
	border-color: var(--input-border);
}
.report-frag--dark #report-editor .settings-section h4 { color: var(--text-color); }
.report-frag--dark #report-editor .tiptap-editor-wrapper {
	background: var(--input-bg, #1e293b);
	border-color: var(--border-color);
}
.report-frag--dark #report-editor .tiptap-toolbar {
	background: var(--menu-bg);
	border-color: var(--border-color);
}
.report-frag--dark #report-editor .tiptap-toolbar .toolbar-group {
	border-right-color: var(--border-color);
}
.report-frag--dark #report-editor .tiptap-toolbar button {
	color: var(--text-color);
}
.report-frag--dark #report-editor .tiptap-toolbar button:hover {
	background: var(--menu-hover);
	color: var(--text-color);
}
.report-frag--dark #report-editor .tiptap-toolbar button.is-active {
	background: rgba(96,165,250,0.22);
	color: #6db0ff;
	border-color: rgba(96,165,250,0.45);
}
.report-frag--dark #report-editor .tiptap-toolbar button.toolbar-btn-separator {
	background: var(--border-color);
}
.report-frag--dark #report-editor .tiptap-toolbar select.toolbar-select {
	background: var(--input-bg);
	color: var(--input-text);
	border-color: var(--input-border);
}
.report-frag--dark #report-editor .tiptap-toolbar select.toolbar-select:hover {
	border-color: var(--input-border);
}
.report-frag--dark #report-editor #wysiwyg-editor-container .ProseMirror {
	color: var(--text-color);
}
.report-frag--dark #report-editor #wysiwyg-editor-container .ProseMirror table th {
	background: var(--tbl-head-bg, #273449);
	color: var(--text-color, #e2e8f0);
}
.report-frag--dark #report-editor #wysiwyg-editor-container .ProseMirror table td, .report-frag--dark #report-editor #wysiwyg-editor-container .ProseMirror table th {
	border-color: var(--table-border, rgba(148,163,184,0.5));
}
.report-frag--dark #report-editor #wysiwyg-editor-container .ProseMirror table .selectedCell {
	background: rgba(96,165,250,0.25);
}
.report-frag--dark #report-editor .ProseMirror a {
	color: #6db0ff;
}
.report-frag #report-toolbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	background: var(--card-bg);
	border-bottom: 1px solid var(--border-color);
	flex-shrink: 0;
	flex-wrap: wrap;
}
.report-frag #report-toolbar .toolbar-spacer { flex: 1; }
.report-frag #report-editor #left-panel.collapsed {
	width: 0 !important;
	min-width: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border-left: none;
}
.report-frag #report-editor .preview-container {
	background: var(--card-bg);
	padding: 16px;
}
.report-frag .chart-widget-container {
	position: relative;
	width: 100%;
	min-height: 250px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: stretch;
}
.report-frag .chart-widget-container.chart-layout-bottom {
	flex-direction: column;
}
.report-frag .chart-widget-container.chart-layout-side {
	flex-direction: row;
}
.report-frag .chart-canvas-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 250px;
}
.report-frag .chart-widget-container .chart-canvas {
	max-height: 400px;
	display: block;
}
.report-frag .chart-layout-bottom .chart-legend-side {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 12px;
	row-gap: 4px;
	width: 100%;
	padding: 6px 2px 2px;
	border-top: 1px solid var(--border-color, #ddd);
}
.report-frag--dark .chart-layout-bottom .chart-legend-side {
	border-top-color: var(--border-color, #444);
}
.report-frag .chart-layout-side .chart-legend-side {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	row-gap: 4px;
	flex-shrink: 0;
	width: 200px;
	max-height: 400px;
	overflow-y: auto;
	padding: 4px 6px;
	border-left: 1px solid var(--border-color, #ddd);
}
.report-frag--dark .chart-layout-side .chart-legend-side {
	border-left-color: var(--border-color, #444);
}
.report-frag .chart-layout-side .chart-legend-side .chart-main-info {
	margin: 0 0 6px 0;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--border-color, #ddd);
}
.report-frag--dark .chart-layout-side .chart-legend-side .chart-main-info {
	border-bottom-color: var(--border-color, #444);
}
@media (max-width: 600px) {.report-frag .chart-widget-container, .report-frag .chart-widget-container.chart-layout-side {
		flex-direction: column;
	}
.report-frag .chart-layout-side .chart-legend-side {
		width: 100%;
		max-height: none;
		overflow-y: visible;
		border-left: none;
		border-top: 1px solid var(--border-color, #ddd);
	}
}
.report-frag .chart-widget-loading, .report-frag .chart-widget-error, .report-frag .chart-widget-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	font-size: 13px;
	color: var(--subtle, #999);
	text-align: center;
	padding: 20px;
}
.report-frag .chart-widget-error {
	color: var(--error-text, #e74c3c);
}
.report-frag .chart-caption-overlay {
	position: absolute;
	z-index: 10;
	pointer-events: none;
	font-weight: 500;
	max-width: 90%;
	word-wrap: break-word;
}
.report-frag .chart-caption-overlay.pos-top-left { top: 4px; left: 8px; }
.report-frag .chart-caption-overlay.pos-top-center { top: 4px; left: 50%; transform: translateX(-50%); text-align: center; }
.report-frag .chart-caption-overlay.pos-top-right { top: 4px; right: 8px; text-align: right; }
.report-frag .chart-caption-overlay.pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.report-frag .chart-caption-overlay.pos-bottom-left { bottom: 4px; left: 8px; }
.report-frag .chart-caption-overlay.pos-bottom-center { bottom: 4px; left: 50%; transform: translateX(-50%); text-align: center; }
.report-frag .chart-caption-overlay.pos-bottom-right { bottom: 4px; right: 8px; text-align: right; }
.report-frag .chart-widget-label {
	text-align: center;
	font-size: 12px;
	color: var(--subtle, #888);
	padding: 4px 8px;
	border-top: 1px solid var(--border-color);
}
.report-frag--dark .chart-widget-label { color: var(--subtle, #8aa0c0); }
.report-frag .radar-widget-container {
	position: relative;
	width: 100%;
	min-height: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.report-frag .radar-canvas {
	max-width: 500px;
	max-height: 400px;
	display: block;
}
.report-frag .radar-loading, .report-frag .radar-error, .report-frag .radar-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	font-size: 13px;
	color: var(--subtle, #999);
	text-align: center;
	padding: 20px;
}
.report-frag .radar-error {
	color: var(--error-text, #e74c3c);
}
.report-frag .radar-widget-label {
	text-align: center;
	font-size: 12px;
	color: var(--subtle, #888);
	padding: 4px 8px;
	border-top: 1px solid var(--border-color);
}
.report-frag--dark .radar-widget-label { color: var(--subtle, #8aa0c0); }
.report-frag #report-editor #drop-zone.drop-zone-empty-hl {
	outline: 3px dashed var(--primary);
	outline-offset: -8px;
	background: rgba(25, 118, 210, 0.05);
	min-height: 100px;
}
.report-frag--dark #report-editor #drop-zone.drop-zone-empty-hl {
	background: rgba(100, 181, 246, 0.08);
}
.report-frag #report-toolbar .btn-save-dirty {
	border-color: var(--primary) !important;
	box-shadow: 0 0 4px var(--primary);
	font-weight: 700;
}
.report-frag--dark #report-toolbar .btn-save-dirty {
	border-color: var(--primary) !important;
	box-shadow: 0 0 6px var(--primary);
}
.report-frag #report-editor .report-ai-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 10px;
	margin-left: 8px;
	font-size: 11px;
	font-weight: 600;
	color: var(--text-color);
	background: var(--menu-hover);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	vertical-align: middle;
	line-height: 1.4;
	cursor: help;
}
.report-frag #report-editor .report-ai-badge[hidden] { display: none !important; }
.report-frag #report-editor .report-ai-badge-text { opacity: 0.85; }
.report-frag #report-toolbar #btn-clear-ai-mark {
	background: var(--button-bg);
	color: var(--text-color);
	border: 1px dashed var(--border-color);
}
.report-frag #report-toolbar #btn-clear-ai-mark:hover {
	background: var(--menu-hover);
	border-color: var(--error-text);
	color: var(--error-text);
}
.report-frag #report-editor .widget-item.widget-locked {
	position: relative;
}
.report-frag #report-editor .widget-item.widget-locked::before {
	content: "🔒";
	position: absolute;
	top: 4px;
	right: 4px;
	font-size: 12px;
	opacity: 0.6;
	z-index: 10;
	pointer-events: none;
}
.report-frag #report-editor .widget-item.widget-locked .widget-drag-handle, .report-frag #report-editor .widget-item.widget-locked .widget-delete-btn {
	display: none !important;
}
.report-frag #report-editor .widget-item.widget-locked .widget-type-label {
	font-style: italic;
	opacity: 0.85;
}
.report-frag #report-editor .settings-locked-banner {
	background: var(--success-bg);
	color: var(--success-text);
	border: 1px solid var(--success-text);
	border-left-width: 4px;
	border-radius: 4px;
	padding: 10px 12px;
	margin-bottom: 14px;
	font-size: 13px;
	line-height: 1.5;
}
.report-frag #report-editor .settings-locked-banner-title {
	font-weight: 600;
	margin-bottom: 6px;
}
.report-frag #report-editor .settings-locked-banner-hint {
	font-size: 12px;
	opacity: 0.85;
	margin-bottom: 8px;
}
.report-frag #report-editor .settings-unlock-btn {
	background: var(--card-bg);
	color: var(--text-color);
	border: 1px solid var(--border-color);
	border-radius: 4px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}
.report-frag #report-editor .settings-unlock-btn:hover {
	background: var(--menu-hover);
	border-color: var(--primary);
	color: var(--link-color);
}
.report-frag #report-editor .settings-unlock-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.report-frag #report-settings-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	align-items: center;
	justify-content: center;
}
.report-frag #report-settings-modal.show {
	display: flex;
}
.report-frag #report-settings-modal .rs-window {
	
	max-width: min(680px, 92vw);
	background: var(--card-bg);
	color: var(--text-color);
}
.report-frag--dark #report-settings-modal .rs-window {
	background: var(--card-bg);
	color: var(--text-color);
}
.report-frag #report-settings-modal .modal-header h3 { color: var(--text-color); }
.report-frag #report-settings-modal .modal-header {
	border-bottom: 1px solid var(--border-color);
}
.report-frag--dark #report-settings-modal .modal-close-btn:hover {
	background: var(--menu-hover);
	color: var(--text-color);
}
.report-frag #report-settings-modal .rs-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.report-frag #report-settings-modal .rs-row {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}
.report-frag #report-settings-modal .rs-label {
	min-width: 210px;
	flex-shrink: 0;
	color: var(--text-color);
}
.report-frag #report-settings-modal .rs-row-name {
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
.report-frag #report-settings-modal .rs-row-name .rs-label {
	min-width: 0;
	flex-shrink: 1;
}
.report-frag #report-settings-modal .rs-row-annotation {
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
.report-frag #report-settings-modal .rs-row-annotation .rs-label {
	min-width: 0;
	flex-shrink: 1;
}
.report-frag #report-settings-modal #rs-annotation {
	width: 100%;
	min-height: 64px;
	resize: vertical;
	padding: 5px 8px;
	font-size: 13px;
	font-family: inherit;
	line-height: 1.45;
	border: 1px solid var(--input-border);
	border-radius: 4px;
	background: var(--input-bg);
	color: var(--input-text);
}
.report-frag #report-settings-modal #rs-annotation:focus {
	outline: none;
	border-color: var(--primary);
}
.report-frag #report-settings-modal .rs-annotation-hint {
	font-size: 11px;
	color: var(--text-color);
	opacity: 0.65;
}
.report-frag #report-settings-modal .rs-orig {
	display: flex;
	gap: 8px;
	align-items: baseline;
	font-size: 12px;
	color: var(--text-color);
	opacity: 0.65;
	background: var(--input-bg);
	border: 1px dashed var(--border-color);
	border-radius: 6px;
	padding: 5px 10px;
	overflow-wrap: anywhere;
}
.report-frag #report-settings-modal .rs-orig-label {
	flex-shrink: 0;
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.report-frag #report-settings-modal .rs-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
}
.report-frag #report-settings-modal .rs-grid.rs-grid-vis {
	grid-template-columns: 1fr 1fr;
}
.report-frag #report-settings-modal .rs-grid .rs-row {
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
}
.report-frag #report-settings-modal .rs-grid .rs-label {
	min-width: 0;
	flex-shrink: 1;
}
@media (max-width: 560px) {.report-frag #report-settings-modal .rs-grid, .report-frag #report-settings-modal .rs-grid.rs-grid-vis {
		grid-template-columns: 1fr;
	}
}
.report-frag #report-settings-modal select {
	flex: 1;
	min-width: 0;
	padding: 5px 8px;
	font-size: 13px;
	border: 1px solid var(--input-border);
	border-radius: 4px;
	background: var(--input-bg);
	color: var(--input-text);
	cursor: pointer;
}
.report-frag #report-settings-modal select:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.report-frag #report-settings-modal input[type="text"] {
	flex: 1;
	min-width: 0;
	padding: 5px 8px;
	font-size: 13px;
	border: 1px solid var(--input-border);
	border-radius: 4px;
	background: var(--input-bg);
	color: var(--input-text);
}
.report-frag #report-settings-modal input[type="text"]:focus {
	outline: none;
	border-color: var(--primary);
}
.report-frag #report-settings-modal input[type="number"] {
	width: 100%;
	box-sizing: border-box;
	padding: 5px 8px;
	font-size: 13px;
	border: 1px solid var(--input-border);
	border-radius: 4px;
	background: var(--input-bg);
	color: var(--input-text);
}
.report-frag #report-settings-modal input[type="number"]:focus {
	outline: none;
	border-color: var(--primary);
}
.report-frag #report-settings-modal .rs-show-hint {
	padding-left: 0;
	margin: 6px 0 0;
}
.report-frag #report-settings-modal .rs-show-hint[hidden] { display: none; }
.report-frag #report-settings-modal .rs-checks {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: var(--bg-color);
}
.report-frag #report-settings-modal .rs-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--text-color);
	cursor: pointer;
}
.report-frag #report-settings-modal .rs-check input[type="checkbox"] {
	accent-color: var(--primary);
	width: 15px;
	height: 15px;
	cursor: pointer;
}
.report-frag #report-settings-modal .rs-check input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}
.report-frag #report-settings-modal .rs-check-hint {
	font-size: 12px;
	opacity: 0.75;
	color: var(--text-color);
	padding-left: 23px;
}
.report-frag #report-settings-modal .rs-check-hint[hidden] { display: none; }
.report-frag #report-settings-modal .rs-checks-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-color);
	opacity: 0.8;
}
.report-frag #report-settings-modal .rs-advanced {
	border: 1px dashed var(--border-color);
	border-radius: 6px;
	padding: 8px 12px;
}
.report-frag #report-settings-modal .rs-advanced summary {
	font-size: 12px;
	color: var(--text-color);
	opacity: 0.8;
	cursor: pointer;
	user-select: none;
	margin-bottom: 4px;
}
.report-frag #report-settings-modal .rs-advanced .rs-row { margin-top: 6px; }
.report-frag #report-settings-modal .rs-advanced-note {
	margin: 8px 0 0;
	font-size: 12px;
	opacity: 0.7;
	color: var(--text-color);
}
.report-frag #report-settings-modal .rs-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 18px;
	border-top: 1px solid var(--border-color);
	flex-shrink: 0;
}
.report-frag #report-editor .report-settings-badges {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px;
	margin-left: 8px;
	cursor: help;
}
.report-frag #report-editor .rs-badge {
	display: inline-block;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--text-color);
	background: var(--menu-hover);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	white-space: nowrap;
}
.report-frag--dark #report-editor .rs-badge {
	color: var(--text-color);
	background: var(--menu-hover);
}
.report-frag #report-editor .panel-widgets-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}
.report-frag #report-editor .wf-btn {
	position: relative;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	padding: 0;
	background: var(--button-bg);
	border: 1px solid var(--border-color);
	border-radius: 4px;
	color: var(--text-color);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.report-frag #report-editor .wf-btn:hover {
	background: var(--menu-hover);
	border-color: var(--primary);
	color: var(--link-color);
}
.report-frag #report-editor .wf-btn.active {
	background: var(--menu-hover);
	border-color: var(--primary);
	color: var(--link-color);
}
.report-frag #report-editor .wf-badge {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 14px;
	height: 14px;
	padding: 0 3px;
	font-size: 9px;
	font-weight: 700;
	line-height: 14px;
	text-align: center;
	border-radius: 7px;
	background: var(--primary);
	color: var(--on-primary, #fff);
}
.report-frag #report-editor .wf-badge[hidden] { display: none; }
.report-frag #report-editor .wf-empty-hint {
	padding: 4px 2px 6px;
	font-size: 12px;
	color: var(--text-color);
	opacity: 0.75;
}
.report-frag #widget-filter-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
}
.report-frag #widget-filter-modal.show {
	display: flex;
}
.report-frag #widget-filter-modal .wf-window {
	max-width: min(440px, 92vw);
	background: var(--card-bg);
	color: var(--text-color);
}
.report-frag #widget-filter-modal .modal-header h3 { color: var(--text-color); }
.report-frag #widget-filter-modal .modal-header {
	border-bottom: 1px solid var(--border-color);
}
.report-frag--dark #widget-filter-modal .modal-close-btn:hover {
	background: var(--menu-hover);
	color: var(--text-color);
}
.report-frag #widget-filter-modal .wf-seg {
	display: inline-flex;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	overflow: hidden;
}
.report-frag #widget-filter-modal .wf-seg label {
	position: relative;
	display: inline-flex;
}
.report-frag #widget-filter-modal .wf-seg label + label {
	border-left: 1px solid var(--border-color);
}
.report-frag #widget-filter-modal .wf-seg input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.report-frag #widget-filter-modal .wf-seg span {
	display: block;
	padding: 5px 14px;
	font-size: 12.5px;
	color: var(--text-color);
	background: var(--bg-color);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	transition: background 0.15s, color 0.15s;
}
.report-frag #widget-filter-modal .wf-seg span em {
	font-style: normal;
	opacity: 0.7;
}
.report-frag #widget-filter-modal .wf-seg input:checked + span {
	background: var(--primary);
	color: var(--on-primary, #fff);
}
.report-frag #widget-filter-modal .wf-seg input:focus + span {
	outline: 2px solid var(--primary);
	outline-offset: -2px;
}
.report-frag #widget-filter-modal .wf-seg-hint {
	margin-top: 6px;
	font-size: 11.5px;
	color: var(--text-color);
	opacity: 0.75;
}
.report-frag #widget-filter-modal .wf-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 10px 12px;
	margin-top: 10px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
	background: var(--bg-color);
}
.report-frag #widget-filter-modal .wf-group-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-color);
	opacity: 0.8;
}
.report-frag #widget-filter-modal .wf-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--text-color);
	cursor: pointer;
}
.report-frag #widget-filter-modal .wf-check input[type="checkbox"] {
	accent-color: var(--primary);
	width: 15px;
	height: 15px;
	cursor: pointer;
	flex-shrink: 0;
}
.report-frag #widget-filter-modal .wf-count {
	margin-top: 12px;
	font-size: 12px;
	color: var(--text-color);
	opacity: 0.75;
}
.report-frag #widget-filter-modal .wf-count-note {
	margin-top: 2px;
	font-size: 12px;
	color: var(--text-color);
	opacity: 0.75;
}
.report-frag #widget-filter-modal .wf-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 18px;
	border-top: 1px solid var(--border-color);
	flex-shrink: 0;
}
.report-frag, .report-frag *, .report-frag *::before, .report-frag *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.report-frag, .report-frag {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text-color);
    background: var(--bg-color);
    overflow: hidden;
}
.report-frag #app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.report-frag #header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 0 16px;
    background: #1a2639;
    color: #fff;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.report-frag #header h1 {
    font-size: 18px;
    font-weight: 600;
    margin-right: 16px;
    white-space: nowrap;
}
.report-frag #tab-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
    position: relative;
    padding-left: 3px;
    padding-right: 3px;
}
.report-frag #tab-bar.drop-indicator-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: #2e86de;
    border-radius: 2px;
    pointer-events: none;
    animation: tabPlaceholderPulse 1s ease-in-out infinite;
    z-index: 5;
}
.report-frag #tab-bar.drop-indicator-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: #2e86de;
    border-radius: 2px;
    pointer-events: none;
    animation: tabPlaceholderPulse 1s ease-in-out infinite;
    z-index: 5;
}
.report-frag .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s;
}
.report-frag .btn-primary {
    background: #2e86de;
    color: #fff;
}
.report-frag .btn-primary:hover {
    background: #2271c9;
}
.report-frag .btn-success {
    background: #27ae60;
    color: #fff;
}
.report-frag .btn-success:hover {
    background: #1e8a4d;
}
.report-frag .btn-info {
    background: #3498db;
    color: #fff;
}
.report-frag .btn-info:hover {
    background: #2980b9;
}
.report-frag .btn-warning {
    background: #e67e22;
    color: #fff;
}
.report-frag .btn-warning:hover {
    background: #d35400;
}
.report-frag .btn-secondary {
    background: #7f8c8d;
    color: #fff;
}
.report-frag .btn-secondary:hover {
    background: #6c7a7d;
}
.report-frag .btn-danger {
    background: #e74c3c;
    color: #fff;
}
.report-frag .btn-danger:hover {
    background: #c0392b;
}
.report-frag .btn-purple {
    background: #8e44ad;
    color: #fff;
}
.report-frag .btn-purple:hover {
    background: #71368a;
}
.report-frag .btn-small {
    padding: 4px 8px;
    font-size: 12px;
    background: #34495e;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}
.report-frag .btn-small:hover {
    background: #2c3e50;
}
.report-frag .tab-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.1);
    color: #ccc;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    user-select: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
}
.report-frag .tab-item:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.report-frag .tab-item.active {
    background: #f0f2f5;
    color: #333;
    font-weight: 600;
}
.report-frag .tab-item.dragging {
    opacity: 0.4;
    border: 1px dashed rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.05);
}
.report-frag .tab-item.drag-over {
    border-left: 3px solid #2e86de;
    padding-left: 9px;
}
.report-frag .tab-item.drag-over-right {
    border-right: 3px solid #2e86de;
    padding-right: 9px;
}
.report-frag .tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 12px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
    flex-shrink: 0;
}
.report-frag .tab-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.15);
}
.report-frag .tab-drag-placeholder {
    display: inline-flex;
    width: 3px;
    min-height: 28px;
    background: #2e86de;
    border-radius: 2px;
    margin: 0 2px;
    flex-shrink: 0;
    pointer-events: none;
    animation: tabPlaceholderPulse 1s ease-in-out infinite;
}
@keyframes tabPlaceholderPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.report-frag #main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    gap: 0;
}
.report-frag #left-panel {
    width: 220px;
    min-width: 220px;
    background: #fff;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 12px;
    flex-shrink: 0;
    transition: width 0.25s ease, min-width 0.25s ease, padding 0.25s ease, opacity 0.25s ease;
}
.report-frag #left-panel.collapsed {
    width: 0;
    min-width: 0;
    padding: 12px 0;
    overflow: hidden;
    opacity: 0;
    border-right-color: transparent;
}
.report-frag #btn-toggle-panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    padding: 4px 6px;
    transition: background 0.2s;
    flex-shrink: 0;
    min-width: 28px;
    min-height: 24px;
}
.report-frag #btn-toggle-panel svg {
    display: block;
    transition: transform 0.25s ease;
}
.report-frag #btn-toggle-panel.panel-hidden svg {
    transform: rotate(180deg);
}
.report-frag .panel-section {
    margin-bottom: 20px;
}
.report-frag .panel-section h3 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #7f8c8d;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.report-frag .cd-section-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
}
.report-frag .cd-section-header:hover { opacity: 0.8; }
.report-frag .cd-toggle-arrow {
    font-size: 10px;
    display: inline-block;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.report-frag .cd-section-header.open .cd-toggle-arrow { transform: rotate(90deg); }
.report-frag .cd-section-content { margin-top: 4px; }
.report-frag .dev-badge {
    font-size: 9px;
    font-weight: 400;
    text-transform: none;
    background: var(--error-bg, #fee);
    color: var(--error-text, #c33);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: auto;
    line-height: 1.4;
}
.report-frag .panel-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.report-frag .btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 8px 14px;
    font-size: 13px;
}
.report-frag .draggable-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: grab;
    font-size: 13px;
    user-select: none;
    transition: background 0.2s, border-color 0.2s;
}
.report-frag .draggable-item:hover {
    background: #e9ecef;
    border-color: #ced4da;
}
.report-frag .draggable-item:active {
    cursor: grabbing;
}
.report-frag .draggable-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.report-frag .draggable-item .col-icon {
    display: block;
    vertical-align: middle;
}
.report-frag .draggable-stub {
    opacity: 0.5;
}
.report-frag .draggable-stub::after {
    content: ' (в разработке)';
    font-size: 11px;
    color: #999;
}
.report-frag .dragging-source {
    opacity: 0.4;
}
.report-frag #center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    min-width: 0;
}
.report-frag #desktop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}
.report-frag #report-name-display {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: border-color 0.2s, background 0.2s;
}
.report-frag #report-name-display:hover {
    background: #f0f2f5;
    border-color: #ddd;
}
.report-frag .report-name-input {
    font-weight: 600;
    font-size: 15px;
    padding: 2px 6px;
    border: 1px solid #2e86de;
    border-radius: 3px;
    outline: none;
    width: 300px;
    font-family: inherit;
    background: #fff;
}
.report-frag #drop-zone {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    min-height: 200px;
}
.report-frag #empty-desktop-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #b0b0b0;
    font-size: 16px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    user-select: none;
}
.report-frag #drop-zone.drag-over {
    background: #e8f4fd;
}
.report-frag #drop-zone.drag-over #empty-desktop-hint {
    border-color: #2e86de;
    color: #2e86de;
}
.report-frag .report-container {
    margin-bottom: 16px;
    border: 2px dashed transparent;
    border-radius: 6px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.report-frag .report-container:hover {
    border-color: #bdc3c7;
}
.report-frag .report-container.selected {
    border-color: #2e86de;
    box-shadow: 0 0 0 2px rgba(46,134,222,0.2);
}
.report-frag .report-container.drag-over {
    border-color: #2e86de;
    background: rgba(46,134,222,0.05);
}
.report-frag .container-actions {
    position: absolute;
    top: -10px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}
.report-frag .report-container:hover .container-actions {
    opacity: 1;
}
.report-frag .container-action-btn {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: background 0.2s, color 0.2s;
}
.report-frag .container-action-btn:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}
.report-frag .container-columns {
    display: flex;
    gap: 12px;
    min-height: 60px;
}
.report-frag .container-col {
    flex: 0 0 auto;
    min-height: 60px;
    padding: 8px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}
.report-frag .container-col.drag-over {
    background: rgba(46,134,222,0.08);
    border-color: #2e86de;
}
.report-frag .container-col.selected {
    border-color: #2e86de;
    box-shadow: inset 0 0 0 1px rgba(46,134,222,0.2);
}
.report-frag .col-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 50px;
    color: #ccc;
    font-size: 12px;
}
.report-frag .widget-item {
    margin-bottom: 8px;
    padding: 8px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.report-frag .widget-item:hover {
    border-color: #bdc3c7;
}
.report-frag .widget-item.selected {
    border-color: #2e86de;
    box-shadow: 0 0 0 2px rgba(46,134,222,0.2);
}
.report-frag .widget-actions {
    position: absolute;
    top: -10px;
    right: 4px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}
.report-frag .widget-item:hover .widget-actions {
    opacity: 1;
}
.report-frag .widget-type-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}
.report-frag .widget-text-content {
    min-height: 100px;
    padding: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.report-frag .widget-text-content:empty::before {
    content: 'Введите текст...';
    color: #ccc;
}
.report-frag .widget-stub-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 4px;
    color: #999;
    font-size: 13px;
}
.report-frag .chart-widget-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}
.report-frag .chart-indicator-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color, #333);
    margin-bottom: 6px;
    line-height: 1.3;
}
.report-frag .itab-widget-container {
    width: 100%;
    min-height: 80px;
}
.report-frag .itab-loading, .report-frag .itab-error, .report-frag .itab-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 13px;
    color: var(--subtle, #999);
}
.report-frag .itab-error {
    color: #e74c3c;
}
.report-frag .itab-title {
    font-weight: 700;
    margin-bottom: 8px;
}
.report-frag .itab-table {
    width: 100%;
    border-collapse: collapse;
}
.report-frag .chart-canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 350px;
    display: block;
}
.report-frag .chart-widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #999;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 4px;
}
.report-frag .chart-widget-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #e74c3c;
    font-size: 13px;
    background: #fdf0ef;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}
.report-frag .diagram-widget-container {
    position: relative;
    width: 100%;
    min-height: 200px;
}
.report-frag .diagram-canvas {
    width: 100% !important;
    height: auto !important;
    max-height: 350px;
    display: block;
}
.report-frag .diagram-widget-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #999;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 4px;
}
.report-frag .diagram-widget-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #e74c3c;
    font-size: 13px;
    background: #fdf0ef;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    text-align: center;
}
.report-frag #settings-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    
    background: var(--modal-overlay, rgba(0, 0, 0, 0.25));
    align-items: center;
    justify-content: center;
}
.report-frag #settings-modal.show {
    display: flex;
}
.report-frag .modal-window {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    width: 90%;
    max-width: 820px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.2s ease;
}
.report-frag #settings-modal .modal-window {
    max-width: min(820px, calc(100vw - 32px));
}
.report-frag #settings-modal .modal-body {
    overflow-x: auto;
}
.report-frag #report-editor #settings-modal {
    background: var(--modal-overlay, rgba(0, 0, 0, 0.25));
}
.report-frag #settings-modal .modal-header {
    cursor: move;
    touch-action: none;
}
.report-frag #settings-modal .modal-header .modal-close-btn {
    cursor: pointer;
}
.report-frag #settings-modal .modal-header.modal-header-dragging, .report-frag #settings-modal .modal-header.modal-header-dragging * {
    user-select: none;
    -webkit-user-select: none;
}
.report-frag #settings-modal .modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.report-frag #settings-modal .modal-drag-glyph {
    color: var(--heading-color, #333);
    opacity: 0.55;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
    -webkit-user-select: none;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.report-frag .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.report-frag .modal-header h3 {
    font-size: 15px;
    font-weight: 600;
    
    color: var(--heading-color, #333);
}
.report-frag .modal-close-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.report-frag .modal-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}
.report-frag .modal-body {
    padding: 18px;
    overflow-y: auto;
    flex: 1;
}
.report-frag #settings-content {
    
}
.report-frag .settings-placeholder {
    color: var(--menu-text, #999);
    font-size: 13px;
    text-align: center;
    padding: 20px 0;
}
.report-frag .settings-group {
    margin-bottom: 14px;
    padding: 10px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
}
.report-frag .settings-group:last-child {
    margin-bottom: 0;
}
.report-frag .settings-group-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--heading-color, #444);
    margin-bottom: 8px;
}
.report-frag .settings-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.report-frag .settings-row label {
    font-size: 13px;
    color: var(--text-color, #333);
    min-width: 80px;
    flex-shrink: 0;
}
.report-frag .settings-row input[type="text"], .report-frag .settings-row input[type="number"], .report-frag .settings-row input[type="color"], .report-frag .settings-row select, .report-frag .settings-row textarea {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 3px;
    background: var(--input-bg, #fff);
    color: var(--input-text, #333);
    font-size: 13px;
    font-family: inherit;
}
.report-frag .settings-row textarea {
    resize: vertical;
    min-height: 60px;
}
.report-frag .settings-row input[type="color"] {
    padding: 2px;
    height: 28px;
    min-width: 40px;
    flex: 0 0 60px;
    cursor: pointer;
}
.report-frag .settings-row input[type="file"] {
    font-size: 13px;
}
.report-frag .settings-row input[type="range"] {
    flex: 1;
}
.report-frag #settings-modal .wmap-q {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin-left: 6px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 50%;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    color: var(--subtle, #999);
    background: transparent;
    cursor: help;
    user-select: none;
    vertical-align: middle;
}
.report-frag #settings-modal .wmap-q:hover, .report-frag #settings-modal .wmap-q:focus, .report-frag #settings-modal .wmap-q.open {
    border-color: var(--primary, #2563eb);
    color: var(--primary, #2563eb);
}
.report-frag--dark #settings-modal .wmap-q:hover, .report-frag--dark #settings-modal .wmap-q:focus, .report-frag--dark #settings-modal .wmap-q.open {
    border-color: var(--link-color, #6db0ff);
    color: var(--link-color, #6db0ff);
}
.report-frag .fts-mine-mark {
    color: var(--primary, #2e86de);
    font-weight: 600;
    flex-shrink: 0;
    font-size: 11px;
    white-space: nowrap;
}
.report-frag--dark .fts-mine-mark {
    color: var(--link-color, #6db0ff);
}
.report-frag #settings-modal .wmap-q:focus {
    outline: none;
}
.report-frag #settings-modal .wmap-q::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: max-content;
    max-width: 280px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 6px;
    background: var(--card-bg, #fff);
    color: var(--text-color, #333);
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s, visibility .15s;
}
.report-frag #settings-modal .wmap-q.wmap-q-left::after {
    right: auto;
    left: 0;
}
@media (hover:hover) {.report-frag #settings-modal .wmap-q:hover::after {
        opacity: 1;
        visibility: visible;
    }
}
.report-frag #settings-modal .wmap-q:focus::after, .report-frag #settings-modal .wmap-q.open::after {
    opacity: 1;
    visibility: visible;
}
.report-frag .country-dialog-wrapper .country-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #eee);
    font-size: 13px;
    color: var(--text-color, #333);
}
.report-frag .country-dialog-wrapper .country-item[data-available="false"] {
    cursor: not-allowed;
    opacity: 0.35;
}
.report-frag .country-dialog-wrapper .country-item.country-item-full {
    cursor: not-allowed;
    opacity: 0.4;
}
.report-frag .country-dialog-wrapper .country-item.country-item-selected[data-available="false"], .report-frag .country-dialog-wrapper .country-item.country-item-selected.country-item-full {
    cursor: pointer;
    opacity: 1;
}
.report-frag .country-dialog-wrapper .country-item-cb {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 1.5px solid var(--border-color, #999);
    border-radius: 3px;
    position: relative;
}
.report-frag .country-dialog-wrapper .country-item-selected .country-item-cb {
    background: var(--primary, #2e86de);
    border-color: var(--primary, #2e86de);
}
.report-frag .country-dialog-wrapper .country-item-selected .country-item-cb::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: var(--on-primary, #fff);
}
.report-frag--dark .country-dialog-wrapper .country-item-cb {
    border-color: var(--subtle, #8aa0c0);
}
.report-frag--dark .country-dialog-wrapper .country-item-selected .country-item-cb {
    background: var(--link-color, #6db0ff);
    border-color: var(--link-color, #6db0ff);
}
.report-frag--dark .country-dialog-wrapper .country-item-selected .country-item-cb::after {
    color: var(--card-bg, #16213e);
}
.report-frag .country-dialog-wrapper .country-item-selected {
    background: var(--table-hover, #f5f5f5);
    background: color-mix(in srgb, var(--primary, #2e86de) 15%, transparent);
}
.report-frag--dark .country-dialog-wrapper .country-item-selected {
    background: var(--table-hover, #1a1a3e);
    background: color-mix(in srgb, var(--link-color, #6db0ff) 22%, transparent);
}
.report-frag .country-dialog-wrapper .country-item-code {
    color: var(--subtle, #999);
    min-width: 28px;
}
.report-frag .country-dialog-wrapper .country-item-name {
    flex: 1;
    min-width: 0;
    color: var(--text-color, #333);
}
.report-frag .country-dialog-wrapper .country-item[data-available="false"] .country-item-name {
    color: var(--subtle, #999);
}
.report-frag .country-dialog-wrapper .country-item-nodata {
    font-size: 10px;
    color: var(--error-text, #e74c3c);
    margin-left: auto;
}
.report-frag .country-dialog-wrapper .country-item-del {
    display: none;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    color: var(--text-color, #333);
    opacity: 0.7;
}
.report-frag .country-dialog-wrapper .country-item-selected .country-item-del {
    display: inline-flex;
}
.report-frag .country-dialog-wrapper .country-item-del:hover {
    color: var(--error-text, #e74c3c);
    background: var(--error-bg, #ffebee);
    opacity: 1;
}
.report-frag #settings-modal .wchart-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    margin: 2px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 3px;
    background: var(--card-bg, #fff);
    color: var(--text-color, #333);
}
.report-frag #settings-modal .wchart-chip-code {
    opacity: 0.5;
}
.report-frag #settings-modal .wchart-chip-x {
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1;
    user-select: none;
    color: var(--subtle, #64748b);
}
.report-frag #settings-modal .wchart-chip-x:hover {
    color: var(--error-text, #e74c3c);
}
.report-frag #settings-modal .wchart-manual-count {
    margin-left: 6px;
    color: var(--subtle, #999);
}
.report-frag .colw-slider {
    padding: 6px 2px 0 2px; 
}
.report-frag .colw-area {
    position: relative;
}
.report-frag .colw-track {
    display: flex;
    width: 100%;
    height: 30px;
    border: 1px solid var(--border-color, #ccc);
    border-radius: 5px;
    overflow: hidden;
    background: var(--input-bg, #fff);
}
.report-frag .colw-segment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}
.report-frag .colw-segment:nth-child(odd) { background: var(--table-hover, #f5f5f5); }
.report-frag .colw-segment:nth-child(even) { background: var(--input-bg, #fff); }
.report-frag .colw-seg-label {
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-color, #333);
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 12px; 
}
.report-frag .colw-handles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.report-frag .colw-handle {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 38px;
    margin-left: -10px; 
    transform: translateY(-50%);
    border-radius: 10px; 
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #bbb);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    cursor: ew-resize;
    z-index: 2;
    touch-action: none; 
    -webkit-user-select: none;
    user-select: none;
}
.report-frag .colw-handle::before, .report-frag .colw-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 2px;
    height: 12px;
    margin-top: -6px;
    border-radius: 1px;
    background: var(--menu-text, #888);
}
.report-frag .colw-handle::before { left: 6px; }
.report-frag .colw-handle::after { right: 6px; }
.report-frag .colw-handle:hover, .report-frag .colw-handle:focus {
    border-color: var(--primary, #2e86de);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), 0 0 0 2px var(--primary, #2e86de);
    outline: none;
}
.report-frag .colw-handle.colw-handle-active, .report-frag .colw-handle:active {
    background: var(--primary, #2e86de);
    border-color: var(--primary-hover, #1b6ec2);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}
.report-frag .colw-handle.colw-handle-active::before, .report-frag .colw-handle.colw-handle-active::after, .report-frag .colw-handle:active::before, .report-frag .colw-handle:active::after {
    background: var(--card-bg, #fff);
}
.report-frag .colw-hint {
    margin-top: 6px;
    font-size: 11px;
    color: var(--menu-text, #999);
    text-align: center;
}
.report-frag--dark .colw-seg-label { color: var(--text-color); }
.report-frag--dark .colw-track { background: var(--input-bg); }
.report-frag--dark .colw-handle { background: var(--card-bg); border-color: var(--border-color); }
.report-frag--dark .colw-handle::before, .report-frag--dark .colw-handle::after { background: var(--menu-text); }
.report-frag--dark .colw-hint { color: var(--menu-text); }
.report-frag .settings-bg-section {
    background: var(--table-hover, #f5f5f5);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}
.report-frag--dark .settings-group { border-color: var(--border-color); }
.report-frag--dark .settings-group-title { color: var(--heading-color); }
.report-frag--dark .settings-row label { color: var(--text-color); }
.report-frag--dark .settings-bg-section { background: var(--table-hover); }
.report-frag--dark .settings-placeholder { color: var(--menu-text); }
.report-frag .ws-section {
    margin-bottom: 14px;
    padding: 10px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
}
.report-frag .ws-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--heading-color, #444);
    margin-bottom: 8px;
}
.report-frag .ws-section-body { display: block; }
.report-frag .ws-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.report-frag .ws-field:last-child { margin-bottom: 0; }
.report-frag .ws-field-pair { align-items: flex-start; }
.report-frag .ws-pair-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.report-frag .ws-mini-label {
    font-size: 11px;
    color: var(--menu-text, #777);
    opacity: 0.85;
    line-height: 1.2;
}
.report-frag .ws-field-pair .ws-select { width: 100%; }
.report-frag .ws-subgroup {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    padding: 8px 10px 10px;
    margin-bottom: 10px;
    background: var(--input-bg, #fafafa);
}
.report-frag .ws-subgroup:last-child { margin-bottom: 0; }
.report-frag .ws-subgroup-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--heading-color, #444);
    margin-bottom: 8px;
}
.report-frag .ws-label {
    font-size: 13px;
    color: var(--text-color, #333);
    min-width: 120px;
    flex-shrink: 0;
}
.report-frag .ws-control {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.report-frag .ws-hint {
    font-size: 11px;
    color: var(--menu-text, #777);
    opacity: 0.85;
    width: 100%;
    margin-top: 2px;
}
.report-frag .ws-hint-inline {
    font-size: 11px;
    color: var(--menu-text, #777);
    opacity: 0.8;
}
.report-frag .ws-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-color, #333);
    cursor: pointer;
    user-select: none;
}
.report-frag .ws-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary, #1976d2);
}
.report-frag .ws-checkbox-text { flex: 1; }
.report-frag .ws-group-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 1.4;
    vertical-align: middle;
    background: var(--input-bg, #f0f0f0);
    border: 1px solid var(--border-color, #ddd);
    color: var(--menu-text, #777);
    cursor: help;
}
.report-frag .ws-input {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 4px;
    background: var(--input-bg, #fff);
    color: var(--input-text, #333);
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}
.report-frag .ws-input:focus {
    outline: none;
    border-color: var(--primary, #1976d2);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.12);
}
.report-frag .ws-number { max-width: 110px; flex: 0 0 auto; }
.report-frag .ws-field-nowrap .ws-control { flex-wrap: nowrap; }
.report-frag .ws-color-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.report-frag .ws-color {
    width: 38px;
    height: 28px;
    padding: 2px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 4px;
    background: var(--input-bg, #fff);
    cursor: pointer;
}
.report-frag .ws-color-box {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid var(--border-color, #ccc);
}
.report-frag .ws-range-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.report-frag .ws-range { flex: 1; accent-color: var(--primary, #1976d2); }
.report-frag .ws-range-val {
    font-size: 12px;
    color: var(--text-color, #333);
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.report-frag .ws-select {
    flex: 1;
    min-width: 0;
    padding: 5px 8px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 4px;
    background: var(--input-bg, #fff);
    color: var(--input-text, #333);
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
}
.report-frag .ws-btn {
    padding: 5px 10px;
    border: 1px solid var(--button-border, #ccc);
    border-radius: 4px;
    background: var(--button-bg, #f5f5f5);
    color: var(--text-color, #333);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.report-frag .ws-btn:hover { background: var(--menu-hover, #e3f2fd); }
.report-frag .ws-btn-ghost { background: transparent; }
.report-frag .ws-table { width: 100%; margin-top: 4px; }
.report-frag .ws-table table { width: 100%; border-collapse: collapse; }
.report-frag .ws-table th, .report-frag .ws-table td {
    padding: 3px 4px;
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
    color: var(--text-color, #333);
}
.report-frag .ws-th {
    font-weight: 600;
    color: var(--heading-color, #444);
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    padding-bottom: 5px;
}
.report-frag .ws-th-num, .report-frag .ws-td-num { width: 22px; text-align: center; color: var(--menu-text, #777); }
.report-frag .ws-th-del, .report-frag .ws-td-del { width: 24px; text-align: center; }
.report-frag .ws-table-row:hover { background: var(--table-hover, #f5f5f5); }
.report-frag .ws-cell-text {
    width: 100%;
    padding: 3px 6px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 3px;
    background: var(--input-bg, #fff);
    color: var(--input-text, #333);
    font-size: 12px;
    box-sizing: border-box;
}
.report-frag .ws-cell-color {
    width: 38px;
    height: 24px;
    padding: 2px;
    border: 1px solid var(--input-border, #ddd);
    border-radius: 3px;
    background: var(--input-bg, #fff);
    cursor: pointer;
}
.report-frag .ws-row-del {
    border: none;
    background: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 3px;
}
.report-frag .ws-row-del:hover { background: var(--error-bg, #ffebee); }
.report-frag .ws-table-actions { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.report-frag .ws-table-actions-extra { margin-top: 6px; }
.report-frag .chart-jenks-note {
    margin-top: 4px;
    padding: 3px 6px;
    font-size: 11px;
    line-height: 1.3;
    border-radius: 4px;
    background: var(--warning-bg, #fff3cd);
    color: var(--warning-text, #8a6d3b);
}
.report-frag .chart-jenks-note-error {
    background: var(--error-bg, #ffebee);
    color: var(--error-text, #c62828);
}
.report-frag .chart-legend-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    font-size: 12px;
    color: var(--subtle, #777);
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.35;
}
.report-frag .chart-legend-swatch {
    width: 14px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}
.report-frag .chart-legend-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.report-frag .chart-legend-code {
    font-size: 11px;
    opacity: 0.8;
}
.report-frag .chart-legend-arrow {
    font-size: 11px;
    line-height: 1;
}
.report-frag .chart-legend-norm, .report-frag .chart-legend-val {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--text-color, #333);
    opacity: 0.8;
}
.report-frag--dark .chart-legend-norm, .report-frag--dark .chart-legend-val {
    color: var(--text-color, #f1f5f9);
    opacity: 0.85;
}
.report-frag .chart-legend-sep {
    flex-shrink: 0;
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-color, #333);
    opacity: 0.55;
}
.report-frag--dark .chart-legend-sep {
    color: var(--text-color, #f1f5f9);
    opacity: 0.6;
}
.report-frag .chart-legend-row-main {
    color: var(--text-color, #333);
    font-weight: 700;
    background: rgba(46, 134, 222, 0.12);
    border: 1px solid rgba(46, 134, 222, 0.35);
}
.report-frag--dark .chart-legend-row-main {
    color: var(--text-color, #f1f5f9);
    background: rgba(46, 134, 222, 0.22);
    border: 1px solid rgba(46, 134, 222, 0.45);
}
.report-frag .chart-tooltip {
    position: absolute;
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    min-width: 150px;
    max-width: 280px;
    padding: 6px 9px;
    border-radius: 6px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #ddd);
    box-shadow: var(--card-shadow, 0 2px 10px rgba(0, 0, 0, 0.15));
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-color, #333);
}
.report-frag .chart-tooltip-title {
    font-weight: 600;
    color: var(--heading-color, #444);
    padding-bottom: 3px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color, #eee);
}
.report-frag .chart-tooltip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: 400;
}
.report-frag .chart-tooltip-row + .chart-tooltip-row {
    margin-top: 2px;
}
.report-frag .chart-tooltip-swatch {
    width: 14px;
    height: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}
.report-frag .chart-tooltip-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.report-frag .chart-tooltip-val {
    margin-left: auto;
    padding-left: 10px;
    font-variant-numeric: tabular-nums;
}
.report-frag .chart-tooltip-row-main {
    font-weight: 700;
}
.report-frag .chart-main-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 6px;
}
.report-frag .chart-main-info-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.report-frag .chart-group-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.15);
}
.report-frag .chart-group-letter {
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
}
.report-frag .chart-group-label {
    font-size: 12px;
    line-height: 1.3;
    color: var(--text-color, #333);
    opacity: 0.8;
    white-space: nowrap;
}
.report-frag .chart-group-nodata, .report-frag .chart-compare-nodata {
    display: inline-block;
    font-size: 11px;
    line-height: 1.3;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--warning-bg, #fff3cd);
    color: var(--warning-text, #8a6d3b);
    border: 1px solid var(--border-color, #e0e0e0);
}
.report-frag .diagram-position {
    display: flex;
    align-items: baseline;
    gap: 2px;
    width: auto;
    margin-top: 0;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    padding: 3px 8px;
    color: var(--text-color, #333);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.report-frag .diagram-position-num {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading-color, #333);
}
.report-frag .diagram-position-sep {
    color: var(--menu-text, #777);
    font-size: 12px;
    opacity: 0.7;
}
.report-frag .diagram-position-total {
    font-size: 12px;
    color: var(--menu-text, #777);
}
.report-frag .diagram-position-label {
    font-size: 11px;
    color: var(--menu-text, #777);
    margin-left: 4px;
}
.report-frag .ws-blocked {
    opacity: 0.5;
    pointer-events: none;
}
.report-frag .ws-blocked-filter-only {
    opacity: 0.5;
}
.report-frag .ws-hint-error {
    font-size: 11px;
    color: var(--error-text, #c62828);
    width: 100%;
    margin-top: 2px;
}
.report-frag .ws-note-inline {
    font-size: 11px;
    color: var(--menu-text, #777);
    margin-top: 4px;
    line-height: 1.3;
}
.report-frag #wysiwyg-editor-container {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
}
.report-frag #wysiwyg-editor-container .ProseMirror {
    min-height: 180px;
    font-size: 14px;
    line-height: 1.6;
    padding: 12px 15px;
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.report-frag #wysiwyg-editor-container .ProseMirror img {
    max-width: 100%;
    height: auto;
    margin: 8px 0;
    border-radius: 4px;
}
.report-frag #wysiwyg-editor-container .ProseMirror img.ProseMirror-selectednode {
    outline: 3px solid #68cef8;
}
.report-frag #wysiwyg-editor-container .ProseMirror table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
    overflow: hidden;
}
.report-frag #wysiwyg-editor-container .ProseMirror table td, .report-frag #wysiwyg-editor-container .ProseMirror table th {
    border: 2px solid #ccc;
    padding: 6px 8px;
    min-width: 60px;
    vertical-align: top;
    position: relative;
}
.report-frag #wysiwyg-editor-container .ProseMirror table th {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: left;
}
.report-frag #wysiwyg-editor-container .ProseMirror table td p, .report-frag #wysiwyg-editor-container .ProseMirror table th p {
    margin: 0;
    min-height: 1.2em;
}
.report-frag #wysiwyg-editor-container .ProseMirror table .selectedCell {
    background-color: #d0e4f5;
}
.report-frag #wysiwyg-editor-container .ProseMirror table .tableCellResizer {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    cursor: col-resize;
}
.report-frag .tiptap-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border-bottom: none;
    font-size: 13px;
    user-select: none;
}
.report-frag .tiptap-toolbar .toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 2px 4px;
    border-right: 1px solid #e0e0e0;
    margin-right: 2px;
}
.report-frag .tiptap-toolbar .toolbar-group:last-child {
    border-right: none;
}
.report-frag .tiptap-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 2px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    color: #444;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.report-frag .tiptap-toolbar button:hover {
    background: #e9ecef;
    color: #000;
}
.report-frag .tiptap-toolbar button.is-active {
    background: #d4e4f7;
    color: #1a73e8;
    border-color: #b6d4f0;
}
.report-frag .tiptap-toolbar button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.report-frag .tiptap-toolbar button.toolbar-btn-separator {
    width: 1px;
    height: 20px;
    background: #ddd;
    cursor: default;
    padding: 0;
    margin: 0 2px;
}
.report-frag .tiptap-toolbar select.toolbar-select {
    height: 26px;
    padding: 0 4px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    font-size: 12px;
    color: #444;
    cursor: pointer;
    outline: none;
}
.report-frag .tiptap-toolbar select.toolbar-select:hover {
    border-color: #bbb;
}
.report-frag .tiptap-editor-wrapper {
    border: 1px solid #ddd;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    background: #fff;
}
.report-frag .widget-text-content {
    padding: 0;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
    word-wrap: break-word;
}
.report-frag .widget-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 4px 0;
}
.report-frag .widget-text-content p {
    margin-bottom: 0.5em;
}
.report-frag .widget-text-content p:last-child {
    margin-bottom: 0;
}
.report-frag .widget-text-content ul, .report-frag .widget-text-content ol {
    padding-inline-start: 24px;
    padding-left: 24px;
    margin: 4px 0;
    list-style-position: outside;
    overflow: hidden;
}
.report-frag .widget-text-content li {
    overflow-wrap: break-word;
    word-break: break-word;
    word-wrap: break-word;
}
.report-frag .widget-text-content li p {
    margin-bottom: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.report-frag .widget-text-content a {
    overflow-wrap: break-word;
    word-break: break-all;
    word-wrap: break-word;
}
.report-frag .widget-text-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: inherit;
}
.report-frag .widget-text-content table td, .report-frag .widget-text-content table th {
    border: 1px solid #dee2e6;
    padding: 6px 8px;
    min-width: 40px;
    vertical-align: top;
}
.report-frag .widget-text-content table th {
    background-color: #f0f2f5;
    font-weight: 600;
    text-align: left;
}
.report-frag .widget-text-content table td p, .report-frag .widget-text-content table th p {
    margin: 0;
    min-height: 1.2em;
}
.report-frag .widget-text-content table tr:nth-child(even) td {
    background-color: #fafbfc;
}
.report-frag .widget-text-content [style*="text-align: center"], .report-frag .ProseMirror [style*="text-align: center"] {
    text-align: center;
}
.report-frag .widget-text-content [style*="text-align: right"], .report-frag .ProseMirror [style*="text-align: right"] {
    text-align: right;
}
.report-frag .widget-text-content [style*="text-align: justify"], .report-frag .ProseMirror [style*="text-align: justify"] {
    text-align: justify;
}
.report-frag .ProseMirror a {
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
}
.report-frag .ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: #adb5bd;
    pointer-events: none;
    height: 0;
}
.report-frag .preview-container {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 100%;
}
.report-frag .preview-container h1 {
    font-size: 22px;
    margin-bottom: 16px;
}
.report-frag .preview-container .report-container {
    border: none !important;
    margin-bottom: 16px;
}
.report-frag ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.report-frag ::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.report-frag ::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.report-frag ::-webkit-scrollbar-thumb:hover {
    background: #999;
}
@media (max-width: 900px) {.report-frag #left-panel {
        width: 180px;
        min-width: 180px;
    }
}
.report-frag .container-drag-handle {
    position: absolute;
    top: -10px;
    left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: grab;
    font-size: 14px;
    line-height: 1;
    color: #999;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    z-index: 10;
    user-select: none;
}
.report-frag .report-container:hover .container-drag-handle {
    opacity: 1;
}
.report-frag .container-drag-handle:hover {
    background: #e9ecef;
    color: #555;
}
.report-frag .container-drag-handle:active {
    cursor: grabbing;
}
.report-frag .widget-drag-handle {
    position: absolute;
    top: -10px;
    left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: grab;
    font-size: 12px;
    line-height: 1;
    color: #999;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, color 0.2s;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    -ms-touch-action: none;
}
.report-frag .widget-item:hover .widget-drag-handle {
    opacity: 1;
}
.report-frag .widget-drag-handle:hover {
    background: #e9ecef;
    color: #555;
}
.report-frag .widget-drag-handle:active {
    cursor: grabbing;
}
.report-frag .report-container.dragging {
    opacity: 0.4;
    border-style: dashed !important;
}
.report-frag .widget-item.dragging {
    opacity: 0.4;
    border-style: dashed !important;
}
.report-frag .widget-item.widget-timedep {
    border-color: var(--error-text, #c0392b);
}
.report-frag .widget-item.widget-timedep.selected {
    
    border-color: var(--error-text, #c0392b);
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.2);
}
.report-frag .widget-item.widget-timedep .widget-type-label {
    color: var(--error-text, #c0392b);
}
.report-frag .widget-timedep-icon {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.9;
    vertical-align: middle;
}
.report-frag.dragging-in-progress {
    user-select: none;
    -webkit-user-select: none;
}
.report-frag .report-container.drop-before {
    border-top: 3px solid #2e86de !important;
    margin-top: -1px;
}
.report-frag .report-container.drop-after {
    border-bottom: 3px solid #2e86de !important;
    margin-bottom: -1px;
}
.report-frag #drop-zone.drag-over {
    background: #e8f4fd;
}
.report-frag .drop-insert-indicator {
    height: 3px;
    background: #2e86de;
    border-radius: 2px;
    margin: 2px 0;
    pointer-events: none;
    animation: indicatorPulse 1s ease-in-out infinite;
}
@keyframes indicatorPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.report-frag .map-widget-container {
    position: relative;
    width: 100%;
    min-height: 250px;
    border-radius: 4px;
    overflow: hidden;
}
.report-frag .map-leaflet-container {
    width: 100%;
    height: 300px;
    background: var(--card-bg, #fff);
    z-index: 1;
}
.report-frag .map-widget-loading, .report-frag .map-widget-error {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 12px;
    z-index: 1000;
    background: rgba(0,0,0,0.65);
    color: #fff;
    pointer-events: none;
}
.report-frag .map-widget-error {
    background: rgba(180,30,30,0.85);
}
.report-frag .map-caption-overlay {
    position: absolute;
    z-index: 1000;
    pointer-events: none;
    padding: 4px 10px;
    text-shadow: 0 0 6px rgba(255,255,255,0.9), 0 0 6px rgba(255,255,255,0.9);
    max-width: 90%;
    word-wrap: break-word;
    font-weight: 500;
    line-height: 1.4;
    display: none;
}
.report-frag .map-caption-overlay.pos-top-left { top: 8px; left: 8px; }
.report-frag .map-caption-overlay.pos-top-center { top: 8px; left: 50%; transform: translateX(-50%); }
.report-frag .map-caption-overlay.pos-top-right { top: 8px; right: 8px; }
.report-frag .map-caption-overlay.pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.report-frag .map-caption-overlay.pos-bottom-left { bottom: 8px; left: 8px; }
.report-frag .map-caption-overlay.pos-bottom-center { bottom: 8px; left: 50%; transform: translateX(-50%); }
.report-frag .map-caption-overlay.pos-bottom-right { bottom: 8px; right: 8px; }
.report-frag .map-country-label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 1px 1px 3px #fff, -1px -1px 3px #fff, 1px -1px 3px #fff, -1px 1px 3px #fff;
    color: #333;
    text-align: center;
}
.report-frag .map-widget-label {
    text-align: center;
    font-size: 13px;
    color: var(--text-color, #333);
    padding: 6px 8px;
    font-style: italic;
}
.report-frag .map-color-preset {
    transition: opacity 0.15s;
}
.report-frag .map-color-preset:hover {
    opacity: 0.85;
}
.report-frag .cd-src-note {
    font-size: 11px;
    color: var(--text-color, #333);
    opacity: 0.6;
    margin-top: 4px;
    line-height: 1.3;
    word-break: break-word;
}
.report-frag .cd-src-note a {
    color: var(--primary, #2e86de);
    text-decoration: none;
}
.report-frag .cd-src-note a:hover {
    text-decoration: underline;
}
