/* Add here all your CSS customizations */

/*
 * Porto Admin uses Poppins (+ Shadows Into Light) as the UI font.
 * Bootstrap 5 overrides body/components with --bs-font-sans-serif (system stack),
 * so we align CSS variables and dark-theme components with the template fonts.
 */
:root,
html.dark {
	--bs-font-sans-serif: "Poppins", Arial, sans-serif;
	--bs-body-font-family: "Poppins", Arial, sans-serif;
	--porto-font-primary: "Poppins", Arial, sans-serif;
	--porto-font-secondary: "Shadows Into Light", cursive;
}

html,
html.dark,
html.dark body,
body {
	font-family: var(--porto-font-primary), sans-serif;
}

html.dark .content-body,
html.dark .card,
html.dark .card-title,
html.dark .card-body,
html.dark .page-header,
html.dark .page-header h2,
html.dark .sidebar-left,
html.dark .sidebar-title,
html.dark .nav-main,
html.dark .nav-link,
html.dark .header,
html.dark .userbox,
html.dark .form-control,
html.dark .form-label,
html.dark label,
html.dark .btn,
html.dark .table,
html.dark .alert,
html.dark .dropdown-menu,
html.dark input,
html.dark select,
html.dark textarea,
html.dark button {
	font-family: var(--porto-font-primary), sans-serif !important;
}

html.dark .table {
	--bs-body-bg: #000;
	--bs-body-bg-rgb: 0, 0, 0;
	--bs-table-bg: #000;
}

html.dark .alternative-font,
html.dark .font-secondary {
	font-family: var(--porto-font-secondary), cursive !important;
}

/* Align Organizations block with main sidebar nav (no widget side margins). */
.sidebar-left .sidebar-widget.widget-organizations {
	margin: 0;
}

.sidebar-left .sidebar-widget.widget-organizations .widget-header {
	padding: 0 25px;
}

.sidebar-left .sidebar-widget.widget-organizations .widget-content {
	padding: 8px 0 0;
}

/* Organizations submenu stays inside the sidebar (no flyout to the right). */
.sidebar-left .widget-organizations ul.nav-main li.nav-parent > ul.nav-children {
	position: static;
	left: auto;
	top: auto;
	min-width: 0;
	border-left: 0;
}

.sidebar-left .widget-organizations ul.nav-main li.nav-parent > a,
.sidebar-left .widget-organizations ul.nav-main li .nav-children li a {
	overflow: hidden;
	text-overflow: ellipsis;
}

.sidebar-left .widget-organizations {
	overflow: hidden;
	max-width: 100%;
}

/* Expanded sidebar: open org list only when manually expanded. */
@media only screen and (min-width: 768px) {
	html:not(.sidebar-left-collapsed) .sidebar-left .widget-organizations ul.nav-main > li.nav-parent.nav-expanded > ul.nav-children {
		display: block;
	}
}

html.sidebar-left-big-icons .sidebar-left .widget-organizations ul.nav-main > li:hover > ul.nav-children {
	display: none;
}

html.sidebar-left-big-icons .sidebar-left .widget-organizations ul.nav-main > li.nav-parent.nav-expanded > ul.nav-children {
	display: block;
}

@media only screen and (min-width: 768px) {
	/* Collapsed sidebar: icons only, active highlight, hover without labels. */
	html.sidebar-left-collapsed .sidebar-left {
		overflow: hidden;
	}

	html.sidebar-left-collapsed .sidebar-left .nano,
	html.sidebar-left-collapsed .sidebar-left .nano:hover,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered,
	html.sidebar-left-collapsed.sidebar-left-opened .sidebar-left .nano {
		width: 73px !important;
		max-width: 73px;
		overflow: hidden;
		position: relative;
		z-index: auto;
		box-shadow: -5px 0 0 #2F3139 inset;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main a span,
	html.sidebar-left-collapsed .sidebar-left .nano:hover .nav-main a span,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered .nav-main a span,
	html.sidebar-left-collapsed.sidebar-left-opened .sidebar-left .nano .nav-main a span {
		display: none !important;
	}

	html.sidebar-left-collapsed .sidebar-left .sidebar-widget.widget-organizations,
	html.sidebar-left-collapsed .sidebar-left .separator,
	html.sidebar-left-collapsed .sidebar-left .nano:hover .sidebar-widget.widget-organizations,
	html.sidebar-left-collapsed .sidebar-left .nano:hover .separator,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered .sidebar-widget.widget-organizations,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered .separator {
		display: block !important;
	}

	html.sidebar-left-collapsed .sidebar-left .widget-organizations .widget-header {
		display: none;
	}

	html.sidebar-left-collapsed .sidebar-left .separator {
		margin: 0.5rem 12px;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main > li > a,
	html.sidebar-left-collapsed .sidebar-left .widget-organizations .nav-main > li > a {
		padding: 12px 0;
		text-align: center;
		overflow: hidden;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main li a i {
		margin-right: 0;
		width: auto;
		font-size: 1.25rem;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main li.nav-parent > ul.nav-children,
	html.sidebar-left-collapsed .sidebar-left .nano:hover .nav-main li.nav-parent > ul.nav-children,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered .nav-main li.nav-parent > ul.nav-children,
	html.sidebar-left-collapsed .sidebar-left .nano:hover .nav-main .nav-expanded > ul.nav-children,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered .nav-main .nav-expanded > ul.nav-children {
		display: none !important;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main li.nav-parent > a:after,
	html.sidebar-left-collapsed .sidebar-left .nano:hover .nav-main li.nav-parent > a:after,
	html.sidebar-left-collapsed .sidebar-left .nano.hovered .nav-main li.nav-parent > a:after {
		display: none !important;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main li > a:hover,
	html.sidebar-left-collapsed .sidebar-left .nav-main li > a:focus {
		background-color: #21262d;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main > li.nav-active > a,
	html.sidebar-left-collapsed .sidebar-left .widget-organizations .nav-main > li.nav-active > a {
		box-shadow: 2px 0 0 #CCC inset;
		background-color: #21262d;
	}

	html.sidebar-left-collapsed .sidebar-left .nav-main > li.nav-active > a i,
	html.sidebar-left-collapsed .sidebar-left .widget-organizations .nav-main > li.nav-active > a i {
		color: #CCC;
	}

	html.sidebar-light:not(.dark).sidebar-left-collapsed .sidebar-left .nav-main > li > a:hover,
	html.sidebar-light:not(.dark).sidebar-left-collapsed .sidebar-left .nav-main > li > a:focus {
		background-color: #fafafa;
	}

	html.sidebar-light:not(.dark).sidebar-left-collapsed .sidebar-left .nav-main > li.nav-active > a,
	html.sidebar-light:not(.dark).sidebar-left-collapsed .sidebar-left .widget-organizations .nav-main > li.nav-active > a {
		box-shadow: 2px 0 0 #0088cc inset;
		background-color: #fafafa;
	}

	html.sidebar-left-collapsed .sidebar-left .widget-organizations ul.nav-main li.nav-parent > ul.nav-children {
		position: static;
		box-shadow: none;
	}
}

html.fixed .sidebar-left {
	display: flex;
	flex-direction: column;
	padding-bottom: 0;
}

html.fixed:has(.sf-toolbar) .sidebar-left,
html.fixed:has(.sf-minitoolbar) .sidebar-left {
	padding-bottom: 36px;
}

html.fixed .sidebar-left .nano {
	flex: 1 1 auto;
	min-height: 0;
}

.sidebar-left .sidebar-version {
	flex: 0 0 auto;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0;
	margin-top: auto;
	padding: 10px 20px 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	line-height: 1.25;
	letter-spacing: 0.02em;
	color: #8b8e94;
	user-select: none;
}

.sidebar-left .sidebar-version__core {
	white-space: nowrap;
}

.sidebar-left .sidebar-version__pre::before {
	content: "-";
}

.sidebar-left .sidebar-version--alpha,
.sidebar-left .sidebar-version--pre {
	color: #e6a23c;
}

.sidebar-left .sidebar-version--beta {
	color: #6cb6ff;
}

.sidebar-left .sidebar-version--rc {
	color: #3dce9a;
}

.sidebar-left .sidebar-version--dev {
	color: #a0a4ab;
}

html.sidebar-light:not(.dark) .sidebar-left .sidebar-version {
	border-top-color: rgba(0, 0, 0, 0.08);
	color: #6b6e74;
}

html.sidebar-light:not(.dark) .sidebar-left .sidebar-version--alpha,
html.sidebar-light:not(.dark) .sidebar-left .sidebar-version--pre {
	color: #c4841d;
}

html.sidebar-light:not(.dark) .sidebar-left .sidebar-version--beta {
	color: #1d7ab8;
}

html.sidebar-light:not(.dark) .sidebar-left .sidebar-version--rc {
	color: #1a9d6e;
}

@media only screen and (min-width: 768px) {
	html.sidebar-left-collapsed .sidebar-left .sidebar-version {
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 8px 4px 10px;
		text-align: center;
		font-size: 10px;
		line-height: 1.2;
	}

	html.sidebar-left-collapsed .sidebar-left .sidebar-version__pre::before {
		content: none;
	}

	html.sidebar-left-collapsed .sidebar-left .sidebar-version__pre {
		display: block;
		max-width: 100%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

.sidebar-right .sidebar-right-wrapper {
	padding-left: 0;
	padding-right: 0;
}

.sidebar-right .sidebar-widget h6 {
	padding: 0 20px;
}

.sidebar-right ul.nav-main {
	margin-right: 0;
}

.dataTables_wrapper table thead tr.filters th {
	padding-right: 8px !important;
}

.dataTables_wrapper table thead tr.filters input,
.dataTables_wrapper table thead tr.filters select {
	width: 100%;
	min-width: 0;
}

.datepicker,
.flatpickr-calendar {
	z-index: 1060 !important;
}

.header [data-header-dropdown] .dropdown-menu:not(.show) {
	display: none !important;
	pointer-events: none;
}

@media only screen and (max-width: 767px) {
	html.sidebar-left-opened .sidebar-left,
	html.mobile-device .sidebar-left {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	html.sidebar-left-opened .sidebar-left .nano,
	html.sidebar-left-opened .sidebar-left .nano-content {
		height: 100%;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}

.select2-container,
.ts-wrapper {
	width: 100% !important;
}

.ts-control {
	min-height: 38px;
	border-color: #ced4da;
}

.ts-wrapper.form-control,
.ts-wrapper.form-control-sm {
	padding: 0;
	border: 0;
	background: transparent;
}

#admin-user-create-modal .card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#admin-user-create-modal .card-header .card-title {
	float: none;
	margin: 0;
}

html:not(.has-sidebar-right) .page-header .right-wrapper {
	padding-right: 20px;
}

@media only screen and (max-width: 767px) {
	html:not(.has-sidebar-right) .page-header {
		padding-right: 0;
	}
}

.card[data-log-viewer] > .card-body {
	padding: 0;
}

html.fixed .content-body.has-log-toolbar {
	padding-top: 0;
}

.log-page-toolbar {
	position: sticky;
	top: 114px;
	z-index: 1002;
	margin: 0 0 16px;
	background: #1d2127;
	border: 1px solid #242830;
	border-radius: 4px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.log-page-toolbar-spacer {
	display: none;
}

@media only screen and (min-width: 768px) {
	html.fixed .log-page-toolbar {
		position: fixed;
		left: 300px;
		right: 0;
		margin: 0;
		border-left: none;
		border-right: none;
		border-radius: 0;
	}

	html.fixed .log-page-toolbar-spacer {
		display: block;
	}

	html.fixed.sidebar-left-collapsed .log-page-toolbar {
		left: 73px;
	}

	html.fixed.sidebar-left-collapsed.inner-menu-opened .log-page-toolbar {
		left: 373px;
	}

	html.fixed.sidebar-right-opened .log-page-toolbar {
		left: 0;
		margin-right: 300px;
	}

	html.fixed.sidebar-right-opened.inner-menu-opened .log-page-toolbar {
		left: -300px;
	}

	html.fixed.sidebar-left-collapsed.sidebar-right-opened .log-page-toolbar {
		left: -227px;
	}

	html.fixed.sidebar-left-collapsed.sidebar-right-opened.inner-menu-opened .log-page-toolbar {
		left: 73px;
	}
}

html.sidebar-light:not(.dark) .log-page-toolbar {
	background: #e2e3e6;
	border-color: #d5d6d7;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.log-toolbar-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
}

.log-toolbar-row-levels {
	border-top: 1px solid #242830;
	padding-top: 8px;
	padding-bottom: 8px;
}

.log-toolbar-row-search {
	border-top: 1px solid #242830;
	padding-top: 8px;
	padding-bottom: 8px;
}

html.sidebar-light:not(.dark) .log-toolbar-row-levels,
html.sidebar-light:not(.dark) .log-toolbar-row-search {
	border-top-color: #d5d6d7;
}

.log-toolbar-group {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.log-incident-nav {
	margin-left: 4px;
}

.log-incident-nav .btn {
	min-width: 32px;
	padding-left: 8px;
	padding-right: 8px;
}

.log-incident-nav-pos {
	min-width: 3.2em;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #abb4be;
	white-space: nowrap;
}

html.sidebar-light:not(.dark) .log-incident-nav-pos {
	color: #666;
}

.log-toolbar-form .form-control-sm {
	width: auto;
	min-width: 110px;
}

.log-toolbar-form input[type="time"].form-control-sm {
	min-width: 118px;
}

.log-toolbar-search-input {
	flex: 1 1 240px;
	min-width: 180px;
	max-width: 520px;
}

.log-toolbar-search-clear {
	padding-left: 0;
	padding-right: 0;
}

.log-toolbar-label {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #abb4be;
	white-space: nowrap;
}

html.sidebar-light:not(.dark) .log-toolbar-label {
	color: #666;
}

.log-toolbar-sep {
	color: #abb4be;
}

.log-toolbar-levels {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.log-toolbar-levels .nav-link {
	padding: 6px 10px;
	font-size: 12px;
	line-height: 1.2;
}

.log-page-card {
	position: relative;
	z-index: 1;
}

@media only screen and (max-width: 767px) {
	html.fixed .log-page-toolbar {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
		z-index: 2;
	}

	.log-toolbar-row {
		padding: 8px 10px;
		gap: 8px;
	}

	.log-toolbar-group,
	.log-toolbar-form {
		min-width: 0;
	}

	.log-toolbar-row-controls .log-toolbar-time-range,
	.log-toolbar-row-search {
		flex: 1 1 100%;
		width: 100%;
	}

	.log-toolbar-form .form-control-sm,
	.log-toolbar-search-input {
		min-width: 0;
		max-width: none;
		flex: 1 1 auto;
	}

	.log-toolbar-time-range,
	.log-toolbar-time-range {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		width: 100%;
	}

	.log-toolbar-time-range .form-control-sm,
	.log-toolbar-time-range .form-control-sm,
	.log-toolbar-form input[type="time"].form-control-sm {
		flex: 1 1 6.5rem;
		width: auto;
		min-width: 0;
	}

	.log-toolbar-levels {
		width: 100%;
	}

	.log-toolbar-levels .nav-link {
		padding: 6px 8px;
	}

	html.fixed .content-body.has-log-toolbar {
		overflow-x: hidden;
	}
}

.card[data-log-viewer] .alert {
	margin: 12px 16px 0;
}

.card[data-log-viewer] .table {
	table-layout: fixed;
	margin-bottom: 0;
}

.card[data-log-viewer] .table thead th {
	padding: 7px 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-bottom-width: 1px;
}

.card[data-log-viewer] .log-col-type {
	width: 118px;
}

.card[data-log-viewer] .log-col-date {
	width: 180px;
}

.card[data-log-viewer] .log-col-actions {
	width: 188px;
}

.card[data-log-viewer] .log-viewer {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
	font-size: 12px;
	line-height: 1.35;
}

.card[data-log-viewer] .log-viewer td {
	padding: 5px 12px;
	vertical-align: middle;
	border-color: inherit;
}

.card[data-log-viewer] .log-type-inner {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
}

.card[data-log-viewer] .log-watched-mark {
	display: none;
	flex-shrink: 0;
	color: #3d9a3d;
	font-size: 12px;
	line-height: 1;
}

.card[data-log-viewer] .log-viewer tr.is-watched .log-watched-mark {
	display: inline-block;
}

.card[data-log-viewer] .log-level {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.card[data-log-viewer] .log-level i {
	font-size: 12px;
}

.card[data-log-viewer] .log-level-debug {
	color: #8b95a1;
}

.card[data-log-viewer] .log-level-info {
	color: #1aa3d9;
}

.card[data-log-viewer] .log-level-warning {
	color: #d9a21a;
}

.card[data-log-viewer] .log-level-error,
.card[data-log-viewer] .log-level-fatal {
	color: #d94b4b;
}

.card[data-log-viewer] .log-date {
	color: #8b95a1;
	font-variant-numeric: tabular-nums;
	overflow: visible;
	white-space: nowrap;
}

.card[data-log-viewer] .log-message {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: pointer;
}

.card[data-log-viewer] .log-viewer tr.is-expanded .log-message {
	overflow: visible;
	text-overflow: unset;
	white-space: pre-wrap;
	word-break: break-word;
}

.card[data-log-viewer] .log-row-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

.card[data-log-viewer] .log-actions {
	vertical-align: middle;
	white-space: normal;
	cursor: default;
}

.card[data-log-viewer] .log-row-action {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 4px 8px;
	white-space: normal;
	line-height: 1.25;
	text-align: left;
}

.card[data-log-viewer] .log-row-action i {
	flex-shrink: 0;
	width: 1em;
	margin: 0;
	font-size: 12px;
}

.card[data-log-viewer] .log-row-action span {
	min-width: 0;
}

.card[data-log-viewer] .log-show-in-stream {
	display: none;
}

.is-log-filtered .card[data-log-viewer] .log-show-in-stream {
	display: inline-flex;
}

.card[data-log-viewer] .log-viewer tr.is-watched-specific .log-watch-action {
	display: none;
}

.card[data-log-viewer] .log-ticket-action {
	display: none;
}

.card[data-log-viewer] .log-viewer tr.is-watched .log-ticket-action:not([hidden]) {
	display: inline-flex;
}

.card[data-log-viewer] .log-viewer tr.is-watch-pending .log-watch-action {
	opacity: 0.7;
	pointer-events: none;
}

.card[data-log-viewer] .log-viewer tr.is-watched > td,
.card[data-log-viewer] .table-striped > tbody > tr.is-watched:nth-of-type(odd) > td,
.card[data-log-viewer] .table-hover > tbody > tr.is-watched:hover > td,
.card[data-log-viewer] .table-striped > tbody > tr.is-watched > * {
	background-color: #edf8ed;
	box-shadow: none;
}

@media only screen and (max-width: 991px) {
	.card[data-log-viewer] {
		overflow: hidden;
	}

	.card[data-log-viewer] .table,
	.card[data-log-viewer] .table.table-no-more {
		table-layout: auto;
		width: 100%;
		max-width: 100%;
		border: 0;
	}

	.card[data-log-viewer] .table.table-no-more thead {
		display: none;
	}

	.card[data-log-viewer] .table.table-no-more tbody {
		display: block;
		width: 100%;
		max-width: 100%;
		padding: 10px;
	}

	.card[data-log-viewer] .table.table-no-more tbody tr {
		display: grid;
		grid-template-columns: minmax(0, auto) minmax(0, 1fr);
		grid-template-areas:
			"type date"
			"message message"
			"actions actions";
		gap: 8px 12px;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		margin: 0 0 10px;
		padding: 12px;
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 8px;
		background: #fff;
		box-shadow: none;
	}

	.card[data-log-viewer] .table.table-no-more tbody tr:last-child {
		margin-bottom: 0;
	}

	.card[data-log-viewer] .table.table-no-more.table-striped > tbody > tr:nth-of-type(odd) > *,
	.card[data-log-viewer] .table.table-no-more.table-hover > tbody > tr:hover > * {
		background: transparent;
		box-shadow: none;
	}

	.card[data-log-viewer] .table.table-no-more tbody td {
		display: block;
		position: static;
		width: auto;
		max-width: 100%;
		min-width: 0;
		padding: 0 !important;
		border: 0 !important;
		overflow: visible;
		white-space: normal;
		text-align: left;
		vertical-align: top;
	}

	.card[data-log-viewer] .table.table-no-more tbody td:before {
		content: none !important;
		display: none !important;
	}

	.card[data-log-viewer] .table.table-no-more td.log-type {
		grid-area: type;
		width: auto;
	}

	.card[data-log-viewer] .table.table-no-more td.log-date {
		grid-area: date;
		align-self: center;
		justify-self: end;
		color: #8b95a1;
		font-size: 11px;
		line-height: 1.3;
		white-space: normal;
		text-align: right;
		overflow: hidden;
	}

	.card[data-log-viewer] .table.table-no-more td.log-message {
		grid-area: message;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 4;
		overflow: hidden;
		white-space: normal;
		word-break: break-word;
		overflow-wrap: anywhere;
		line-height: 1.45;
		cursor: pointer;
	}

	.card[data-log-viewer] .table.table-no-more .log-message-text,
	.card[data-log-viewer] .table.table-no-more .log-message-text {
		white-space: inherit;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.card[data-log-viewer] .table.table-no-more tr.is-expanded td.log-message {
		display: block;
		-webkit-line-clamp: unset;
		overflow: visible;
		white-space: pre-wrap;
	}

	.card[data-log-viewer] .table.table-no-more td.log-actions {
		grid-area: actions;
		padding-top: 4px !important;
	}

	.card[data-log-viewer] .log-row-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.card[data-log-viewer] .log-row-action {
		flex: 0 0 auto;
		justify-content: center;
		width: 100%;
		min-height: 40px;
		padding: 8px 10px;
		text-align: center;
		white-space: normal;
	}

	.card[data-log-viewer] .log-row-action span {
		white-space: normal;
	}

	.is-log-filtered .card[data-log-viewer] .log-show-in-stream {
		display: inline-flex;
	}

	.card[data-log-viewer] .table.table-no-more tbody tr[data-empty] {
		display: block;
		padding: 20px 12px;
		text-align: center;
	}

	.card[data-log-viewer] .table.table-no-more tbody tr.is-watched,
	.card[data-log-viewer] .log-viewer tr.is-watched > td {
		background: #edf8ed;
		border-color: #cde8cd;
		box-shadow: none;
	}

	.card[data-log-viewer] .log-viewer tr.is-stream-focus {
		box-shadow: inset 0 0 0 2px rgba(0, 136, 204, 0.45);
	}

	.card[data-log-viewer] .log-viewer tr.is-stream-focus td {
		background: transparent;
	}

	.card[data-log-viewer] .log-viewer tr.is-linked-hit {
		box-shadow: inset 4px 0 0 #f0ad4e, inset 0 0 0 2px rgba(240, 173, 78, 0.4);
	}

	.card[data-log-viewer] .log-viewer tr.is-linked-hit td {
		background: rgba(240, 173, 78, 0.18);
	}

	html.dark .card[data-log-viewer] .table.table-no-more tbody tr {
		background: #2e353e;
		border-color: rgba(255, 255, 255, 0.08);
	}

	html.dark .card[data-log-viewer] .table.table-no-more tbody tr.is-watched,
	html.dark .card[data-log-viewer] .log-viewer tr.is-watched > td {
		background: rgba(71, 164, 71, 0.18);
		border-color: rgba(125, 204, 125, 0.28);
	}
}

@media only screen and (min-width: 992px) {
	.card[data-log-viewer] .log-viewer tr.is-stream-focus td {
		background: rgba(0, 136, 204, 0.12);
	}

	.card[data-log-viewer] .log-viewer tr.is-linked-hit td {
		background: rgba(240, 173, 78, 0.2);
	}
}

.card[data-log-viewer] .log-viewer-status {
	margin: 0;
	padding: 8px 12px;
	font-size: 12px;
}

.card[data-log-viewer] .log-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	min-height: 220px;
	padding: 32px 16px;
}

.card[data-log-viewer] .log-loading[hidden] {
	display: none;
}

.card[data-log-viewer] .log-loading .bounce-loader {
	position: relative;
	left: auto;
	top: auto;
	margin: 0;
}

.card[data-log-viewer] .log-loading-text {
	font-size: 14px;
	color: #abb4be;
}

html.sidebar-light:not(.dark) .card[data-log-viewer] .log-loading-text {
	color: #666;
}

.card[data-log-viewer] .log-loading-dots {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 8px;
	border-radius: 50%;
	background: #0088cc;
	animation: log-loading-pulse 0.8s ease-in-out infinite;
}

@keyframes log-loading-pulse {
	0%, 100% { opacity: 0.25; transform: scale(0.85); }
	50% { opacity: 1; transform: scale(1); }
}

.card[data-log-viewer] .log-viewer-sentinel {
	height: 1px;
}

html.dark .card[data-log-viewer] .log-date,
html.dark .card[data-log-viewer] .log-level-debug {
	color: #8b95a1;
}

.metric-chart-card .metric-chart-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.metric-chart-card .card-title {
	margin-right: 0;
}

.metric-chart-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.metric-chart-toolbar .btn-group .btn.active {
	background: #0088cc;
	border-color: #0088cc;
	color: #fff;
}

.metric-chart-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 8px;
}

.metric-chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	color: #777;
}

.metric-chart-legend li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.metric-chart-legend li::before {
	content: "";
	width: 18px;
	height: 0;
	border-top: 3px solid #0088cc;
}

.metric-chart-legend .metric-chart-legend-decline::before {
	border-top-color: #d9534f;
}

html.dark .metric-chart-legend .metric-chart-legend-decline::before {
	border-top-color: #ef5b57;
}

.metric-chart-range {
	font-size: 12px;
	color: #777;
}

.metric-chart-viewport {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.metric-chart-pan {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid #d4d4d4;
	border-radius: 50%;
	background: #fff;
	color: #0088cc;
	line-height: 1;
	font-size: 22px;
}

.metric-chart-pan:hover:not(:disabled) {
	background: #0088cc;
	border-color: #0088cc;
	color: #fff;
}

.metric-chart-pan:disabled {
	opacity: 0.35;
	cursor: default;
}

.metric-chartist {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	height: 380px;
	cursor: crosshair;
	touch-action: none;
	user-select: none;
}

.metric-chartist.is-brushing {
	cursor: col-resize;
}

.metric-chartist.is-fixed {
	cursor: crosshair;
}

.metric-chartist.is-zoomed {
	cursor: crosshair;
}

.metric-chart-brush {
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 1;
	background: rgba(0, 136, 204, 0.18);
	border-left: 1px solid rgba(0, 136, 204, 0.65);
	border-right: 1px solid rgba(0, 136, 204, 0.65);
	pointer-events: none;
}

.metric-chartist > svg {
	display: block;
	width: 100%;
	min-height: 380px;
	height: 380px;
}

.metric-chartist .ct-grid {
	stroke: rgba(0, 0, 0, 0.18);
	stroke-width: 1px;
	stroke-dasharray: 2px;
}

.metric-chartist .ct-series.ct-series-a .ct-line {
	fill: none;
	stroke-width: 3px;
}

.metric-chartist .ct-point {
	display: none;
}

.metric-chartist .ct-series.ct-series-a .ct-area {
	fill: #0088cc;
	fill-opacity: 0.18;
}

html.dark .metric-chartist .ct-series.ct-series-a .ct-area {
	fill: #0088cc;
	fill-opacity: 0.28;
}

.metric-chart-decline {
	fill: none;
	stroke: #d9534f;
	stroke-width: 3px;
	stroke-linejoin: round;
	stroke-linecap: round;
	pointer-events: none;
}

html.dark .metric-chart-decline {
	stroke: #ef5b57;
}

.metric-readings {
	margin-top: 24px;
}

.metric-readings-title {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 600;
}

.metric-readings-table {
	max-height: 360px;
	overflow: auto;
}

.metric-readings-empty {
	margin-top: 12px;
}

.metric-chart-tooltip {
	position: absolute;
	z-index: 2;
	transform: translate(-50%, calc(-100% - 12px));
	padding: 6px 8px;
	border-radius: 3px;
	background: #0088cc;
	color: #fff;
	font-size: 12px;
	line-height: 1.35;
	pointer-events: none;
	white-space: nowrap;
}

html.dark .metric-chart-legend,
html.dark .metric-chart-range {
	color: #8b95a1;
}

html.dark .metric-chart-pan {
	background: #2b2e34;
	border-color: #3d424c;
	color: #6dcff6;
}

html.dark .metric-chart-brush {
	background: rgba(109, 207, 246, 0.2);
	border-left-color: rgba(109, 207, 246, 0.7);
	border-right-color: rgba(109, 207, 246, 0.7);
}

html.dark .metric-chartist .ct-label {
	fill: rgba(255, 255, 255, 0.45);
	color: rgba(255, 255, 255, 0.45);
}

html.dark .metric-chartist .ct-grid {
	stroke: rgba(255, 255, 255, 0.22);
}

.incident-log-line {
	display: block;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 13px;
}

.incident-list-severity {
	margin-top: 4px;
}

.incident-list-number {
	font-weight: 600;
	white-space: nowrap;
}

.incident-severity-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	width: 6.25rem;
	padding: 0.22rem 0.35rem;
	border-radius: 0.25rem;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.incident-severity-badge i {
	flex-shrink: 0;
	font-size: 11px;
}

.incident-severity-badge > span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

.incident-severity-badge-debug {
	background: #eef0f2;
	color: #6c757d;
}

.incident-severity-badge-info {
	background: rgba(26, 163, 217, 0.16);
	color: #1486b3;
}

.incident-severity-badge-warning {
	background: rgba(217, 162, 26, 0.18);
	color: #b8860b;
}

.incident-severity-badge-error,
.incident-severity-badge-fatal {
	background: rgba(217, 75, 75, 0.16);
	color: #c73e3e;
}

html.dark .incident-severity-badge-debug {
	background: rgba(139, 149, 161, 0.2);
	color: #b8c0c8;
}

html.dark .incident-severity-badge-info {
	background: rgba(26, 163, 217, 0.22);
	color: #6ecff0;
}

html.dark .incident-severity-badge-warning {
	background: rgba(217, 162, 26, 0.22);
	color: #f0c14b;
}

html.dark .incident-severity-badge-error,
html.dark .incident-severity-badge-fatal {
	background: rgba(217, 75, 75, 0.22);
	color: #ff8a8a;
}

.log-level-warning { color: #d9a21a; }
.log-level-error, .log-level-fatal { color: #d94b4b; }
.log-level-info { color: #1aa3d9; }

.incident-counter {
	display: inline-block;
	min-width: 2rem;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	font-weight: 700;
	text-align: center;
}

.incident-counter-alert {
	background: #f24545;
	color: #fff;
}

.incident-counter-muted {
	background: #f0ad4e;
	color: #fff;
}

.incident-show-header .ecommerce-status {
	margin: 0;
}

/* Шапка сигнала и заявки. Раньше карточка держала только статус и кнопки,
   а как называется открытая страница, было видно лишь в хлебных крошках. */
.incident-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.incident-head-main {
	min-width: 0;
	flex: 1 1 22rem;
}

.incident-crumbs {
	margin-bottom: 0.35rem;
	font-size: 0.8125rem;
}

.incident-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.25;
}

.incident-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

/* Действия над сигналом и уход со страницы — разные по смыслу группы,
   поэтому «К списку» отделён чертой, а не стоит в общем ряду. */
.incident-show-actions-sep {
	width: 1px;
	align-self: stretch;
	margin: 0.1rem 0.25rem;
	background: rgba(0, 0, 0, 0.12);
}

/* Счётчики и сроки плитками того же вида, что виджеты сводки: в общем списке
   свойств важные числа терялись среди дат. */
.incident-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
	gap: 0.75rem;
}

/* Плитка здесь только показывает число, её некуда открыть. */
.incident-facts .device-dash-widget {
	gap: 0.35rem;
	padding: 0.8rem 0.75rem 0.7rem;
	cursor: default;
}

.incident-facts .device-dash-widget:hover {
	border-color: rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	transform: none;
}

.incident-facts .device-dash-number {
	min-height: 0;
}

.incident-facts .device-dash-number-value {
	font-size: 1.65rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.incident-facts .device-dash-widget-label {
	min-height: 0;
}

.incident-facts-sub {
	font-size: 0.72rem;
	line-height: 1.2;
	text-align: center;
	color: #8a929b;
}

/* Оставшиеся свойства: подпись над значением в две колонки — короче, чем
   строки «подпись — значение» во всю ширину колонки. */
.incident-props-compact {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
	gap: 0.85rem 1rem;
	margin: 0;
}

.incident-props-compact dt {
	margin: 0 0 0.15rem;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #8b8e96;
}

.incident-props-compact dd {
	margin: 0;
	font-size: 0.875rem;
}

.incident-props {
	display: grid;
	gap: 12px;
}

.incident-props > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px 12px;
	align-items: start;
}

.incident-props dt {
	margin: 0;
	font-weight: 500;
	color: #8b8e96;
}

.incident-props dd {
	margin: 0;
	text-align: right;
}

.incident-timeline.timeline .tm-body {
	padding: 8px 0 0;
}

.incident-timeline.timeline .tm-items > li {
	margin: 12px 0;
}

.incident-timeline .tm-box {
	width: 100%;
}

.incident-details-main,
.incident-details-aside {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.incident-details-main > .card,
.incident-details-aside > .card {
	margin: 0;
}

@media (min-width: 1200px) {
	.incident-details-main,
	.incident-details-aside {
		min-height: 0;
	}

	.incident-timeline-card {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
	}

	.incident-timeline-card .card-body {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
	}

	.incident-timeline-pager {
		margin-top: auto;
		padding-top: 1rem;
	}

	.incident-details-aside > .incident-chat-card:last-child {
		flex: 1 1 auto;
		min-height: 0;
	}

	.incident-details-aside > .incident-chat-card:last-child .card-body {
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		min-height: 0;
	}

	.incident-details-aside > .incident-chat-card:last-child .incident-chat {
		flex: 1 1 auto;
		min-height: 0;
	}

	.incident-details-aside > .incident-chat-card:last-child .incident-chat-messages {
		max-height: none;
	}
}

.incident-timeline-comment .incident-chat-bubble {
	display: inline-block;
	max-width: 100%;
}

.incident-timeline-comment.is-mine .incident-chat-bubble {
	background: #e8f1ff;
}

.incident-chat-card {
	display: flex;
	flex-direction: column;
}

.incident-chat-card .incident-chat {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 280px;
}

.incident-chat-messages {
	flex: 1 1 auto;
	min-height: 140px;
	max-height: 360px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 4px 2px 12px;
}

.incident-chat-item {
	max-width: 92%;
	display: flex;
	flex-direction: column;
}

.incident-chat-item.is-mine {
	align-self: flex-end;
	align-items: flex-end;
}

.incident-chat-item.is-other {
	align-self: flex-start;
	align-items: flex-start;
}

.incident-chat-item.is-knowledge {
	align-self: stretch;
	align-items: stretch;
	max-width: 100%;
}

.incident-chat-item.is-knowledge .incident-chat-bubble {
	background: #f7f9fc;
	border: 1px solid #e7e9ed;
}

.incident-chat-meta {
	font-size: 12px;
	color: #8b8e96;
	margin-bottom: 4px;
}

.incident-chat-audience {
	color: #0088cc;
}

.incident-chat-bubble {
	border-radius: 12px;
	padding: 10px 14px;
	background: #f3f4f6;
	word-break: break-word;
}

.incident-chat-item.is-mine .incident-chat-bubble {
	background: #e8f1ff;
}

.incident-chat-composer {
	border-top: 1px solid #e7e9ed;
	padding-top: 16px;
	margin-top: 4px;
	flex: 0 0 auto;
}

html.dark .incident-chat-bubble {
	background: #2b3036;
}

html.dark .incident-chat-item.is-mine .incident-chat-bubble,
html.dark .incident-timeline-comment.is-mine .incident-chat-bubble {
	background: #24344d;
}

html.dark .incident-chat-item.is-knowledge .incident-chat-bubble {
	background: #2b3036;
	border-color: #3a4048;
}

html.dark .incident-chat-composer {
	border-top-color: #3a4048;
}

html.dark .incident-chat-audience {
	color: #5eb4e6;
}

html.dark .incident-props dt {
	color: #9aa0a8;
}

html.dark .incident-show-actions-sep {
	background: rgba(255, 255, 255, 0.14);
}

html.dark .incident-facts .device-dash-widget:hover {
	border-color: rgba(255, 255, 255, 0.08);
	box-shadow: none;
}

html.dark .incident-facts-sub {
	color: #98a2b3;
}

html.dark .incident-props-compact dt {
	color: #9aa0a8;
}

html.dark .incident-props-compact dd {
	color: #e8eaed;
}

html.dark .card.card-modern {
	background: #2e353e;
	border-color: #21262d;
	box-shadow: none;
	color: #c5cad1;
}

html.dark .card.card-modern .card-header {
	background: #282d36;
	border-bottom: 1px solid #21262d;
	color: #fff;
}

html.dark .card.card-modern .card-body {
	background: #2e353e;
	color: #c5cad1;
}

html.dark .card.card-modern .card-title {
	color: #fff;
}

html.dark .card.card-modern .text-muted,
html.dark .card.card-modern .incident-props dt {
	color: #8b939e;
}

html.dark .incident-props dd,
html.dark .incident-props dd strong {
	color: #e8eaed;
}

html.dark .incident-log-line {
	color: #f0a8b8;
	background: transparent;
}

html.dark .card.card-modern .btn-default,
html.dark .card.card-modern .btn-light {
	background-color: #3a424d;
	border-color: #4a5360;
	color: #eee;
}

html.dark .card.card-modern .btn-default:hover,
html.dark .card.card-modern .btn-light:hover {
	background-color: #454e5a;
	border-color: #5a6472;
	color: #fff;
}

.incident-list-filters {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
}

.card-header-incidents {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	min-height: 76px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.card-header-incidents .card-title {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
}

.card-header-incidents .incident-list-filters {
	position: static;
	top: auto;
	right: auto;
	flex: 0 0 auto;
}

.incident-severity-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
}

.incident-severity-filters a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #B4B4B4;
	border-radius: 2px;
	text-decoration: none;
}

.incident-severity-filters a i {
	font-size: 14px;
	line-height: 1;
}

.incident-severity-filters a:hover,
.incident-severity-filters a:focus {
	color: #717171;
	text-decoration: none;
}

.incident-severity-filters a.active {
	background-color: #eeeeee;
	color: #33353F;
}

.incident-severity-filters a.incident-severity-filter-error.active {
	color: #c73e3e;
}

.incident-severity-filters a.incident-severity-filter-warning.active {
	color: #b8860b;
}

.incident-severity-filters a.incident-severity-filter-info.active {
	color: #1486b3;
}

.incident-severity-filters a.incident-severity-filter-debug.active {
	color: #6c757d;
}

.incident-severity-filters a.incident-severity-filter-fatal.active {
	color: #c73e3e;
}

html.dark .incident-severity-filters a.active {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
}

html.dark .incident-severity-filters a.incident-severity-filter-error.active,
html.dark .incident-severity-filters a.incident-severity-filter-fatal.active {
	color: #ff8a8a;
}

html.dark .incident-severity-filters a.incident-severity-filter-warning.active {
	color: #f0c14b;
}

html.dark .incident-severity-filters a.incident-severity-filter-info.active {
	color: #6ecff0;
}

html.dark .incident-severity-filters a.incident-severity-filter-debug.active {
	color: #b8c0c8;
}

.incident-status-filters {
	display: flex;
	align-items: center;
	gap: 2px;
}

.incident-status-filters a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: #B4B4B4;
	border-radius: 2px;
}

.incident-status-filters a.active {
	background-color: #eeeeee;
	color: #33353F;
}

.incident-status-filters a.incident-status-filter-open.active {
	color: #c57a12;
}

.incident-status-filters a.incident-status-filter-in_progress.active {
	color: #1aa3d9;
}

.incident-status-filters a.incident-status-filter-closed.active {
	color: #2e9a5b;
}

html.dark .incident-status-filters a.active {
	background-color: rgba(255, 255, 255, 0.1);
	color: #fff;
}

html.dark .incident-status-filters a.incident-status-filter-open.active {
	color: #f0ad4e;
}

html.dark .incident-status-filters a.incident-status-filter-in_progress.active {
	color: #5bc0de;
}

html.dark .incident-status-filters a.incident-status-filter-closed.active {
	color: #5cb85c;
}

.device-card {
	overflow: visible;
}

.device-card-widget-wrap {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-width: 0;
	container-type: inline-size;
	container-name: device-card;
}

.device-card-widget {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-width: 0;
	border-radius: 5px;
	overflow: visible;
}

.widget-twitter-profile.device-card-widget .profile-info {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem 0.9rem;
	min-width: 0;
	padding: 12px 16px 14px;
}

.widget-twitter-profile.device-card-widget .profile-info::after {
	display: none;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-picture {
	float: none;
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	margin: 0;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-picture img {
	width: clamp(64px, 28cqi, 100px);
	height: clamp(64px, 28cqi, 100px);
	margin: -28px 0 0;
}

.widget-twitter-profile.device-card-widget .device-overview-heading {
	display: grid;
	flex: 1 1 auto;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
	column-gap: 0.75rem;
	row-gap: 0.25rem;
	min-width: 0;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-account {
	float: none;
	grid-column: 1;
	min-width: 0;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-account .name {
	margin: 0;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-account .account {
	display: block;
	overflow-wrap: anywhere;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-stats {
	float: none;
	clear: none;
	grid-column: 2;
	grid-row: 1;
	max-width: 100%;
	margin: 0;
	padding: 0.15rem 0 0;
	text-align: left;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-stats li {
	float: none;
	display: block;
	padding: 0;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-stats .count {
	margin: 0;
}

.widget-twitter-profile.device-card-widget .profile-info .profile-stats .badge {
	white-space: nowrap;
}

@container device-card (max-width: 240px) {
	.widget-twitter-profile.device-card-widget .profile-info {
		flex-wrap: wrap;
	}

	.widget-twitter-profile.device-card-widget .device-overview-heading {
		flex: 1 1 100%;
		grid-template-columns: minmax(0, 1fr);
	}

	.widget-twitter-profile.device-card-widget .profile-info .profile-stats {
		grid-column: 1;
		grid-row: auto;
	}
}

.device-card-widget .profile-quote {
	flex: 1 1 auto;
	padding: 16px 18px 18px;
	border-radius: 0 0 5px 5px;
}

.device-card-widget .device-card-facts {
	margin: 0;
}

.device-card-widget .device-card-facts > div {
	display: flex;
	gap: 0.5rem 0.75rem;
	margin: 0 0 0.4rem;
}

.device-card-widget .device-card-facts > div:last-child {
	margin-bottom: 0;
}

.device-card-widget .device-card-facts dt {
	flex: 0 0 auto;
	margin: 0;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.85);
}

.device-card-widget .device-card-facts dt::after {
	content: ':';
}

.device-card-widget .device-card-facts dd {
	margin: 0;
	color: #fff;
}

.device-card-widget .device-card-facts a {
	color: #fff;
	text-decoration: underline;
}

.device-overview-charts > [class*="col-"] {
	display: flex;
}

.device-overview-charts .card {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.device-overview-charts .card .card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.device-overview-charts .chart {
	flex: 1 1 auto;
	min-height: 184px;
	height: auto;
}

.device-overview-charts h4 a {
	color: inherit;
	text-decoration: none;
}

.device-overview-charts h4 a:hover,
.device-overview-charts h4 a:focus {
	text-decoration: underline;
}

.device-overview-charts .device-card-metric-chart.is-clickable {
	cursor: pointer;
}

.device-overview-charts .device-card-metric-chart.is-clickable .chart,
.device-overview-charts .device-card-metric-chart.is-clickable .chart * {
	pointer-events: none;
}

.device-overview-charts .device-card-metric-chart.is-clickable:hover,
.device-overview-charts .device-card-metric-chart.is-clickable:focus-visible {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
	outline: none;
}

.device-card-widget .top-image {
	height: 25px;
	overflow: hidden;
	background: #0088cc;
	border-radius: 5px 5px 0 0;
}

.device-card-widget .top-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 5px 5px 0 0;
}

.device-card-widget .profile-picture img {
	background: #fff;
	object-fit: contain;
	padding: 10px;
}

.device-tabs {
	margin: 0;
}

.device-tabs > .nav-tabs .nav-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-width: 0;
}

.device-tabs > .nav-tabs .nav-link i {
	flex: 0 0 auto;
}

.device-tabs > .nav-tabs .device-tab-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.device-tabs > .nav-tabs .badge {
	flex: 0 0 auto;
	margin: 0;
	border-radius: 10px;
	white-space: nowrap;
}

/* Porto paints the selected tab via li.active; Bootstrap 5 keeps .active on the link. */
html body .tabs .nav-tabs li .nav-link.active,
html.dark body .tabs .nav-tabs li .nav-link.active,
html body .tabs .nav-tabs li .nav-link.active:hover,
html.dark body .tabs .nav-tabs li .nav-link.active:hover,
html body .tabs .nav-tabs li .nav-link.active:focus,
html.dark body .tabs .nav-tabs li .nav-link.active:focus {
	background: #fff;
	border-left-color: #eee;
	border-right-color: #eee;
	border-top: 3px solid #ccc;
}

html body .tabs-primary .nav-tabs li .nav-link.active,
html.dark body .tabs-primary .nav-tabs li .nav-link.active,
html body .tabs-primary .nav-tabs li .nav-link.active:hover,
html.dark body .tabs-primary .nav-tabs li .nav-link.active:hover,
html body .tabs-primary .nav-tabs li .nav-link.active:focus,
html.dark body .tabs-primary .nav-tabs li .nav-link.active:focus {
	border-top-color: #0088cc;
	color: #0088cc;
}

html body .tabs .nav-tabs li.active .nav-link:not(.active),
html.dark body .tabs .nav-tabs li.active .nav-link:not(.active),
html body .tabs .nav-tabs li.active .nav-link:not(.active):hover,
html.dark body .tabs .nav-tabs li.active .nav-link:not(.active):hover,
html body .tabs-primary .nav-tabs li.active .nav-link:not(.active),
html.dark body .tabs-primary .nav-tabs li.active .nav-link:not(.active),
html body .tabs-primary .nav-tabs li.active .nav-link:not(.active):hover,
html.dark body .tabs-primary .nav-tabs li.active .nav-link:not(.active):hover,
html body .tabs-primary .nav-tabs li.active .nav-link:not(.active):focus,
html.dark body .tabs-primary .nav-tabs li.active .nav-link:not(.active):focus {
	background: #f4f4f4;
	border-top: 3px solid #eee;
}

html.dark body .tabs .nav-tabs li .nav-link.active {
	background: #21262d;
	border-left-color: #282d36;
	border-right-color: #282d36;
}

html.dark body .tabs .nav-tabs li.active .nav-link:not(.active),
html.dark body .tabs-primary .nav-tabs li.active .nav-link:not(.active) {
	background: #282d36;
	border-top-color: #2e353e;
}

.device-overview-nav,
.device-overview-divider {
	width: 100%;
	margin-top: 1rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.device-overview-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 1.25rem;
	padding-top: 0.85rem;
}

.device-overview-nav a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	line-height: 1.45;
}

.device-overview-nav a[aria-current="page"] {
	font-weight: 600;
	color: #0088cc;
	text-decoration: none;
}

html.dark .device-overview-nav,
html.dark .device-overview-divider {
	border-top-color: rgba(255, 255, 255, 0.08);
}

html.dark .device-overview-nav a[aria-current="page"] {
	color: #5bc0de;
}

html.dark .device-card-widget .profile-picture img {
	background: #fff;
}

/* Сплошная синяя заливка из скина перетягивала внимание на справочные поля.
   В тёмной теме карточка нейтральная, как и соседние; от акцента осталась
   полоса-баннер сверху. Светлая тема остаётся на заливке скина. */
html.dark .widget-twitter-profile.device-card-widget {
	background-color: #2e353e;
}

html.dark .widget-twitter-profile.device-card-widget .profile-quote {
	background-color: transparent;
}

/* Скин красит .bg-primary через !important, поэтому перебиваем тем же.
   Цвет — стандартный фон тёмной карточки, чтобы график встал в ряд с соседями. */
html.dark .device-overview-charts .card-body.bg-primary {
	background-color: #2e353e !important;
}

html.dark .device-overview-charts .device-card-metric-chart.is-clickable:hover,
html.dark .device-overview-charts .device-card-metric-chart.is-clickable:focus-visible {
	box-shadow: 0 0 0 2px rgba(0, 136, 204, 0.45);
}

html.dark .device-card-widget .device-card-facts dt,
html.dark .widget-twitter-profile.device-card-widget .profile-info .profile-account .account {
	color: #a0a8b3;
}

html.dark .device-card-widget .device-card-facts dd {
	color: #e6eaef;
}

html.dark .device-card-widget .device-card-facts a {
	color: #4aa8d8;
}

@media only screen and (min-width: 768px) {
	html.fixed .device-page .log-page-toolbar {
		position: sticky;
		top: 0;
		left: auto;
		right: auto;
		margin: 0 0 16px;
		border-radius: 4px;
		border: 1px solid #242830;
	}

	html.fixed .device-page .log-page-toolbar-spacer {
		display: none;
	}
}

.card[data-log-viewer] .log-viewer tr.is-watch-pending > td {
	background-color: #f4fbfd;
}

html.dark .card[data-log-viewer] .log-row-action {
	color: inherit;
}

html.dark .card[data-log-viewer] .log-watched-mark {
	color: #7dcc7d;
}

html.dark .card[data-log-viewer] .log-viewer tr.is-watched > td,
html.dark .card[data-log-viewer] .table-striped > tbody > tr.is-watched:nth-of-type(odd) > td,
html.dark .card[data-log-viewer] .table-hover > tbody > tr.is-watched:hover > td,
html.dark .card[data-log-viewer] .table-striped > tbody > tr.is-watched > * {
	background-color: rgba(71, 164, 71, 0.18);
	box-shadow: none;
}

html.dark .card[data-log-viewer] .log-viewer tr.is-stream-focus td {
	background: rgba(91, 192, 222, 0.16);
}

html.dark .card[data-log-viewer] .log-viewer tr.is-linked-hit td,
html.dark .card[data-log-viewer] .table-striped > tbody > tr.is-linked-hit:nth-of-type(odd) > td,
html.dark .card[data-log-viewer] .table-hover > tbody > tr.is-linked-hit:hover > td {
	background: rgba(240, 173, 78, 0.22);
}

.dashboard-toolbar .btn i {
	vertical-align: middle;
}

.dashboard-toolbar .dashboard-edit-toggle {
	width: 38px;
	height: 38px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.dashboard-toolbar .dashboard-edit-toggle i {
	font-size: 1.2rem;
	line-height: 1;
	transition: transform 0.2s ease;
}

.dashboard-toolbar .dashboard-edit-toggle[aria-pressed="true"] {
	color: #0088cc;
	border-color: #0088cc;
	background: #fff;
}

.dashboard-toolbar .dashboard-edit-toggle[aria-pressed="true"] i {
	transform: rotate(45deg);
}

html.dark .dashboard-toolbar .dashboard-edit-toggle[aria-pressed="true"] {
	color: #1aa3d9;
	border-color: #1aa3d9;
	background: transparent;
}

.dashboard-toolbar .dashboard-group-toggle {
	width: 38px;
	height: 38px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.dashboard-toolbar .dashboard-group-toggle i {
	font-size: 1.2rem;
	line-height: 1;
}

.dashboard-toolbar .dashboard-group-toggle.is-active {
	color: #0088cc;
	border-color: #0088cc;
	background: #fff;
}

html.dark .dashboard-toolbar .dashboard-group-toggle.is-active {
	color: #1aa3d9;
	border-color: #1aa3d9;
	background: transparent;
}

.dashboard-groups {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.dashboard-group-org-title {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #8b939e;
}

.dashboard-group-device {
	margin-bottom: 1rem;
}

.dashboard-group-device:last-child {
	margin-bottom: 0;
}

.dashboard-group-device-title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: inherit;
}

.dashboard-group-device .dashboard-grid {
	min-height: 2rem;
}

/* Hide absolute tiles until GridStack assigns gs-N — avoids full-bleed flash after Turbo. */
.dashboard-grid:not(.dashboard-grid-ready) > .grid-stack-item {
	visibility: hidden;
}

/*
 * A paused tab reports clientWidth 0, GridStack locks gs-1, and a normal reload
 * keeps those full-bleed tiles. On a desktop viewport that column count is wrong.
 */
@media (min-width: 768px) {
	.dashboard-grid.gs-1 {
		display: flex;
		flex-wrap: wrap;
		align-content: flex-start;
		gap: 10px;
		height: auto !important;
	}

	.dashboard-grid.gs-1 > .grid-stack-item {
		position: relative !important;
		left: auto !important;
		top: auto !important;
		transform: none !important;
		width: 200px !important;
		max-width: 100% !important;
		height: auto !important;
	}

	.dashboard-grid.gs-1 > .grid-stack-item[data-widget-size="medium"] {
		width: 800px !important;
	}

	.dashboard-grid.gs-1 > .grid-stack-item[data-widget-size="large"] {
		width: 1600px !important;
	}

	.dashboard-grid.gs-1 > .grid-stack-item > .grid-stack-item-content {
		position: relative !important;
		inset: auto !important;
		width: auto !important;
		height: auto !important;
	}
}

.dashboard-grid .grid-stack-item-content {
	overflow: hidden;
}

.dashboard-grid .dashboard-widget {
	height: 100%;
	margin: 0;
	display: flex;
	flex-direction: column;
}

.dashboard-grid .dashboard-widget .card-header {
	cursor: default;
	padding-right: 20px;
}

.dashboard-grid:not(.dashboard-grid-editing) .dashboard-widget .card-actions {
	display: none;
}

.dashboard-grid-editing .dashboard-widget .card-header {
	cursor: move;
	padding-right: 48px;
}

.dashboard-grid-stacked.dashboard-grid-editing .dashboard-widget .card-header {
	cursor: default;
}

.dashboard-grid .ui-resizable-handle,
.dashboard-grid .grid-stack-item > .ui-resizable-handle {
	display: none !important;
}

.dashboard-grid .dashboard-widget .card-actions button.card-action {
	border: 0;
	padding: 0;
	appearance: none;
	cursor: pointer;
}

.dashboard-grid .dashboard-widget .card-body {
	flex: 1;
	overflow: auto;
}

.dashboard-grid .dashboard-widget:has(.dashboard-widget-identity) {
	position: relative;
	background: transparent;
}

.dashboard-grid .dashboard-widget:has(.dashboard-widget-identity) > .card-body {
	padding: 0;
	overflow: hidden;
	background: transparent;
	box-shadow: none;
	border-radius: 5px;
	display: flex;
	flex-direction: column;
}

.dashboard-grid:not(.dashboard-grid-editing) .dashboard-widget:has(.dashboard-widget-identity) > .card-header {
	display: none;
}

.dashboard-grid-editing .dashboard-widget:has(.dashboard-widget-identity) > .card-header {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 3;
	background: rgba(0, 0, 0, 0.32);
	border: 0;
	border-radius: 5px 5px 0 0;
	color: #fff;
}

.dashboard-grid-editing .dashboard-widget:has(.dashboard-widget-identity) > .card-header .card-title,
.dashboard-grid-editing .dashboard-widget:has(.dashboard-widget-identity) > .card-header .card-subtitle {
	color: #fff;
}

.dashboard-widget-identity {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
	overflow: hidden;
}

.dashboard-widget-identity .top-image {
	flex: 0 0 25px;
	height: 25px;
	position: relative;
}

.dashboard-widget-identity .top-image svg {
	display: block;
	width: 100%;
	height: 100%;
}

.dashboard-widget-identity .profile-info {
	flex: 0 0 auto;
}

.dashboard-widget-identity .profile-quote {
	flex: 1 1 auto;
	min-height: 0;
	padding: 12px 16px 14px;
}

.dashboard-widget-identity .device-card-facts {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 0.35rem;
}

.dashboard-widget-identity .device-card-facts > div {
	margin: 0;
}

.dashboard-widget-identity .profile-account .name,
.dashboard-widget-identity .profile-account .name a {
	color: #fff;
	text-decoration: none;
}

.dashboard-widget-identity .profile-account .name a:hover,
.dashboard-widget-identity .profile-account .name a:focus {
	text-decoration: underline;
}

.widget-twitter-profile.device-card-widget.dashboard-widget-identity .profile-info .profile-picture {
	width: 104px;
	height: 104px;
	margin: -28px 0 0;
	padding: 0;
	border: 4px solid #fff;
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
	box-sizing: border-box;
}

.dashboard-widget-identity .profile-picture .dashboard-widget-meter,
.dashboard-widget-identity .profile-picture .liquid-meter-wrapper,
.dashboard-widget-identity .profile-picture .liquid-meter {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
}

.dashboard-widget-identity .profile-picture .liquid-meter svg {
	display: block;
}

.dashboard-widget-identity .profile-picture .dashboard-widget-meter {
	position: relative;
}

.dashboard-widget-identity .dashboard-widget-meter-substance {
	position: absolute;
	left: 50%;
	top: 57%;
	transform: translateX(-50%);
	z-index: 2;
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	color: #3a2716;
	text-shadow: 0 0 4px #fff8f1, 0 0 8px #fff8f1;
	pointer-events: none;
	white-space: nowrap;
}

.dashboard-widget-identity--small .dashboard-widget-meter-substance {
	top: 58%;
	font-size: 11px;
}

.dashboard-widget-identity .profile-stats .badge {
	background: #fff;
	color: #333;
}

.dashboard-widget-identity .profile-stats .badge-success {
	color: #3d923d;
}

.dashboard-widget-identity .profile-stats .badge-warning {
	color: #d18211;
}

.dashboard-widget-identity .profile-stats .badge-danger {
	color: #a82824;
}

.widget-twitter-profile.dashboard-widget-identity--ok {
	background-color: #47a447;
}

.widget-twitter-profile.dashboard-widget-identity--ok .top-image {
	background: linear-gradient(135deg, #1f5a1f 0%, #47a447 55%, #6dbf72 100%);
}

.widget-twitter-profile.dashboard-widget-identity--ok .profile-quote {
	background-color: #52b152;
}

.widget-twitter-profile.dashboard-widget-identity--warning {
	background-color: #ed9c28;
}

.widget-twitter-profile.dashboard-widget-identity--warning .top-image {
	background: linear-gradient(135deg, #b06a0c 0%, #ed9c28 55%, #f0c056 100%);
}

.widget-twitter-profile.dashboard-widget-identity--warning .profile-quote {
	background-color: #f0ab45;
}

.widget-twitter-profile.dashboard-widget-identity--danger {
	background-color: #d2322d;
}

.widget-twitter-profile.dashboard-widget-identity--danger .top-image {
	background: linear-gradient(135deg, #8a1c18 0%, #d2322d 55%, #e0706c 100%);
}

.widget-twitter-profile.dashboard-widget-identity--danger .profile-quote {
	background-color: #db4b46;
}

.dashboard-widget-identity .dashboard-widget-clinic {
	display: block;
	font-weight: 600;
	opacity: 0.95;
}

.dashboard-grid .dashboard-widget:has(.dashboard-widget-identity--small) {
	height: auto;
}

.dashboard-grid .dashboard-widget:has(.dashboard-widget-identity--small) > .card-body {
	flex: 0 0 auto;
}

.dashboard-widget-identity--small {
	height: auto;
	flex: 0 0 auto;
}

.dashboard-widget-identity--small .profile-info {
	flex: 0 0 auto;
	align-items: center;
	padding: 8px 12px 12px;
}

.widget-twitter-profile.device-card-widget.dashboard-widget-identity--small .profile-info .profile-picture {
	width: 80px;
	height: 80px;
	margin: -22px 0 0;
	border-width: 3px;
}

.dashboard-widget-identity--small .profile-account .name {
	font-size: 1rem;
}

.dashboard-widget-identity--large .profile-quote {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem 1rem;
	align-items: stretch;
}

.dashboard-widget-plot {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	height: 100%;
	color: #fff;
	padding: 10px 12px 8px;
	border-radius: 6px;
}

.dashboard-widget-plot--helium {
	background: rgba(0, 0, 0, 0.16);
}

.dashboard-widget-plot--exams {
	background: rgba(255, 255, 255, 0.16);
}

.dashboard-widget-plot-title {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 0.45rem;
	color: rgba(255, 255, 255, 0.92);
}

.dashboard-widget-plot-empty {
	margin: 0;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
}

.dashboard-widget-plot-line {
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	grid-template-rows: minmax(5.5rem, 1fr) auto;
	flex: 1 1 auto;
	min-height: 8rem;
	column-gap: 0.35rem;
	row-gap: 0.2rem;
}

.dashboard-widget-plot-yaxis {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-end;
	font-size: 10px;
	line-height: 1;
	color: rgba(255, 255, 255, 0.88);
	font-variant-numeric: tabular-nums;
}

.dashboard-widget-plot-canvas {
	grid-column: 2;
	grid-row: 1;
	position: relative;
	min-height: 5.5rem;
}

.dashboard-widget-plot-svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.dashboard-widget-plot-grid {
	stroke: rgba(255, 255, 255, 0.28);
	stroke-width: 0.4;
}

.dashboard-widget-plot-dots {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.dashboard-widget-plot-dot-label {
	position: absolute;
	transform: translate(-50%, -115%);
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.dashboard-widget-plot-dot-label::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 100%;
	width: 7px;
	height: 7px;
	margin: 3px 0 0 -3.5px;
	background: #9c6b30;
	border: 1.5px solid #fff;
	border-radius: 50%;
	box-sizing: border-box;
}

.dashboard-widget-plot-xrow {
	grid-column: 2;
	grid-row: 2;
	display: flex;
	justify-content: space-between;
	font-size: 10px;
	line-height: 1.1;
	color: rgba(255, 255, 255, 0.85);
	white-space: nowrap;
}

.dashboard-widget-plot-bars {
	display: flex;
	align-items: stretch;
	gap: 0.3rem;
	flex: 1 1 auto;
	min-height: 6.25rem;
}

.dashboard-widget-plot-col {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 0;
}

.dashboard-widget-plot-n {
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 0.2rem;
	font-variant-numeric: tabular-nums;
}

.dashboard-widget-plot-track {
	flex: 1 1 auto;
	width: 100%;
	max-width: 22px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 3px 3px 0 0;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.dashboard-widget-plot-fill {
	width: 100%;
	background: #fff;
	border-radius: 3px 3px 0 0;
	min-height: 0;
}

.dashboard-widget-plot-x {
	margin-top: 0.3rem;
	font-size: 10px;
	line-height: 1.1;
	color: rgba(255, 255, 255, 0.85);
	white-space: nowrap;
}

.dashboard-grid-stacked .dashboard-widget .card-header {
	cursor: default;
}

@media (max-width: 767px) {
	.dashboard-grid-editing .dashboard-widget .card-header {
		padding-right: 44px;
	}

	.dashboard-widget-stat-value {
		font-size: 1.75rem;
	}
}

.dashboard-widget-stat-value {
	font-size: 2.25rem;
	font-weight: 600;
	line-height: 1.1;
}

.dashboard-widget-overview {
	--dashboard-meter-size: 150px;
	display: grid;
	column-gap: 1rem;
	row-gap: 0.25rem;
	align-items: stretch;
	min-height: 100%;
}

.dashboard-widget-overview--small {
	--dashboard-meter-size: 118px;
	grid-template-columns: var(--dashboard-meter-size) minmax(0, 1fr);
	grid-template-rows: var(--dashboard-meter-size) auto;
	grid-template-areas:
		"meter stats"
		"caption stats";
}

.dashboard-widget-overview--medium {
	grid-template-columns: var(--dashboard-meter-size) minmax(0, 1fr) minmax(7rem, 1.15fr);
	grid-template-rows: var(--dashboard-meter-size) auto;
	grid-template-areas:
		"meter stats chart"
		"caption stats chart";
}

.dashboard-widget-overview--large {
	--dashboard-meter-size: 160px;
	grid-template-columns: var(--dashboard-meter-size) minmax(0, 1fr);
	grid-template-rows: var(--dashboard-meter-size) auto minmax(7rem, 1fr);
	grid-template-areas:
		"meter stats"
		"caption stats"
		"chart chart";
}

.dashboard-widget-overview .dashboard-widget-meter {
	grid-area: meter;
	width: var(--dashboard-meter-size);
	height: var(--dashboard-meter-size);
}

.dashboard-widget-overview .dashboard-widget-meter-caption {
	grid-area: caption;
	margin-top: 0.15rem;
}

.dashboard-widget-overview-stats {
	grid-area: stats;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
}

.dashboard-widget-overview-chart {
	grid-area: chart;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	color: #0088CC;
}

.dashboard-widget-overview-chart-label {
	font-size: 12px;
	margin-bottom: 0.35rem;
}

.dashboard-helium-sparkline {
	width: 100%;
	flex: 1;
	min-height: 4.5rem;
	display: block;
}

html.dark .dashboard-widget-overview-chart {
	color: #1aa3d9;
}

.dashboard-widget-meter-row {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	flex: 1;
	min-height: 0;
}

.dashboard-widget-meter-value {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.dashboard-widget-meter-row .text-muted {
	font-size: 12px;
	line-height: 1.2;
}

@media (max-width: 767px) {
	.dashboard-widget-overview--small,
	.dashboard-widget-overview--medium,
	.dashboard-widget-overview--large {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		justify-items: center;
	}

	.dashboard-widget-overview .dashboard-widget-meter,
	.dashboard-widget-overview .dashboard-widget-meter-caption,
	.dashboard-widget-overview-stats,
	.dashboard-widget-overview-chart {
		grid-column: 1;
		grid-row: auto;
		width: 100%;
		height: auto;
	}

	.dashboard-widget-overview .dashboard-widget-meter {
		width: var(--dashboard-meter-size);
		height: var(--dashboard-meter-size);
	}

	.dashboard-widget-overview-stats {
		height: auto;
		max-width: 22rem;
	}

	.dashboard-helium-sparkline {
		min-height: 5rem;
	}
}

html.dark .loading-overlay {
	background: #21262d;
}

.main-content-frame {
	display: table-cell;
	position: relative;
	vertical-align: top;
}

.main-content-frame > .content-body {
	display: block;
}

html.flexbox .main-content-frame,
html.flexboxlegacy .main-content-frame {
	display: block;
	flex: 2;
	min-width: 1px;
}

/* Settings tabs stay under the fixed page header while the pane scrolls. */
@media only screen and (min-width: 768px) {
	html.fixed .content-body.has-settings-tabs {
		padding-top: 0;
	}

	html.fixed .settings-tabs {
		padding-top: 92px;
	}

	html.fixed .settings-tabs > .nav-tabs {
		position: fixed;
		top: 110px;
		left: 300px;
		right: 0;
		z-index: 1000;
		padding: 40px 40px 0;
		margin: 0;
		background: #ecedf0;
	}

	html.fixed .settings-org-switch {
		padding: 16px 0 0;
		max-width: 360px;
	}

	html.fixed.sidebar-left-collapsed .settings-tabs > .nav-tabs {
		left: 73px;
	}

	html.fixed.sidebar-right-opened .settings-tabs > .nav-tabs {
		right: 300px;
	}

	html.dark.fixed .settings-tabs > .nav-tabs {
		background: #1d2127;
	}
}

.notifications turbo-frame {
	display: inline-block;
	vertical-align: top;
}

.notification-clear-form {
	float: right;
	margin: 0;
}

.notification-clear {
	background: transparent;
	border: 0;
	padding: 0;
	color: #fff;
	font-size: 0.7rem;
	line-height: 1.5rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
}

.notification-clear:hover,
.notification-clear:focus {
	color: #fff;
	text-decoration: underline;
}

html.dark .incident-details .text-color-dark {
	color: #e2e4e8 !important;
}

@media (min-height: 800px) and (min-width: 992px) {
	html.dark .action-buttons-fixed .action-buttons {
		background: #1d2127;
	}
}

html.dark .ecommerce-timeline:before,
html.dark .ecommerce-timeline:after {
	box-shadow: 0 0 13px 15px #1d2127;
}

html.dark .ecommerce-timeline .ecommerce-timeline-items-wrapper:before {
	background: #3a4048;
}

html.dark .ecommerce-timeline .ecommerce-timeline-items-wrapper .ecommerce-timeline-item {
	background: #2b3036;
}

.observer-stat-grid {
	margin-bottom: 0;
}

.observer-stat-card {
	border: 1px solid #e4e7ea;
	border-radius: 8px;
	padding: 14px 16px;
	height: 100%;
	background: #fff;
}

.observer-stat-value {
	font-size: 1.6rem;
	font-weight: 700;
	line-height: 1.1;
}

.observer-stat-label {
	color: #6c757d;
	font-size: 12px;
	margin-top: 4px;
}

.observer-stat-ok .observer-stat-value {
	color: #2e9a5b;
}

.observer-stat-attention .observer-stat-value {
	color: #b8860b;
}

.observer-stat-critical .observer-stat-value {
	color: #c73e3e;
}

.observer-org-switch {
	min-width: 220px;
}

.observer-impact-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 6.25rem;
	padding: 0.22rem 0.35rem;
	border-radius: 0.25rem;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.observer-impact-badge-ok {
	background: rgba(46, 154, 91, 0.14);
	color: #2e9a5b;
}

.observer-impact-badge-attention {
	background: rgba(217, 162, 26, 0.18);
	color: #b8860b;
}

.observer-impact-badge-critical {
	background: rgba(217, 75, 75, 0.16);
	color: #c73e3e;
}

.observer-impact-badge-info {
	background: rgba(26, 163, 217, 0.16);
	color: #1486b3;
}

.observer-list-filters {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

html.dark .observer-stat-card {
	background: #2b3036;
	border-color: #3a4048;
}

html.dark .observer-stat-label {
	color: #9aa0a8;
}

.device-exams-chart-block {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.device-exams-chart-plot-wrap {
	position: relative;
}

.device-card-exams-plot {
	height: 132px;
	min-height: 132px;
	width: 100%;
}

.device-exams-chart-hover {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	z-index: 2;
}

.device-exams-chart-hover-cell {
	position: relative;
	cursor: default;
}

.device-exams-chart-tooltip {
	display: none;
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	padding: 4px 8px;
	background-color: #000;
	color: #fff;
	font-size: 11px;
	border-radius: 5px;
	pointer-events: none;
	white-space: nowrap;
	z-index: 3;
}

.device-exams-chart-hover-cell:hover .device-exams-chart-tooltip,
.device-exams-chart-axis-item:hover .device-exams-chart-tooltip {
	display: block;
}

.device-exams-chart-axis {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0;
	margin-top: 2px;
}

.device-exams-chart-axis-item {
	position: relative;
	min-width: 0;
	text-align: center;
	line-height: 1.15;
	cursor: default;
}

.device-exams-chart-axis-item .device-exams-chart-tooltip {
	bottom: calc(100% + 4px);
}

.device-exams-chart-weekday {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #777;
}

.device-exams-chart-date {
	display: block;
	font-size: 10px;
	color: #999;
}

html.dark .device-exams-chart-tooltip {
	background-color: #2b3036;
	color: #fff;
}

html.dark .device-exams-chart-weekday {
	color: #c0c4c8;
}

html.dark .device-exams-chart-date {
	color: #9aa0a8;
}

.exam-time-chart {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.exam-time-axis {
	position: relative;
	width: 44px;
	height: 360px;
	flex: 0 0 44px;
}

.exam-time-tick {
	position: absolute;
	left: 0;
	transform: translateY(-50%);
	font-size: 11px;
	line-height: 1;
	color: #777;
}

.exam-time-viewport {
	flex: 1;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	cursor: grab;
	touch-action: pan-y;
	scrollbar-width: none;
	user-select: none;
}

.exam-time-viewport.is-dragging {
	cursor: grabbing;
}

.exam-time-viewport::-webkit-scrollbar {
	display: none;
}

.exam-time-days {
	display: flex;
	gap: 6px;
	width: max(100%, calc(var(--exam-days) * 100% / 7));
}

.exam-time-day {
	flex: 1 0 0;
	min-width: 0;
}

.exam-time-count {
	height: 18px;
	margin-bottom: 4px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	line-height: 18px;
	color: #3a4a54;
}

.exam-time-track {
	position: relative;
	height: 360px;
	border-radius: 4px;
	background: #f4f6f8;
}

.exam-time-gridline {
	position: absolute;
	left: 0;
	right: 0;
	height: 1px;
	background: rgba(0, 0, 0, 0.08);
	pointer-events: none;
}

.exam-time-block {
	position: absolute;
	left: 4px;
	right: 4px;
	border-radius: 3px;
	background: #3aa0d8;
	min-height: 6px;
}

.exam-time-tip {
	display: none;
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	z-index: 2;
	width: max-content;
	max-width: 220px;
	padding: 6px 8px;
	border-radius: 4px;
	background: #1f2a32;
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
	white-space: normal;
}

.exam-time-block:hover .exam-time-tip {
	display: block;
}

.exam-time-day-label {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.2;
	color: #666;
}

html.dark .exam-time-tick,
html.dark .exam-time-day-label,
html.dark .exam-time-count {
	color: #aaa;
}

html.dark .exam-time-track {
	background: #1b242b;
}

html.dark .exam-time-gridline {
	background: rgba(255, 255, 255, 0.08);
}

.exam-timeline-chart {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: 8px;
	align-items: stretch;
}

.exam-timeline-y-axis {
	position: relative;
	height: 360px;
}

.exam-timeline-y-tick {
	position: absolute;
	right: 0;
	transform: translateY(50%);
	font-size: 10px;
	color: #999;
	line-height: 1;
	white-space: nowrap;
}

.exam-timeline-columns {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	height: 360px;
}

.exam-timeline-day {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
}

.exam-timeline-day-track {
	position: relative;
	flex: 1 1 auto;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.02);
	overflow: hidden;
}

.exam-timeline-segment {
	position: absolute;
	left: 12%;
	right: 12%;
	border-radius: 2px;
	cursor: default;
	box-sizing: border-box;
}

.exam-timeline-segment.is-pause {
	border: 1px solid #e4e7ea;
	background-color: #ffffff !important;
}

.exam-timeline-tooltip {
	display: none;
	position: absolute;
	left: 50%;
	bottom: calc(100% + 6px);
	transform: translateX(-50%);
	padding: 4px 8px;
	background-color: #000;
	color: #fff;
	font-size: 11px;
	border-radius: 5px;
	pointer-events: none;
	white-space: nowrap;
	z-index: 3;
	max-width: 220px;
	text-align: center;
}

.exam-timeline-segment:hover .exam-timeline-tooltip {
	display: block;
}

.exam-timeline-day-label {
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	color: #777;
	text-align: center;
}

.exam-timeline-legend {
	font-size: 12px;
	color: #777;
}

.exam-timeline-legend-swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 2px;
	margin-right: 6px;
	vertical-align: -2px;
	border: 1px solid #e4e7ea;
}

.exam-timeline-legend-swatch.is-pause {
	background: #ffffff;
}

html.dark .exam-timeline-legend {
	color: #c0c4c8;
}

html.dark .exam-timeline-legend-swatch {
	border-color: rgba(255, 255, 255, 0.18);
}

html.dark .exam-timeline-legend-swatch.is-pause {
	background: #2b3036;
}

html.dark .exam-timeline-day-track {
	border-color: rgba(255, 255, 255, 0.12);
	background: rgba(255, 255, 255, 0.03);
}

html.dark .exam-timeline-segment.is-pause {
	border-color: rgba(255, 255, 255, 0.18);
	background-color: #2b3036 !important;
}

html.dark .exam-timeline-tooltip {
	background-color: #2b3036;
	color: #fff;
}

html.dark .exam-timeline-y-tick,
html.dark .exam-timeline-day-label {
	color: #9aa0a8;
}

html.dark .ecommerce-timeline .ecommerce-timeline-items-wrapper .ecommerce-timeline-item:before {
	border-right-color: #2b3036;
}

.news-body {
	white-space: pre-wrap;
}

/* Top menu: existing sections sit in the header, beside the logo. */
@media (min-width: 768px) {
	.header.header-nav-menu {
		display: flex;
		align-items: center;
		gap: 8px;
	}

	.header.header-nav-menu .logo-container {
		float: none;
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		height: 60px;
	}

	.header.header-nav-menu .logo {
		float: none;
		margin: 0 0 0 15px;
	}

	.header.header-nav-menu .header-nav {
		flex: 1 1 auto;
		min-width: 0;
		float: none;
	}

	.header.header-nav-menu .header-nav-main {
		float: none;
		margin: 0;
		min-height: 0;
		background: transparent;
		padding: 0;
		max-height: none;
		overflow: visible;
		position: static;
		top: auto;
	}

	.header.header-nav-menu .header-right {
		float: none;
		flex: 0 0 auto;
		margin-left: auto;
		height: 56px;
	}
}

.header.header-nav-menu .header-nav-main nav > ul {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0 4px;
	overflow-x: auto;
}

.header.header-nav-menu .header-nav-main nav > ul > li {
	width: auto;
	border: 0;
	margin: 0;
	float: none;
	clear: none;
}

.header.header-nav-menu .header-nav-main nav > ul > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	text-transform: none;
	font-size: 13px;
	font-weight: 600;
}

.header.header-nav-menu .header-nav-main nav > ul > li > a i {
	font-size: 1.15rem;
	line-height: 1;
}

@media (min-width: 768px) {
	.header.header-nav-menu .header-nav-main nav > ul > li > a {
		color: #444;
		padding: 8px 12px;
	}

	html.dark .header.header-nav-menu .header-nav-main nav > ul > li > a {
		color: #c5c9d1;
	}

	.header.header-nav-menu .header-nav-main nav > ul > li.active > a,
	.header.header-nav-menu .header-nav-main nav > ul > li:hover > a,
	.header.header-nav-menu .header-nav-main nav > ul > li > a:focus {
		background: #0088CC;
		color: #fff;
	}
}

@media (max-width: 767px) {
	.header.header-nav-menu .header-nav {
		position: fixed;
		top: 60px;
		left: 0;
		right: 0;
		z-index: 97;
		height: 46px;
		display: flex;
		align-items: center;
		background: #fff;
		border-bottom: 1px solid #E9E9E6;
	}

	html.dark .header.header-nav-menu .header-nav {
		background: #1D2127;
		border-bottom-color: #161a1e;
	}

	.header.header-nav-menu .header-nav-main {
		float: none;
		margin: 0;
		min-height: 0;
		max-height: none;
		padding: 0;
		background: transparent;
		overflow: visible;
	}

	.header.header-nav-menu .header-nav-main nav {
		margin: 0;
	}

	.header.header-nav-menu .header-nav-main nav > ul > li > a {
		padding: 6px 10px;
		margin: 0;
		color: #444;
	}

	html.dark .header.header-nav-menu .header-nav-main nav > ul > li > a {
		color: #c5c9d1;
	}

	.header.header-nav-menu .header-nav-main nav > ul > li.active > a,
	.header.header-nav-menu .header-nav-main nav > ul > li:hover > a {
		background: #0088CC;
		color: #fff;
	}

	.header.header-nav-menu .header-right {
		margin-top: 106px;
	}
}

/* Side menu: searchable device list. */
.device-menu-search {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	height: 36px;
	margin: 0 16px 12px;
	padding: 0 10px;
	border: 1px solid #3a424c;
	border-radius: 8px;
	background: #17191e;
	color: #8b939e;
}

.device-menu-search i {
	flex: 0 0 auto;
	font-size: 1.1rem;
	line-height: 1;
}

.device-menu-search input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: #e6e8eb;
	font-size: 13px;
}

.device-menu-search input:focus {
	outline: none;
}

.device-menu-search input::placeholder {
	color: #7d8692;
}

.device-menu-search:focus-within {
	border-color: #0088CC;
}

html:not(.sidebar-left-collapsed) #device-menu > ul.nav-main > li > a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px 10px 18px;
	white-space: normal;
}

html:not(.sidebar-left-collapsed) #device-menu > ul.nav-main > li > a > i {
	margin-right: 0;
	flex: 0 0 auto;
}

.device-menu-label {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.device-menu-name,
.device-menu-meta {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.device-menu-name {
	font-weight: 600;
	color: #e7eaee;
}

.device-menu-meta {
	margin-top: 1px;
	font-size: 11px;
	font-weight: 400;
	color: #8b939e;
}

.device-menu-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 6px;
	border-radius: 50%;
	background: #6c757d;
	vertical-align: 1px;
}

.device-menu-dot-active {
	background: #47a447;
}

.device-menu-dot-maintenance {
	background: #ed9c28;
}

.device-menu-dot-inactive {
	background: #d2322d;
}

html:not(.sidebar-left-collapsed) #device-menu > ul.nav-main > li.nav-active > a {
	background: rgba(0, 136, 204, 0.18);
	box-shadow: 3px 0 0 #0088CC inset;
}

html:not(.sidebar-left-collapsed) #device-menu > ul.nav-main > li.nav-active .device-menu-name {
	color: #fff;
}

.device-menu-note {
	padding: 12px 20px;
	color: #8b939e;
	font-size: 12px;
	list-style: none;
}

html.sidebar-light:not(.dark) .device-menu-search {
	background: #fff;
	border-color: #ddd;
}

html.sidebar-light:not(.dark) .device-menu-search input,
html.sidebar-light:not(.dark) .device-menu-name {
	color: #333;
}

@media (min-width: 768px) {
	html.sidebar-left-collapsed .device-menu-search,
	html.sidebar-left-collapsed .device-menu-note {
		display: none;
	}
}


/* Device dashboard (Zont-like metric widgets) */
.device-dash {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.device-dash-section-title {
	margin: 0 0 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b757e;
}

.device-dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.75rem, 1fr));
	/* Ряды одной высоты: иначе перенос длинной подписи или сноска
	   поднимают соседние плитки, и сетка выглядит рваной. */
	grid-auto-rows: 1fr;
	gap: 0.75rem;
}

.device-dash-grid > turbo-frame {
	min-width: 0;
	display: block;
}

.device-dash-grid > turbo-frame > .device-dash-widget,
.device-dash-grid > turbo-frame > .device-dash-widget-shell,
.device-dash-grid > turbo-frame > .device-dash-widget-shell > .device-dash-widget {
	height: 100%;
}

.device-dash-widget-shell {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
}

.device-dash-widget-shell--pin .device-dash-pin {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	z-index: 2;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #98a2b3;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.device-dash-widget-shell--pin .device-dash-pin:hover,
.device-dash-widget-shell--pin .device-dash-pin:focus-visible {
	color: #f5a524;
}

/* Незакреплённая звёздочка в каждом углу забивает значение: показываем по наведению. */
.device-dash-grid .device-dash-pin:not(.is-pinned) {
	opacity: 0;
	transition: opacity 0.12s ease;
}

.device-dash-grid .device-dash-widget-shell:hover .device-dash-pin,
.device-dash-grid .device-dash-pin:focus-visible {
	opacity: 1;
}

.device-dash-widget-shell--pin .device-dash-pin.is-pinned {
	color: #f5a524;
}

.device-dash-widget-shell--pin .device-dash-pin i {
	font-size: 1.05rem;
	line-height: 1;
}

.device-dash-widget {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.9rem 0.75rem 0.8rem;
	border-radius: 0.75rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	color: inherit;
	text-decoration: none;
	text-align: inherit;
	width: 100%;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.device-dash-widget--nolabel {
	gap: 0.35rem;
	padding-bottom: 0.75rem;
}

/* Пин на Панели: ячейка ≈ плитка сводки (columnWidth), без широких «зон». */
.dashboard-grid .grid-stack-item:has(.dashboard-widget--pin) > .grid-stack-item-content {
	overflow: hidden;
}

.dashboard-widget--pin {
	position: relative;
	height: 100%;
	margin: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	width: 100%;
	max-width: none;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.dashboard-pin-menu {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	z-index: 3;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #98a2b3;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
	display: none; /* временно: настройки названия через «⋯» скрыты */
	align-items: center;
	justify-content: center;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.dashboard-pin-menu:hover,
.dashboard-pin-menu:focus-visible {
	color: #0088cc;
}

.dashboard-pin-menu i {
	font-size: 1.05rem;
	line-height: 1;
}

.dashboard-grid:not(.dashboard-grid-editing) .dashboard-widget--pin .card-actions {
	display: none;
}

.dashboard-grid-editing .dashboard-widget--pin {
	cursor: move;
}

.dashboard-grid-editing .dashboard-widget--pin .dashboard-pin-metric,
.dashboard-grid-editing .dashboard-widget--pin .dashboard-pin-stub {
	pointer-events: none;
}

.dashboard-grid-editing .dashboard-widget--pin .card-actions {
	pointer-events: auto;
	cursor: pointer;
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	left: auto;
	z-index: 3;
	display: block;
	margin: 0;
}

.dashboard-pin-remove {
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: #98a2b3;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.dashboard-pin-remove::before {
	content: none;
}

.dashboard-pin-remove i {
	font-size: 1.25rem;
	line-height: 1;
}

.dashboard-pin-remove:hover,
.dashboard-pin-remove:focus-visible {
	color: #e74c3c;
	background: #fff;
}

.dashboard-pin-metric {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.dashboard-pin-metric turbo-frame,
.dashboard-pin-metric .device-dash-widget-shell {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	width: 100%;
	height: 100%;
}

.dashboard-pin-metric .device-dash-widget {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
	box-sizing: border-box;
}

.dashboard-pin-metric .device-dash-widget-visual {
	flex: 0 0 auto;
	min-height: auto;
	justify-content: flex-start;
}

.dashboard-pin-metric .device-dash-spark {
	flex-shrink: 0;
}

.device-dash-widget--panel {
	gap: 0.45rem;
	padding-top: 0.85rem;
	padding-bottom: 0.75rem;
}

.device-dash-widget-meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1rem;
	width: 100%;
	min-width: 0;
	flex-shrink: 0;
}

.device-dash-widget-meta-org,
.device-dash-widget-meta-device {
	display: block;
	max-width: 100%;
	font-size: 0.68rem;
	line-height: 1.2;
	color: #8b939e;
	text-align: center;
}

.device-dash-widget-meta-device {
	font-weight: 600;
	color: #667085;
}

.dashboard-pin-stub {
	min-height: 10rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	cursor: default;
}

html.dark .dashboard-pin-menu {
	background: rgba(39, 42, 49, 0.92);
	color: #98a2b3;
}

html.dark .dashboard-pin-menu:hover,
html.dark .dashboard-pin-menu:focus-visible {
	color: #4db8e8;
}

html.dark .dashboard-pin-remove {
	background: rgba(39, 42, 49, 0.92);
	color: #98a2b3;
}

html.dark .dashboard-pin-remove:hover,
html.dark .dashboard-pin-remove:focus-visible {
	color: #f07178;
	background: rgba(39, 42, 49, 0.98);
}

html.dark .device-dash-widget-meta-org {
	color: #8b939e;
}

html.dark .device-dash-widget-meta-device {
	color: #b0b7c0;
}

html.dark .device-dash-widget-shell--pin .device-dash-pin {
	background: rgba(39, 42, 49, 0.92);
	color: #98a2b3;
}

html.dark .device-dash-widget-shell--pin .device-dash-pin.is-pinned,
html.dark .device-dash-widget-shell--pin .device-dash-pin:hover {
	color: #f5a524;
}

.device-dash-widget--skeleton {
	cursor: default;
	pointer-events: none;
}

.device-dash-widget--skeleton:hover {
	border-color: rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	transform: none;
}

.device-dash-skeleton-gauge {
	width: 7.25rem;
	height: 7.25rem;
	border-radius: 50%;
	background: linear-gradient(90deg, #eef1f4 25%, #e2e6ea 50%, #eef1f4 75%);
	background-size: 200% 100%;
	animation: device-dash-skeleton 1.2s ease-in-out infinite;
}

.device-dash-skeleton-spark {
	width: 100%;
	height: 1.75rem;
	border-radius: 0.35rem;
	background: linear-gradient(90deg, #eef1f4 25%, #e2e6ea 50%, #eef1f4 75%);
	background-size: 200% 100%;
	animation: device-dash-skeleton 1.2s ease-in-out infinite;
}

@keyframes device-dash-skeleton {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

.device-dash-widget:hover {
	border-color: rgba(0, 136, 204, 0.45);
	box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
	transform: translateY(-1px);
	color: inherit;
	text-decoration: none;
}

.device-dash-widget-visual {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
}

.device-dash-gauge {
	position: relative;
	width: 7.25rem;
	height: 7.25rem;
}

.device-dash-gauge-svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.device-dash-gauge-track {
	fill: none;
	stroke: #e8ecef;
	stroke-width: 8;
}

.device-dash-gauge-arc {
	fill: none;
	stroke: #0088cc;
	stroke-width: 8;
	stroke-linecap: round;
	stroke-dasharray: 301.59;
	stroke-dashoffset: 301.59;
	transition: stroke-dashoffset 0.45s ease;
}

.device-dash-widget.is-empty .device-dash-gauge-arc {
	stroke: #c5ccd3;
}

.device-dash-gauge-value {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.15;
	color: #2c333a;
}

.device-dash-number {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 7.25rem;
	width: 100%;
}

.device-dash-number-value {
	font-size: 1.55rem;
	font-weight: 600;
	line-height: 1.1;
	text-align: center;
	color: #2c333a;
}

.device-dash-liquid {
	position: relative;
	width: 7.25rem;
	height: 7.25rem;
}

.device-dash-widget .device-dash-liquid,
.device-dash-widget .device-dash-liquid .liquid-meter-wrapper,
.device-dash-widget .device-dash-liquid .liquid-meter,
.device-dash-widget .device-dash-liquid .liquid-meter.liquid-meter-loaded,
.device-dash-widget .device-dash-liquid .liquid-meter-wrapper.liquid-meter-sm .liquid-meter {
	width: 7.25rem;
	height: 7.25rem;
	max-width: 7.25rem;
	max-height: 7.25rem;
	margin: 0;
	padding: 0;
}

.device-dash-liquid .liquid-meter svg {
	display: block;
	width: 100%;
	height: 100%;
}

.device-dash-liquid-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.15;
	color: #2c333a;
	z-index: 1;
}

.device-dash-liquid:has(.liquid-meter-loaded) .device-dash-liquid-fallback {
	display: none;
}

.device-dash-unit {
	margin-left: 0.2rem;
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0;
	color: #8a929b;
}

/* Сводка устройства: плотнее сетка, значение крупнее подписи.
   На закреплённой панели дашборда размеры прежние. */
.device-dash-grid .device-dash-gauge,
.device-dash-grid .device-dash-skeleton-gauge,
.device-dash-grid .device-dash-liquid,
.device-dash-grid .device-dash-widget .device-dash-liquid,
.device-dash-grid .device-dash-widget .device-dash-liquid .liquid-meter-wrapper,
.device-dash-grid .device-dash-widget .device-dash-liquid .liquid-meter,
.device-dash-grid .device-dash-widget .device-dash-liquid .liquid-meter.liquid-meter-loaded,
.device-dash-grid .device-dash-widget .device-dash-liquid .liquid-meter-wrapper.liquid-meter-sm .liquid-meter {
	width: 5.75rem;
	height: 5.75rem;
	max-width: 5.75rem;
	max-height: 5.75rem;
}

/* Одна высота с кольцом, иначе подписи в соседних плитках разъезжаются. */
.device-dash-grid .device-dash-number {
	min-height: 5.75rem;
}

.device-dash-grid .device-dash-number-value {
	font-size: 1.85rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.device-dash-grid .device-dash-gauge-value {
	font-size: 1.05rem;
}

/* Метрики, которые пишет другая вкладка: одна строка вместо плиток с прочерком. */
.device-dash-offsite {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0.6rem 0.85rem;
	border: 1px dashed rgba(0, 0, 0, 0.16);
	border-radius: 0.75rem;
	font-size: 0.8125rem;
	color: #6b757e;
}

.device-dash-offsite i {
	font-size: 1rem;
	color: #8a929b;
}

/* Состояние показания по порогам метрики: янтарное предупреждение и красная
   авария. Пороги задаёт драйвер, без них плитка остаётся нейтральной. */
.device-dash-widget--warn::before,
.device-dash-widget--alarm::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	border-top-left-radius: 0.75rem;
	border-top-right-radius: 0.75rem;
	pointer-events: none;
}

.device-dash-widget--warn::before {
	background: #d99414;
	animation: device-dash-state-breathe 3.6s ease-in-out infinite;
}

.device-dash-widget--alarm::before {
	background: #d9534f;
	animation: device-dash-state-breathe 1.8s ease-in-out infinite;
}

.device-dash-widget--warn .device-dash-number-value,
.device-dash-widget--warn .device-dash-gauge-value,
.device-dash-widget--warn .device-dash-liquid-fallback {
	color: #96650a;
}

.device-dash-widget--alarm .device-dash-number-value,
.device-dash-widget--alarm .device-dash-gauge-value,
.device-dash-widget--alarm .device-dash-liquid-fallback {
	color: #b3302c;
}

.device-dash-widget--warn .device-dash-gauge-arc {
	stroke: #d99414;
}

.device-dash-widget--alarm .device-dash-gauge-arc {
	stroke: #d9534f;
}

/* Расходящееся кольцо у аварии: заметно боковым зрением, но это не мигание —
   один медленный цикл, без резкой смены яркости. */
.device-dash-widget--alarm::after {
	content: '';
	position: absolute;
	inset: -1px;
	border-radius: 0.75rem;
	pointer-events: none;
	animation: device-dash-alarm-ping 1.8s ease-out infinite;
}

@keyframes device-dash-state-breathe {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.35;
	}
}

@keyframes device-dash-alarm-ping {
	0% {
		box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.45);
	}

	70% {
		box-shadow: 0 0 0 7px rgba(217, 83, 79, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(217, 83, 79, 0);
	}
}

/* Цвет несёт тот же смысл и без движения. */
@media (prefers-reduced-motion: reduce) {
	.device-dash-widget--warn::before,
	.device-dash-widget--alarm::before,
	.device-dash-widget--alarm::after {
		animation: none;
	}
}

.device-dash-spark {
	display: block;
	width: 100%;
	height: 1.75rem;
	flex-shrink: 0;
	color: #7aa8c4;
}

.device-dash-widget-label {
	text-align: center;
	font-size: 0.8125rem;
	line-height: 1.25;
	color: #5c666f;
	min-height: 2.4em;
}

.device-dash-widget-caption {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	min-width: 0;
	margin-top: auto;
	gap: 0.22rem;
}

.device-dash-widget-caption:has(.device-dash-widget-updated) .device-dash-widget-label {
	min-height: 0;
}

.device-dash-widget-updated {
	display: block;
	margin: 0;
	padding: 0;
	text-align: center;
	font-size: 0.65rem;
	line-height: 1.2;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
	font-weight: 400;
	color: #98a2b3;
	white-space: nowrap;
}

html.dark .device-dash-widget {
	background: #2a2e35;
	border-color: rgba(255, 255, 255, 0.08);
}

html.dark .device-dash-skeleton-gauge,
html.dark .device-dash-skeleton-spark {
	background: linear-gradient(90deg, #343a42 25%, #3d4450 50%, #343a42 75%);
	background-size: 200% 100%;
}

html.dark .device-dash-gauge-track {
	stroke: #3d4450;
}

html.dark .device-dash-gauge-value,
html.dark .device-dash-number-value,
html.dark .device-dash-liquid-fallback {
	color: #f1f3f5;
}

.device-dash-widget-note {
	text-align: center;
	font-size: 0.68rem;
	line-height: 1.25;
	color: #8a5a12;
	margin-top: 0.15rem;
}

html.dark .device-dash-widget-label {
	color: #c2c9d2;
}

html.dark .device-dash-widget-updated {
	color: #8b939e;
}

html.dark .device-dash-section-title {
	color: #cbd2da;
}

html.dark .device-dash-unit {
	color: #98a2b3;
}

html.dark .device-dash-offsite {
	border-color: rgba(255, 255, 255, 0.14);
	color: #a0a8b3;
}

html.dark .device-dash-offsite i {
	color: #8b939e;
}

html.dark .device-dash-widget--warn::before {
	background: #e0a52e;
}

html.dark .device-dash-widget--alarm::before {
	background: #ef5b57;
}

html.dark .device-dash-widget--warn .device-dash-number-value,
html.dark .device-dash-widget--warn .device-dash-gauge-value,
html.dark .device-dash-widget--warn .device-dash-liquid-fallback {
	color: #f0bd5c;
}

html.dark .device-dash-widget--alarm .device-dash-number-value,
html.dark .device-dash-widget--alarm .device-dash-gauge-value,
html.dark .device-dash-widget--alarm .device-dash-liquid-fallback {
	color: #ef8b88;
}

html.dark .device-dash-widget--warn .device-dash-gauge-arc {
	stroke: #e0a52e;
}

html.dark .device-dash-widget--alarm .device-dash-gauge-arc {
	stroke: #ef5b57;
}

html.dark .device-dash-widget-note {
	color: #e0b15a;
}

html.dark .device-dash-spark {
	color: #5ea3c8;
}

#device-metric-chart-modal .metric-chartist {
	min-height: 380px;
}

#device-metric-chart-modal .metric-chart-header {
	justify-content: flex-end;
}

.device-health-gauge {
	display: block;
	width: 100%;
	max-width: 16rem;
	margin: 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.device-health-svg {
	display: block;
	width: 100%;
	height: auto;
}

.device-health-zone {
	fill: none;
	stroke-width: 10;
	stroke-linecap: butt;
	opacity: 0.35;
}

.device-health.is-ready .device-health-zone {
	opacity: 1;
}

.device-health-zone.is-calm { stroke: #47a447; }
.device-health-zone.is-elevated { stroke: #e6c229; }
.device-health-zone.is-strong { stroke: #ed9c28; }
.device-health-zone.is-anomaly { stroke: #d2322d; }

.device-health-tick {
	stroke: rgba(0, 0, 0, 0.28);
	stroke-width: 1;
}

.device-health-tick.is-major {
	stroke: rgba(0, 0, 0, 0.55);
	stroke-width: 1.5;
}

.device-health-needle {
	stroke: #171717;
	stroke-width: 2.5;
	stroke-linecap: round;
	fill: #171717;
}

.device-health-sweep {
	fill: none;
	stroke: rgba(0, 136, 204, 0.7);
	stroke-width: 10;
	stroke-linecap: round;
	stroke-dasharray: 28 220;
	opacity: 0;
}

.device-health.is-scanning .device-health-sweep {
	animation: device-health-sweep 1.15s ease-out;
}

@keyframes device-health-sweep {
	0% { stroke-dashoffset: 80; opacity: 0.9; }
	100% { stroke-dashoffset: -200; opacity: 0; }
}

.device-health-caption {
	text-align: center;
	font-weight: 600;
}

.device-health-notice {
	text-align: center;
	color: #8a5a12;
}

.device-health-points {
	font-size: 0.85rem;
}

.device-health-points li + li {
	margin-top: 0.25rem;
}

html.dark .device-health-tick {
	stroke: rgba(255, 255, 255, 0.35);
}

html.dark .device-health-tick.is-major {
	stroke: rgba(255, 255, 255, 0.7);
}

html.dark .device-health-needle {
	stroke: #f1f3f5;
	fill: #f1f3f5;
}

html.dark .device-health-notice {
	color: #e0b15a;
}
