
.opened .open
{
	display: none;
}
.opened .close
{
	display: block;
}
.opened .sub
{
	display: block;
}
.closed .open
{
	display: block;
}
.closed .close
{
	display: none;
}
.closed .sub
{
	display: none;
}

/* Thin custom scrollbars (Firefox + WebKit) */
html {
	height: 100%;
	overflow: hidden;
	scrollbar-width: thin;
	scrollbar-color: #c5d0de transparent;
}

body {
	height: 100%;
	margin: 0;
	overflow: hidden;
}

body,
button,
input,
select,
textarea {
	font-family: var(--ui-font);
}

h1, h2, h3, h4, h5, h6,
#page_title,
.entity-editor-modal__title,
.object-scheme__title,
.dash-context-banner__title,
.announce-card__title,
.profile-2fa__title,
.profile-company__appeal-title,
.profile-company__preview-title,
.profile-company__danger-title {
	font-family: var(--ui-font-display);
}

/* App shell: only #scrolldiv scrolls — no body/document scrollbar */
.flex.h-screen.bg-gray-50 {
	box-sizing: border-box;
	height: 100%;
	height: 100dvh;
	max-height: 100dvh;
	overflow: hidden;
}

.flex.h-screen.bg-gray-50 > .flex-1.flex.flex-col.overflow-hidden {
	min-width: 0;
	min-height: 0;
}

#mmenu {
	max-height: 100%;
}

#scrolldiv {
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

* {
	scrollbar-width: thin;
	scrollbar-color: #c5d0de transparent;
}

*::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

*::-webkit-scrollbar-track {
	background: transparent;
}

*::-webkit-scrollbar-thumb {
	background-color: #c5d0de;
	border-radius: 999px;
	border: 1px solid transparent;
	background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
	background-color: #94a3b8;
}

*::-webkit-scrollbar-corner {
	background: transparent;
}

/* Desktop nav collapse — icon rail */
.app-nav-toggle {
	box-sizing: border-box;
	display: none;
	width: 34px;
	height: 34px;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	transition:
		background-color var(--ui-dur-2) ease,
		color var(--ui-dur-2) ease,
		transform var(--ui-dur-1) var(--ui-ease-out);
}

.app-nav-toggle:active {
	transform: var(--ui-motion-press);
}

@media (min-width: 1024px) {
	.app-nav-toggle {
		display: inline-flex;
	}
}

.app-nav-toggle:hover {
	background: #f1f5f9;
	color: #334155;
}

.app-nav-toggle:focus-visible {
	outline: 2px solid #217dff;
	outline-offset: 2px;
}

.app-nav-toggle__bars {
	display: flex;
	width: 16px;
	flex-direction: column;
	gap: 3.5px;
}

.app-nav-toggle__bars span {
	display: block;
	width: 100%;
	height: 1.5px;
	border-radius: 999px;
	background: currentColor;
	transition:
		transform var(--ui-dur-2) var(--ui-ease-out),
		opacity var(--ui-dur-2) ease,
		width var(--ui-dur-2) var(--ui-ease-out);
	transform-origin: center;
}

.app-nav-toggle.is-collapsed .app-nav-toggle__bars span:nth-child(1) {
	width: 70%;
}

.app-nav-toggle.is-collapsed .app-nav-toggle__bars span:nth-child(3) {
	width: 55%;
}

.app-nav-toggle--header {
	margin-right: 2px;
}

#mmenu {
	transition:
		width var(--ui-dur-3) var(--ui-ease-out),
		transform var(--ui-dur-4) var(--ui-ease-out);
}

#mmenu .app-nav-brand {
	padding: 1rem .9rem .75rem;
}

#mmenu .app-nav-brand-text {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.01em;
	line-height: 1.2;
}

#mmenu .app-nav {
	padding-top: .2rem;
	padding-bottom: .55rem;
}

#mmenu .app-nav__section {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: .85rem;
}

#mmenu .app-nav__section:last-child {
	margin-bottom: .3rem;
}

#mmenu .app-nav__label {
	padding: .2rem .7rem .4rem;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .055em;
	line-height: 1.2;
	text-transform: uppercase;
}

#mmenu .app-nav__foot {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: .65rem .65rem .75rem;
}

#mmenu nav button.menu_on,
#mmenu nav button.menu_off,
#mmenu .app-nav-logout {
	box-sizing: border-box;
	display: flex;
	width: 100% !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	min-height: 42px;
	align-items: center;
	gap: 10px;
	column-gap: 10px;
	row-gap: 0;
	margin: 0;
	padding: .55rem .8rem !important;
	border: 0;
	border-radius: 14px !important;
	font-size: 14px !important;
	font-weight: 500;
	line-height: 1.3 !important;
	text-align: left;
	cursor: pointer;
	transition:
		background-color var(--ui-dur-2) ease,
		color var(--ui-dur-2) ease,
		transform var(--ui-dur-1) var(--ui-ease-out),
		box-shadow var(--ui-dur-2) ease;
}

#mmenu nav button.menu_on svg,
#mmenu nav button.menu_off svg,
#mmenu .app-nav-logout svg {
	width: 19px;
	height: 19px;
	flex: 0 0 auto;
}

#mmenu nav button.menu_off {
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #64748b !important;
}

#mmenu nav button.menu_off:hover {
	background: #f1f5f9 !important;
	color: #334155 !important;
}

#mmenu nav button.menu_on {
	background: var(--ui-primary, #217dff) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #fff !important;
}

#mmenu nav button.menu_on:hover {
	background: #1b6dff !important;
	background-image: none !important;
	color: #fff !important;
}

#mmenu nav button.menu_on::before,
#mmenu nav button.menu_on::after {
	content: none !important;
	display: none !important;
}

#mmenu .app-nav-logout {
	background: transparent !important;
	color: #dc2626 !important;
}

#mmenu .app-nav-logout:hover {
	background: #fef2f2 !important;
	color: #b91c1c !important;
}

#mmenu nav button.menu_on:active,
#mmenu nav button.menu_off:active,
#mmenu .app-nav-logout:active {
	transform: var(--ui-motion-press);
}

#mmenu nav button.menu_off:focus-visible,
#mmenu nav button.menu_on:focus-visible,
#mmenu .app-nav-logout:focus-visible {
	outline: 2px solid #217dff;
	outline-offset: 2px;
}

@media (min-width: 1024px) {
	body.nav-collapsed #mmenu {
		width: 4.75rem;
		overflow: hidden;
	}

	body.nav-collapsed #mmenu .app-nav-brand {
		padding: .95rem .5rem .65rem;
	}

	body.nav-collapsed #mmenu .app-nav-brand > div {
		justify-content: center;
	}

	body.nav-collapsed #mmenu .app-nav-brand-text,
	body.nav-collapsed #mmenu nav button span,
	body.nav-collapsed #mmenu .app-nav-logout-text,
	body.nav-collapsed #mmenu .app-nav__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	body.nav-collapsed #mmenu nav {
		padding-left: .45rem;
		padding-right: .45rem;
	}

	body.nav-collapsed #mmenu .app-nav__section {
		margin-bottom: .55rem;
	}

	body.nav-collapsed #mmenu nav button.menu_on,
	body.nav-collapsed #mmenu nav button.menu_off,
	body.nav-collapsed #mmenu .app-nav-logout {
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
		justify-content: center !important;
		align-items: center !important;
		gap: 0 !important;
		column-gap: 0 !important;
		row-gap: 0 !important;
		padding: .6rem 0 !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	body.nav-collapsed #mmenu nav button.menu_on svg,
	body.nav-collapsed #mmenu nav button.menu_off svg,
	body.nav-collapsed #mmenu .app-nav-logout svg {
		flex: 0 0 auto;
		margin: 0 auto;
	}

	body.nav-collapsed #mmenu .app-nav__foot {
		padding-left: .45rem;
		padding-right: .45rem;
	}

	body.nav-collapsed #mmenu .app-nav-legal {
		display: none;
	}
}

.offline .icon_norm,
.offline .icon_alarm,
.offline .icon_warn,
.offline .icon_signal,
.offline .icon_pending
{
	display: none;
}

.zalarm .icon_norm,
.zalarm .icon_offline,
.zalarm .icon_warn,
.zalarm .icon_signal,
.zalarm .icon_pending
{
	display: none;
}

.zwarn .icon_norm,
.zwarn .icon_offline,
.zwarn .icon_alarm,
.zwarn .icon_signal,
.zwarn .icon_pending
{
	display: none;
}

.zsignal .icon_norm,
.zsignal .icon_offline,
.zsignal .icon_alarm,
.zsignal .icon_warn,
.zsignal .icon_pending
{
	display: none;
}

/* На карточке контроля низкий заряд / слабый сигнал не прячут точку — остаётся зелёная или тревога */
.monitoring-card.zwarn .icon_norm
{
	display: block;
}

.monitoring-card.zwarn .icon_warn
{
	display: none;
}

.monitoring-card.zsignal .icon_norm
{
	display: block;
}

.monitoring-card.zsignal .icon_signal
{
	display: none !important;
}

.monitoring-card.zalarm .icon_norm
{
	display: none;
}

.monitoring-card.zalarm .icon_alarm
{
	display: block;
}

/* Страница зоны: показать чип «Низкий заряд» */
#zi_main.zwarn .icon_warn.zone-status-chip
{
	display: inline-flex;
}

#zi_main.zsignal .icon_signal.zone-status-chip
{
	display: inline-flex;
}

.normal .icon_alarm,
.normal .icon_warn,
.normal .icon_signal,
.normal .icon_offline,
.normal .icon_pending
{
	display: none;
}

.pending .icon_norm,
.pending .icon_alarm,
.pending .icon_warn,
.pending .icon_signal,
.pending .icon_offline
{
	display: none;
}

.alarm .icon_pending
{
	display: none;
}

.zvalue,
.zvalue_alarm
{
	padding: 2px 5px;
}
.zvalue_alarm
{
	background-color: #f003;
	color: #000;
}


#popup_fade
{
	display: none !important;
	pointer-events: none !important;
	visibility: hidden !important;
	position: fixed;
	left: 0px;
	top: 0px;
	width: 100vw;
	height: 100vh;
	z-index: 100;
}

.popup
{
	z-index: 110;
}

.user-card,
.profile-card {
	overflow: visible;
}

/* Core controls: one visual language for actions and icon buttons. */
:root {
	--ui-font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--ui-font-display: var(--ui-font);
	--ui-primary: #217dff;
	--ui-primary-hover: #176ee8;
	--ui-primary-active: #1263d6;
	--ui-primary-gradient: var(--ui-primary);
	--ui-primary-gradient-hover: var(--ui-primary-hover);
	--ui-primary-gradient-active: var(--ui-primary-active);
	--ui-secondary: #e9edf3;
	--ui-secondary-hover: #dfe5ec;
	--ui-secondary-active: #d5dce5;
	--ui-text: #172033;
	--ui-muted: #64748b;
	--ui-focus: rgba(33, 125, 255, .22);
	/* Controls: resting = fill, no gray outline; focus/error = colored border */
	--ui-control-bg: #f3f4f6;
	--ui-control-bg-hover: #eef1f5;
	--ui-control-bg-disabled: #f6f8fb;
	--ui-control-border-focus: var(--ui-primary);
	--ui-control-border-error: #e5484d;
	/* Override Tailwind light tokens that leaked blue into icons/chrome */
	--muted-foreground: #64748b !important;
	--muted: #f1f5f9 !important;
	--input-background: #f3f4f6 !important;
	--secondary-foreground: #172033 !important;
	--accent-foreground: #172033 !important;
	--border: #e5e7eb !important;

	/* Spacing scale (4px base). */
	--ui-space-1: 4px;
	--ui-space-2: 8px;
	--ui-space-3: 12px;
	--ui-space-4: 16px;
	--ui-space-5: 20px;
	--ui-space-6: 24px;
	--ui-space-7: 32px;
	--ui-space-8: 40px;

	/* Semantic spacing. */
	--ui-inset-xs: var(--ui-space-2);
	--ui-inset-sm: var(--ui-space-3);
	--ui-inset-md: var(--ui-space-4);
	--ui-inset-lg: var(--ui-space-6);
	--ui-stack-xs: var(--ui-space-2);
	--ui-stack-sm: var(--ui-space-3);
	--ui-stack-md: var(--ui-space-4);
	--ui-stack-lg: var(--ui-space-6);
	--ui-gap-card: var(--ui-space-4);
	--ui-inset-card: var(--ui-space-6);
	--ui-inset-card-mobile: var(--ui-space-4);

	/* Radius scale. */
	--ui-radius-sm: 8px;
	--ui-radius-md: 12px;
	--ui-radius-lg: 16px;
	--ui-radius-xl: 20px;
	--ui-radius-full: 9999px;
	--ui-radius-control: var(--ui-radius-md);
	--ui-radius-card: var(--ui-radius-lg);
	--ui-radius-dialog: var(--ui-radius-xl);

	/* Back-compat alias. */
	--ui-control-radius: var(--ui-radius-control);

	/* Motion (Linear/Notion-style micro-interactions). */
	--ui-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ui-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
	--ui-dur-1: 120ms;
	--ui-dur-2: 180ms;
	--ui-dur-3: 240ms;
	--ui-dur-4: 300ms;
	--ui-motion-press: scale(0.98);
	/* Lift on :hover moves the hitbox and causes enter/leave flicker — keep none. */
	--ui-motion-lift: none;
}

@keyframes ui-enter {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ui-page-enter {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ui-pop-in {
	from {
		opacity: 0;
		transform: translateY(-4px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes ui-modal-in {
	from {
		opacity: 0;
		transform: translate(-50%, calc(-50% + 8px)) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
}

@keyframes ui-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* Page / list enter helpers */
.ui-enter-active {
	animation: ui-page-enter var(--ui-dur-4) var(--ui-ease-out) both;
}

.ui-enter-stagger > * {
	opacity: 0;
	animation: ui-enter var(--ui-dur-4) var(--ui-ease-out) both;
}

.ui-enter-stagger > *:nth-child(1) { animation-delay: 0ms; }
.ui-enter-stagger > *:nth-child(2) { animation-delay: 30ms; }
.ui-enter-stagger > *:nth-child(3) { animation-delay: 60ms; }
.ui-enter-stagger > *:nth-child(4) { animation-delay: 90ms; }
.ui-enter-stagger > *:nth-child(5) { animation-delay: 120ms; }
.ui-enter-stagger > *:nth-child(6) { animation-delay: 150ms; }
.ui-enter-stagger > *:nth-child(7) { animation-delay: 180ms; }
.ui-enter-stagger > *:nth-child(8) { animation-delay: 210ms; }
.ui-enter-stagger > *:nth-child(9) { animation-delay: 240ms; }
.ui-enter-stagger > *:nth-child(10) { animation-delay: 270ms; }
.ui-enter-stagger > *:nth-child(11) { animation-delay: 300ms; }
.ui-enter-stagger > *:nth-child(12) { animation-delay: 330ms; }
.ui-enter-stagger > *:nth-child(n + 13) {
	opacity: 1;
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.ui-enter-active,
	.ui-enter-stagger > *,
	.app-modal[aria-hidden="false"],
	.app-select__menu,
	.object-actions__menu.is-open {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
	}

	.app-modal[aria-hidden="false"] {
		transform: translate(-50%, -50%) !important;
	}

	/* Keep busy/loading spinners readable */
	.loading-screen-spin,
	.app-busy-spin,
	.device-status-spin,
	.device-verify-spin,
	.chart-fs-spin {
		animation-duration: 0.8s !important;
		animation-iteration-count: infinite !important;
	}
}

.ui-button {
	display: inline-flex;
	box-sizing: border-box;
	min-height: 42px;
	align-items: center;
	justify-content: center;
	gap: var(--ui-space-2);
	padding: var(--ui-space-2) var(--ui-space-5);
	border: 0;
	border-radius: var(--ui-control-radius);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none !important;
	transition:
		background-color var(--ui-dur-2) ease,
		color var(--ui-dur-2) ease,
		border-color var(--ui-dur-2) ease,
		box-shadow var(--ui-dur-2) ease,
		transform var(--ui-dur-1) var(--ui-ease-out),
		opacity var(--ui-dur-2) ease;
}

.ui-button:active:not(:disabled) {
	transform: var(--ui-motion-press);
}

.ui-button > svg {
	display: block;
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ui-button--primary {
	background: var(--ui-primary) !important;
	color: #fff !important;
}

.ui-button--primary:hover {
	background: var(--ui-primary-hover) !important;
}

.ui-button--primary:active {
	background: var(--ui-primary-active) !important;
}

.ui-button--secondary {
	background: var(--ui-secondary) !important;
	color: var(--ui-text) !important;
}

.ui-button--secondary:hover {
	background: var(--ui-secondary-hover) !important;
}

.ui-button--secondary:active {
	background: var(--ui-secondary-active) !important;
}

.ui-button--outline {
	background: #eef6ff !important;
	color: var(--ui-primary) !important;
	border: 1px solid transparent !important;
	box-shadow: none !important;
}

.ui-button--outline:hover {
	background: #e0efff !important;
	border-color: transparent !important;
}

.ui-button--outline:active {
	background: #d4e7ff !important;
}

.ui-button--danger {
	background: #fee4e2 !important;
	color: #b42318 !important;
	border: 1px solid #fda29b !important;
	box-shadow: none !important;
}

.ui-button--danger:hover {
	background: #fecdca !important;
	border-color: #f97066 !important;
}

.ui-button--danger:active {
	background: #fecdca !important;
	color: #912018 !important;
}

.ui-button:focus-visible,
.ui-icon-button:focus-visible {
	outline: 3px solid var(--ui-focus);
	outline-offset: 2px;
}

/* Shared segmented control (tabs / period chips / filters). */
.ui-segmented {
	display: inline-flex;
	align-items: stretch;
	gap: 2px;
	padding: 3px;
	border: 0;
	border-radius: var(--ui-control-radius);
	background: #eef1f5;
	box-sizing: border-box;
	max-width: 100%;
	overflow-x: auto;
	scrollbar-width: none;
}

.ui-segmented::-webkit-scrollbar {
	display: none;
}

.ui-segmented__btn,
.ui-segmented > button,
.ui-segmented > .bt0,
.ui-segmented > .bt1,
.ui-segmented > .hrs {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 38px !important;
	padding: 0 14px !important;
	border: 0 !important;
	border-radius: var(--ui-radius-sm) !important;
	background: transparent !important;
	color: #64748b !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	letter-spacing: -.01em;
	white-space: nowrap;
	cursor: pointer;
	opacity: 1 !important;
	box-shadow: none !important;
	transition:
		color var(--ui-dur-2) ease,
		background var(--ui-dur-3) var(--ui-ease-out),
		box-shadow var(--ui-dur-2) ease,
		transform var(--ui-dur-1) var(--ui-ease-out);
}

.ui-segmented__btn:active,
.ui-segmented > button:active,
.ui-segmented > .bt0:active,
.ui-segmented > .bt1:active,
.ui-segmented > .hrs:active {
	transform: var(--ui-motion-press);
}

/* Sentinel «свой период» (hrs=0) — в DOM для JS, в UI не показывать */
.ui-segmented > button.hidden,
.ui-segmented > .bt0.hidden,
.ui-segmented > .bt1.hidden,
.ui-segmented > .hrs.hidden {
	display: none !important;
}

.ui-segmented--sm {
	border-radius: 10px;
}

.ui-segmented--sm > button,
.ui-segmented--sm > .bt0,
.ui-segmented--sm > .bt1,
.ui-segmented--sm > .hrs,
.ui-segmented--sm .ui-segmented__btn {
	min-height: 32px !important;
	padding: 0 10px !important;
	border-radius: 8px !important;
	font-size: 12px !important;
	font-weight: 500 !important;
}

.ui-segmented--lg {
	border-radius: 14px;
}

.ui-segmented--lg > button,
.ui-segmented--lg > .bt0,
.ui-segmented--lg > .bt1,
.ui-segmented--lg > .hrs,
.ui-segmented--lg .ui-segmented__btn {
	min-height: 42px !important;
	padding: 0 16px !important;
	border-radius: 12px !important;
	font-size: 14px !important;
}

.ui-segmented__btn:hover,
.ui-segmented > button:hover,
.ui-segmented > .bt0:hover,
.ui-segmented > .bt1:hover,
.ui-segmented > .hrs:hover {
	color: #334155 !important;
	background: rgba(255, 255, 255, .55) !important;
}

.ui-segmented__btn.is-active,
.ui-segmented__btn.act,
.ui-segmented > button.is-active,
.ui-segmented > button.act,
.ui-segmented > .bt0.act,
.ui-segmented > .bt1.act,
.ui-segmented > .hrs.act,
.ui-segmented > [aria-selected="true"] {
	background: #fff !important;
	color: var(--ui-primary) !important;
	box-shadow: none !important;
}

.ui-segmented--block {
	display: flex;
	width: 100%;
}

.ui-segmented--block > button,
.ui-segmented--block > .bt0,
.ui-segmented--block > .bt1,
.ui-segmented--block > .hrs,
.ui-segmented--block .ui-segmented__btn {
	flex: 1 1 0;
}

.object-section-tabs.ui-segmented,
.zone-section-tabs.ui-segmented {
	margin-top: 16px;
	padding: 3px;
	border: 0;
	background: #eef1f5;
	display: flex;
	width: max-content;
	max-width: 100%;
}

.obj-list-head__meta {
	display: flex;
	align-items: center;
	gap: var(--ui-space-3);
}

.obj-list-head__copy {
	flex: 1 1 auto;
	min-width: 0;
}

.obj-list-head__meta .object-section-tabs {
	min-width: 0;
	margin-top: 0;
}

.ui-segmented__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 5px;
	border-radius: var(--ui-radius-full);
	background: rgba(15, 23, 42, .08);
	color: inherit;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}

.ui-segmented > button.is-active .ui-segmented__badge,
.ui-segmented > button.act .ui-segmented__badge {
	background: rgba(33, 125, 255, .1);
	color: currentColor;
}

/* Header profile dropdown */
.app-topbar {
	position: relative;
	z-index: 80;
}

.app-profile {
	position: relative;
}

.app-lang__label.visually-hidden,
.app-lang__sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}
.app-lang {
	position: relative;
	display: inline-flex;
	align-items: center;
	z-index: 90;
}
.app-lang.is-open {
	z-index: 1700;
}
.app-lang__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-width: 40px;
	height: 36px;
	padding: 0 6px 0 8px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg, #f3f4f6);
	color: var(--ui-text, #152033);
	cursor: pointer;
	line-height: 1;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.app-lang__btn:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover, #eef1f5);
}
.app-lang__btn:focus-visible {
	outline: 3px solid var(--ui-focus, rgba(27,109,255,.35));
	outline-offset: 1px;
}
.app-lang.is-open .app-lang__btn {
	border-color: #217dff;
	background: #fff;
	box-shadow: none;
}
.app-lang__flag {
	font-size: 18px;
	line-height: 1;
	filter: saturate(1.05);
}
.app-lang__chevron {
	width: 12px;
	height: 12px;
	opacity: .55;
	flex: 0 0 auto;
}
.app-lang.is-open .app-lang__chevron {
	transform: rotate(180deg);
}
.app-lang__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	margin: 0;
	padding: 6px;
	list-style: none;
	min-width: 44px;
	border: 1px solid var(--ui-border, #d7e0ea);
	border-radius: 12px;
	background: var(--ui-surface, #fff);
	box-shadow: 0 12px 28px rgba(20, 32, 51, .14);
}
.app-lang__menu[hidden] {
	display: none !important;
}
.app-lang__option {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border-radius: 8px;
	cursor: pointer;
}
.app-lang__option:hover,
.app-lang__option:focus-visible {
	background: #eef4ff;
	outline: none;
}
.app-lang__option.is-active {
	background: var(--ui-primary-active);
}
.app-lang__option.is-active .app-lang__flag {
	filter: none;
}
html[data-theme="dark"] .app-lang__btn {
	background: #1b2433;
	border-color: #2c3a4e;
	color: #f4f7fb;
}
html[data-theme="dark"] .app-lang__menu {
	background: #1b2433;
	border-color: #2c3a4e;
	box-shadow: 0 12px 28px rgba(0, 0, 0, .4);
}
html[data-theme="dark"] .app-lang__option:hover,
html[data-theme="dark"] .app-lang__option:focus-visible {
	background: #243247;
}
@media (max-width: 767px) {
	.app-lang__btn { min-width: 36px; height: 34px; padding: 0 4px 0 6px; }
	.app-lang__flag { font-size: 16px; }
}

.profile-lang-select {
	display: block;
	max-width: 280px;
}
.app-profile__menu .profile-lang-select {
	max-width: none;
	width: 100%;
}
.profile-lang-select__control {
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: var(--ui-radius-md, 10px);
	background: var(--ui-control-bg, #f3f4f6);
	color: var(--ui-text, #152033);
	font-size: 14px;
	line-height: 1.3;
}
.app-profile__menu .profile-lang-select__control {
	min-height: 36px;
	font-size: 13px;
}
.profile-lang-select__control:focus {
	outline: none;
	border-color: var(--ui-primary, #1b6dff);
	box-shadow: none;
}
html[data-theme="dark"] .profile-lang-select__control {
	background: #1a2433;
	border-color: transparent;
	color: #e8eef7;
}

.app-profile.is-open {
	z-index: 1600;
}

.app-profile__trigger {
	display: inline-flex;
	align-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	border-radius: var(--ui-radius-md);
}

.app-profile__trigger:hover .app-profile__avatar,
.app-profile.is-open .app-profile__avatar {
	box-shadow: 0 0 0 3px rgba(27, 109, 255, 0.16);
}

.app-profile__trigger:focus-visible {
	outline: 3px solid var(--ui-focus);
	outline-offset: 2px;
}

.app-profile__chevron {
	width: 16px;
	height: 16px;
	color: #94a3b8;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .16s ease;
}

.app-profile.is-open .app-profile__chevron {
	transform: rotate(180deg);
}

.app-profile__avatar {
	font-size: 13px;
	font-weight: 650;
	letter-spacing: 0.02em;
	user-select: none;
}

.app-profile__avatar--lg {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 15px;
	flex: 0 0 auto;
}

.app-profile__menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 1600;
	width: min(320px, calc(100vw - 24px));
	padding: 8px;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.app-profile__menu[hidden] {
	display: none !important;
}

.app-profile__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 10px 12px;
}

.app-profile__head-text {
	min-width: 0;
	flex: 1 1 auto;
}

.app-profile__name {
	color: #0f172a;
	font-size: 15px;
	font-weight: 650;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-profile__meta {
	color: #64748b;
	font-size: 12px;
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-comp-switch {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	min-width: 0;
	flex: 0 1 auto;
}
.app-comp-switch[hidden] {
	display: none !important;
}
.app-comp-switch__label {
	font-size: 12px;
	color: var(--ui-muted);
	white-space: nowrap;
}
.app-comp-switch .app-select {
	width: auto;
	min-width: 168px;
	max-width: min(340px, 46vw);
}
.app-comp-switch .app-select__value {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: left;
}
.app-comp-switch.is-busy {
	pointer-events: none;
	opacity: .65;
}
.app-comp-switch.is-busy .app-select__trigger {
	cursor: wait;
}
@media (max-width: 767px) {
	.app-comp-switch__label { display: none; }
	.app-comp-switch { margin: 0; }
	.app-comp-switch .app-select { min-width: 124px; max-width: 42vw; }
}

.app-profile__section {
	padding: 8px;
	border-top: 1px solid #eef2f7;
}

.app-profile__section-label {
	margin: 0 2px 8px;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.app-profile__theme {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 4px;
	padding: 4px;
	border-radius: 12px;
	background: #f1f5f9;
}

.app-profile__theme-btn {
	display: grid;
	place-items: center;
	min-height: 36px;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	transition: background-color var(--ui-dur-2) ease, color var(--ui-dur-2) ease;
}

.app-profile__theme-btn svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.app-profile__theme-btn:hover {
	background: rgba(255, 255, 255, 0.72);
	color: #334155;
}

.app-profile__theme-btn.is-active {
	background: #fff;
	color: #1b6dff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.app-profile__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 40px;
	padding: 0 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #1f2937;
	font-size: 13px;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	transition:
		background-color var(--ui-dur-2) ease,
		color var(--ui-dur-2) ease,
		transform var(--ui-dur-1) var(--ui-ease-out);
}

.app-profile__item:active {
	transform: var(--ui-motion-press);
}

.app-profile__item svg {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	color: #64748b;
}

.app-profile__item:hover {
	background: #f1f5f9;
}

.app-profile__item--danger {
	color: #dc2626;
}

.app-profile__item--danger svg {
	color: #dc2626;
}

.app-profile__item--danger:hover {
	background: #fef2f2;
}

.app-profile__actions {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.app-nav-legal {
	padding: 0 .7rem .25rem;
}

.app-nav-legal__link {
	display: inline-block;
	color: #94a3b8;
	font-size: 11.5px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	transition: color var(--ui-dur-2) ease;
}

.app-nav-legal__link:hover {
	color: var(--ui-primary, #217dff);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* My profile page */
.profile-page {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 1100px;
}

.profile-page__header h1 {
	margin: 0;
	color: #0f172a;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.profile-page__header p {
	margin: 6px 0 0;
	color: #64748b;
	font-size: 14px;
	font-weight: 400;
}

.profile-page__layout {
	display: grid;
	grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.profile-page__aside {
	display: flex;
	flex-direction: column;
	gap: 12px;
	position: sticky;
	top: 12px;
}

.profile-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px;
	border: 0;
	border-radius: 16px;
	background: #fff;
}

.profile-nav__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
	transition: background .16s ease, color .16s ease;
}

.profile-nav__item:hover {
	background: #f8fafc;
}

.profile-nav__item.is-active {
	background: #eef6ff;
	color: #1d4ed8;
}

.profile-nav__icon {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	border-radius: 10px;
	background: #f1f5f9;
	color: #64748b;
}

.profile-nav__item.is-active .profile-nav__icon {
	background: #dbeafe;
	color: #1d4ed8;
}

.profile-nav__icon svg {
	width: 16px;
	height: 16px;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.profile-nav__text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.profile-nav__text strong {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
}

.profile-nav__text small {
	font-size: 12px;
	font-weight: 400;
	color: #64748b;
}

.profile-nav__item.is-active .profile-nav__text small {
	color: #3b82f6;
}

.profile-tab {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.profile-tab[hidden] {
	display: none !important;
}

.profile-card,
.profile-panel {
	border: 0;
	border-radius: 16px;
	background: #fff;
}

.profile-card {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.profile-card__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.profile-card__identity-row {
	display: flex;
	min-width: 0;
	flex: 1 1 auto;
	align-items: center;
	gap: 14px;
}

.profile-card__menu {
	flex: 0 0 auto;
	position: relative;
}

.profile-card__avatar {
	width: 56px;
	height: 56px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	flex: 0 0 auto;
	overflow: hidden;
}

.user-avatar--photo,
.profile-card__avatar.user-avatar--photo,
.app-profile__avatar.user-avatar--photo,
.profile-avatar-field__preview.user-avatar--photo {
	background: #eef2f7 !important;
}

.user-avatar--photo img,
.profile-card__avatar.user-avatar--photo img,
.app-profile__avatar.user-avatar--photo img,
.profile-avatar-field__preview.user-avatar--photo img,
#ui_init.user-avatar--photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: inherit;
	background: #eef2f7;
}

.profile-avatar-picker {
	flex: 0 0 auto;
}

.profile-avatar-picker__btn {
	position: relative;
	border: 0;
	padding: 0;
	cursor: pointer;
	overflow: hidden;
}

.profile-avatar-picker__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .42);
	color: #fff;
	opacity: 0;
	transition: opacity .15s ease;
	pointer-events: none;
}

.profile-avatar-picker__overlay svg {
	width: 18px;
	height: 18px;
	stroke-width: 1.8;
}

.profile-avatar-picker__btn:hover .profile-avatar-picker__overlay,
.profile-avatar-picker__btn:focus-visible .profile-avatar-picker__overlay {
	opacity: 1;
}

.profile-avatar-picker__btn.is-uploading,
.profile-avatar-field__preview.is-uploading {
	opacity: .65;
	pointer-events: none;
}

.profile-field--avatar,
.profile-field--span {
	grid-column: 1 / -1;
}

.profile-avatar-field {
	display: flex;
	align-items: center;
	gap: 16px;
}

.profile-avatar-field__preview {
	width: 72px;
	height: 72px;
	border: 0;
	border-radius: 999px;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 20px;
	font-weight: 600;
	flex: 0 0 auto;
	overflow: hidden;
	cursor: pointer;
}

.profile-avatar-field__body {
	min-width: 0;
}

.profile-avatar-field__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.profile-avatar-field__hint {
	margin: 8px 0 0;
	color: #9ca3af;
	font-size: 12px;
	line-height: 1.4;
}

.profile-card__identity {
	min-width: 0;
}

.profile-card__name-row,
.user-card__name-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px 8px;
	min-width: 0;
}

.profile-card__name-row h2,
.user-card__name-row h3 {
	min-width: 0;
}

@keyframes identity-flash {
	0% {
		opacity: .35;
		transform: translateY(3px);
	}
	55% {
		opacity: 1;
		transform: translateY(0);
	}
	100% {
		opacity: 1;
		transform: none;
	}
}

@keyframes identity-input-flash {
	0% {
		background-color: #eff6ff;
		box-shadow: 0 0 0 3px rgba(33, 125, 255, .18);
	}
	100% {
		background-color: transparent;
		box-shadow: 0 0 0 0 transparent;
	}
}

.is-identity-flash {
	animation: identity-flash .48s ease-out;
}

input.is-identity-flash,
textarea.is-identity-flash {
	animation: identity-input-flash .55s ease-out;
}

html[data-theme="dark"] input.is-identity-flash,
html[data-theme="dark"] textarea.is-identity-flash {
	background-color: rgba(59, 130, 246, .18);
}

.user-card__me-badge {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: var(--ui-space-1) var(--ui-space-2);
	border-radius: var(--ui-radius-full);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
	color: #1d4ed8;
	background: #dbeafe;
	border: 1px solid #bfdbfe;
	white-space: nowrap;
}

.user-card__inactive-badge {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
	color: #b91c1c;
	background: #fef2f2;
	border: 1px solid #fecaca;
	white-space: nowrap;
}

.app-modal.user-info-modal {
	flex-direction: column;
	max-height: min(80vh, calc(100vh - 32px)) !important;
	padding: 0 !important;
	overflow: hidden !important;
}

.app-modal.user-info-modal[aria-hidden="false"] {
	display: flex !important;
}

.form[aria-hidden="true"],
.form0[aria-hidden="true"] {
	display: none !important;
	pointer-events: none !important;
}

.user-info-modal__header {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px 12px;
	border-bottom: 1px solid #eef2f7;
	background: #fff;
	z-index: 2;
}

.user-info-modal__close {
	flex: 0 0 auto;
	margin: -2px -4px 0 0;
}

.user-info-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 14px 16px;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.user-info-modal__footer {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-top: 1px solid #eef2f7;
	background: #fff;
	z-index: 2;
}

.user-info-modal__footer .ui-button {
	width: 100%;
}

@media (min-width: 768px) {
	.user-info-modal__header {
		padding: 16px 20px 12px;
	}

	.user-info-modal__body {
		padding: 14px 20px;
	}

	.user-info-modal__footer {
		padding: 12px 20px;
	}
}

.user-list--readonly [data-role-min="100"] {
	display: none !important;
}

html.role-observer [data-role-min="100"] {
	display: none !important;
}

.user-card--invite {
	cursor: default;
	background: #fbfcfe;
}

.user-card__invite-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	color: #b45309;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	white-space: nowrap;
}

.user-invites-wrap {
	position: relative;
	display: inline-flex;
}

.user-invites-btn__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: #f59e0b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.user-invites-popover {
	position: fixed;
	z-index: 70;
	width: min(440px, calc(100vw - 24px));
	max-height: min(460px, 72vh);
	display: flex;
	flex-direction: column;
	padding: var(--ui-space-4);
	border: 1px solid #e5e7eb;
	border-radius: var(--ui-radius-lg);
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .10), 0 2px 8px rgba(15, 23, 42, .06);
}

.user-invites-popover[hidden] {
	display: none !important;
}

.user-invites-popover__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-3);
	margin-bottom: var(--ui-space-3);
	flex: 0 0 auto;
}

.user-invites-popover__head > div:first-child {
	min-width: 0;
}

.user-invites-popover__head h3 {
	margin: 0;
	color: #111827;
	font-size: 15px;
	font-weight: 600;
}

.user-invites-popover__head p {
	margin: 4px 0 0;
	color: #6b7280;
	font-size: 12px;
}

.user-invites-popover__tools {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 0 0 auto;
}

.user-invites-list {
	display: flex;
	flex-direction: column;
	gap: var(--ui-space-2);
	overflow: auto;
	min-height: 0;
	padding-right: 2px;
}

.user-invites-empty {
	padding: var(--ui-space-4);
	border: 0;
	border-radius: var(--ui-radius-md);
	color: #94a3b8;
	font-size: 13px;
	text-align: center;
}

.user-invites-popover .app-empty {
	min-height: 160px;
	padding: var(--ui-space-6) var(--ui-space-3);
}

.users-page {
	display: block;
}

#user_list_card.user-card-hidden,
#user_edit_card.user-card-hidden {
	display: none !important;
}

.user-form-back-mobile {
	display: none;
}

.users-page-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
}

.users-page-head__lead {
	margin: 0;
	color: #64748b;
	font-size: 14px;
	line-height: 1.4;
}

.users-page-head__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.users-page-head__tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.users-page-head__icon-btn {
	position: relative;
}

.users-page-head__icon-btn .user-invites-btn__badge {
	position: absolute;
	top: -4px;
	right: -4px;
}

.users-page-head__add svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.users-page__empty {
	grid-column: 1 / -1;
	padding: 28px 16px;
	text-align: center;
	color: #64748b;
	font-size: 14px;
	border: 0;
	border-radius: 14px;
	background: #f8fafc;
}

.users-page.is-users-loading .users-page-head__actions {
	pointer-events: none;
	opacity: .72;
}

.users-skel__bone {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 999px;
	background: #e8eef5;
	isolation: isolate;
}

.users-skel__bone::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.72) 50%, transparent 100%);
	transform: translate3d(-100%, 0, 0);
	animation: users-skel-shimmer 1.4s ease-in-out infinite;
	pointer-events: none;
}

.users-skel__bone--lead {
	width: min(260px, 70%);
	height: 14px;
	margin-top: 2px;
}

.users-skel__bone--stat {
	width: 42px;
	height: 28px;
	border-radius: 10px;
	margin-top: 2px;
}

.users-skel__bone--avatar {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	flex: 0 0 44px;
}

.users-skel__bone--name {
	width: 58%;
	height: 14px;
}

.users-skel__bone--email {
	width: 72%;
	height: 12px;
	margin-top: 8px;
}

.users-skel__bone--menu {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	margin-left: auto;
	flex: 0 0 28px;
}

.users-skel__bone--label {
	width: 72px;
	height: 10px;
	margin-bottom: 8px;
}

.users-skel__bone--badge {
	width: 96px;
	height: 22px;
	border-radius: 999px;
}

.users-skel__bone--line {
	width: 88%;
	height: 12px;
	margin-top: 6px;
}

.users-skel__bone--short {
	width: 54%;
}

.users-skel__bone--meta {
	width: 46%;
	height: 12px;
}

.user-card.user-card-skel {
	pointer-events: none;
	cursor: default;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
}

.user-card-skel__top {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.user-card-skel__id {
	min-width: 0;
	flex: 1;
	padding-top: 4px;
}

.user-card-skel__block,
.user-card-skel__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.user-card-skel__footer {
	padding-top: 12px;
	border-top: 1px solid #f1f5f9;
}

.users-page__list.is-skeleton .user-card-skel:nth-child(2) .users-skel__bone--name { width: 46%; }
.users-page__list.is-skeleton .user-card-skel:nth-child(3) .users-skel__bone--name { width: 68%; }
.users-page__list.is-skeleton .user-card-skel:nth-child(4) .users-skel__bone--email { width: 58%; }
.users-page__list.is-skeleton .user-card-skel:nth-child(5) .users-skel__bone--badge { width: 78px; }
.users-page__list.is-skeleton .user-card-skel:nth-child(even) .users-skel__bone--line { width: 76%; }
.users-page__list.is-skeleton .user-card-skel:nth-child(3n) .users-skel__bone--meta { width: 38%; }

@keyframes users-skel-shimmer {
	100% { transform: translate3d(100%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.users-skel__bone::after {
		animation: none;
	}
}

.profile-page.is-profile-loading .profile-page__main {
	opacity: .28;
	pointer-events: none;
}

/* Devices page skeleton */
.device-page.is-devices-loading .device-tools {
	pointer-events: none;
	opacity: .72;
}

.devices-skel__bone {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 999px;
	background: #e8eef5;
	isolation: isolate;
}

.devices-skel__bone::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.72) 50%, transparent 100%);
	transform: translate3d(-100%, 0, 0);
	animation: users-skel-shimmer 1.4s ease-in-out infinite;
	pointer-events: none;
}

.devices-skel__bone--stat {
	width: 42px;
	height: 28px;
	border-radius: 10px;
	margin-top: 2px;
}

.devices-skel__bone--status {
	width: 12px;
	height: 12px;
	border-radius: 999px;
}

.devices-skel__bone--xs { width: 48px; height: 12px; }
.devices-skel__bone--sm { width: 72px; height: 12px; }
.devices-skel__bone--md { width: 38%; max-width: 140px; height: 12px; }
.devices-skel__bone--lg { width: 56%; max-width: 200px; height: 12px; }
.devices-skel__bone--btn {
	width: 32px;
	height: 32px;
	border-radius: 10px;
	margin-left: auto;
}

.device-row-skel td {
	vertical-align: middle;
}

.device-list-shell.is-skeleton .device-list-shell__desktop thead {
	opacity: .55;
}

.device-card-skel {
	padding: 16px;
	border-bottom: 1px solid #f1f5f9;
}

.device-card-skel__head {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 14px;
}

.device-card-skel__body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.device-card-skel__field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.device-list-shell.is-skeleton .device-row-skel:nth-child(even) .devices-skel__bone--md { width: 52%; }
.device-list-shell.is-skeleton .device-row-skel:nth-child(3n) .devices-skel__bone--lg { width: 44%; }
.device-list-shell.is-skeleton .device-card-skel:nth-child(even) .devices-skel__bone--md { width: 68%; }

@media (prefers-reduced-motion: reduce) {
	.devices-skel__bone::after {
		animation: none;
	}
}

.user-invite-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: start;
	padding: 10px 12px;
	border: 1px solid #e8eef6;
	border-radius: 12px;
	background: #f8fafc;
}

.user-invite-row__main {
	min-width: 0;
}

.user-invite-row__actions {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 0 0 auto;
}

.user-invite-row.is-pending {
	background: #fffbeb;
	border-color: #fde68a;
}

.user-invite-row.is-accepted {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

.user-invite-row.is-declined,
.user-invite-row.is-cancelled {
	background: #f8fafc;
	border-color: #e2e8f0;
}

.user-exclusion-row.is-excluded {
	background: #fef2f2;
	border-color: #fecaca;
}

.user-exclusion-row.is-restored {
	background: #f8fafc;
	border-color: #e2e8f0;
	opacity: 0.85;
}

.user-invite-status.is-excluded {
	color: #b91c1c;
	background: #fee2e2;
	border-color: #fecaca;
}

.user-invite-status.is-restored {
	color: #64748b;
	background: #f1f5f9;
	border-color: #e2e8f0;
}

.user-exclusions-btn__badge {
	background: #ef4444;
}

.user-invite-row__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
	color: #0f172a;
	font-size: 14px;
	min-width: 0;
}

.user-invite-row__title strong {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.user-invite-row__login {
	color: #64748b;
	font-size: 13px;
	white-space: nowrap;
}

.user-invite-row__meta {
	margin-top: 4px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.4;
}

.user-invite-status {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

.user-invite-status.is-pending {
	color: #b45309;
	background: #ffedd5;
}

.user-invite-status.is-accepted {
	color: #15803d;
	background: #dcfce7;
}

.user-invite-status.is-declined {
	color: #b91c1c;
	background: #fee2e2;
}

.user-invite-status.is-cancelled {
	color: #475569;
	background: #e2e8f0;
}

.user-invite-row.user-invite-skel {
	pointer-events: none;
	background: #f8fafc;
	border-color: #e8eef6;
}

.user-invite-skel__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 8px;
}

.user-invite-skel__bone {
	display: block;
	border-radius: 999px;
	background: linear-gradient(90deg, #e8eef5 0%, #f8fafc 45%, #e8eef5 90%);
	background-size: 220% 100%;
	animation: user-invite-skel-shimmer 1.4s ease-in-out infinite;
}

.user-invite-skel__name {
	width: 96px;
	height: 14px;
}

.user-invite-skel__login {
	width: 72px;
	height: 12px;
}

.user-invite-skel__badge {
	width: 68px;
	height: 18px;
}

.user-invite-skel__meta {
	width: 78%;
	height: 10px;
	margin-top: 8px;
}

.user-invite-skel__icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
}

.user-invite-row.user-invite-skel:nth-child(2) .user-invite-skel__name { width: 118px; }
.user-invite-row.user-invite-skel:nth-child(3) .user-invite-skel__name { width: 82px; }
.user-invite-row.user-invite-skel:nth-child(4) .user-invite-skel__name { width: 104px; }
.user-invite-row.user-invite-skel:nth-child(even) .user-invite-skel__meta { width: 62%; }
.user-invite-row.user-invite-skel:nth-child(3n) .user-invite-skel__login { width: 54px; }

@keyframes user-invite-skel-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
	.user-invite-skel__bone {
		animation: none;
		background: #eef2f6;
	}
}

@media (max-width: 720px) {
	.user-invite-row {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: start;
	}

	.user-invite-row__actions .ui-button {
		width: auto;
		justify-content: center;
	}
}

.invite-inbox {
	max-width: 480px;
}

.invite-inbox__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 4px 0 8px;
	max-height: 50vh;
	overflow: auto;
}

.invite-inbox__item {
	padding: 14px;
	border: 1px solid #e8eef6;
	border-radius: 12px;
	background: #f8fafc;
}

.invite-inbox__copy {
	font-size: 14px;
	line-height: 1.45;
	color: #334155;
}

.invite-inbox__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
}

.profile-card__identity h2 {
	margin: 0;
	color: #0f172a;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-card__identity p,
.profile-card__login {
	margin: 2px 0 0;
	color: #64748b;
	font-size: 13px;
	font-weight: 400;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-card__label {
	margin-bottom: 8px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 500;
}

.profile-card__objs {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-card__obj {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #334155;
	font-size: 13px;
	font-weight: 400;
}

.profile-card__obj svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	color: #94a3b8;
	stroke-width: 1.8;
}

.profile-card__empty {
	color: #94a3b8;
	font-size: 13px;
	font-weight: 400;
}

.profile-card__foot {
	padding-top: 14px;
	border-top: 1px solid #eef2f7;
}

.profile-page__main {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.profile-panel {
	padding: 20px;
}

.profile-panel__head {
	margin-bottom: 16px;
}

.profile-panel__head--row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.profile-panel__head h3 {
	margin: 0;
	color: #0f172a;
	font-size: 15px;
	font-weight: 500;
}

.profile-panel__head p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	font-weight: 400;
}

.profile-meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 14px;
	margin: 0 0 18px;
	padding: 14px 16px;
	border: 0;
	border-radius: 12px;
	background: #f8fafc;
}

.profile-meta__item {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.profile-meta__item span {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.profile-meta__item strong {
	color: #0f172a;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
}

.profile-verify-status {
	display: inline-flex;
	width: fit-content;
	max-width: 100%;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 650;
	line-height: 1.4;
}
.profile-verify-status[data-state="none"] {
	background: #f1f5f9;
	color: #64748b;
}
.profile-verify-status[data-state="pending"] {
	background: #fff7ed;
	color: #c2410c;
}
.profile-verify-status[data-state="verified"] {
	background: #ecfdf3;
	color: #15803d;
}
.profile-verify-status[data-state="rejected"] {
	background: #fef2f2;
	color: #dc2626;
}

.profile-company__note {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #fecaca;
	border-radius: 12px;
	background: #fef2f2;
}
.profile-company__note span {
	display: block;
	margin-bottom: 4px;
	color: #b91c1c;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.profile-company__note strong {
	display: block;
	color: #7f1d1d;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
}

.profile-company__appeal {
	margin: 0 0 16px;
	padding: 14px;
	border: 1px solid #fde68a;
	border-radius: 12px;
	background: #fffbeb;
	display: grid;
	gap: 12px;
}
.profile-company__appeal-title {
	display: block;
	color: #92400e;
	font-size: 14px;
	font-weight: 700;
}
.profile-company__appeal .profile-field textarea.entity-editor-control,
.profile-company__reply {
	height: auto;
	min-height: 104px;
	padding: 11px 13px;
	line-height: 1.45;
	resize: vertical;
	overflow-y: auto;
}

.profile-file-picker {
	position: relative;
}

.profile-file-picker__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0;
}

.profile-file-picker__trigger {
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 6px 8px 6px 6px;
	border: 1px solid #cfd8e4;
	border-radius: 11px;
	background: #fff;
	cursor: pointer;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.profile-file-picker__trigger:hover {
	border-color: #aeb8c6;
}

.profile-file-picker__input:focus-visible + .profile-file-picker__trigger,
.profile-file-picker__trigger:focus-within {
	border-color: var(--ui-primary);
	box-shadow: none;
}

.profile-file-picker__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 0 12px;
	border-radius: 8px;
	background: #eef2f7;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.profile-file-picker__name {
	flex: 1 1 auto;
	min-width: 0;
	color: #64748b;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.profile-sessions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-sessions__empty {
	padding: 16px;
	border: 0;
	border-radius: 12px;
	color: #94a3b8;
	font-size: 13px;
	text-align: center;
}

.profile-session {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 12px 14px;
	border: 1px solid #e8eef6;
	border-radius: 12px;
	background: #fff;
}

.profile-session.is-current {
	border-color: #cfe0ff;
	background: #f7faff;
}

.profile-session__icon {
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: #eef4fb;
	color: #64748b;
}

.profile-session__icon svg {
	width: 18px;
	height: 18px;
	stroke-width: 1.8;
}

.profile-session__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	color: #0f172a;
	font-size: 14px;
	font-weight: 500;
}

.profile-session__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e8f1ff;
	color: #1769df;
	font-size: 11px;
	font-weight: 600;
}

.profile-session__meta {
	margin-top: 3px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.4;
}

.profile-session__actions .ui-button {
	white-space: nowrap;
}

.profile-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.profile-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.profile-field > span {
	color: #64748b;
	font-size: 13px;
	font-weight: 400;
}

.profile-password-wrap {
	position: relative;
	display: block;
}

.profile-password-wrap .entity-editor-control {
	padding-right: 44px;
}

.profile-password-wrap .user-password-toggle {
	right: 6px;
}

.profile-password-cta__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.profile-password-cta__row .profile-password-hint {
	margin-top: 0;
	min-height: 0;
}

.profile-password-modal {
	display: grid;
	gap: 14px;
}

.profile-password-modal__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.profile-password-hint {
	display: block;
	min-height: 16px;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.35;
	color: #94a3b8;
}

.profile-password-hint.is-error {
	color: #dc2626;
}

.profile-password-hint.is-ok {
	color: #16a34a;
}

.profile-field .entity-editor-control.is-invalid {
	border-color: #f5a8a8;
	box-shadow: none;
}

.profile-field .entity-editor-control.is-valid {
	border-color: #86efac;
	box-shadow: none;
}

.profile-field .entity-editor-control,
.profile-page .entity-editor-control {
	font-weight: 400;
}

.profile-field .entity-editor-control::placeholder,
.profile-page .entity-editor-control::placeholder {
	font-weight: 400;
}

.profile-field input:disabled {
	opacity: 0.72;
	cursor: not-allowed;
	background: #f8fafc;
}

.profile-2fa-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
	border: 1px solid #e5e7eb;
	background: #f8fafc;
	color: #64748b;
	line-height: 1.2;
}

.profile-2fa-badge[data-state="on"] {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #047857;
}

.profile-2fa-badge[data-state="pending"] {
	background: #fff7ed;
	border-color: #fed7aa;
	color: #c2410c;
}

.profile-2fa {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.profile-2fa__card {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 14px;
	align-items: center;
	padding: 14px 16px;
	border: 1px solid #e8eef6;
	border-radius: 14px;
	background: #fff;
}

.profile-2fa[data-state="on"] .profile-2fa__card {
	border-color: #b7e4cf;
	background: linear-gradient(180deg, #f4fdf8 0%, #ffffff 100%);
}

.profile-2fa[data-state="pending"] .profile-2fa__card {
	border-color: #cfe0ff;
	background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.profile-2fa[data-state="noemail"] .profile-2fa__card {
	border-style: dashed;
	background: #fbfcfe;
}

.profile-2fa__icon {
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: #eef4fb;
	color: #64748b;
	flex-shrink: 0;
}

.profile-2fa[data-state="on"] .profile-2fa__icon {
	background: #dcfce7;
	color: #059669;
}

.profile-2fa[data-state="pending"] .profile-2fa__icon {
	background: #e8f1ff;
	color: #1769df;
}

.profile-2fa__icon svg {
	width: 22px;
	height: 22px;
}

.profile-2fa__main {
	min-width: 0;
}

.profile-2fa__title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.profile-2fa__title {
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.profile-2fa__status {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: #64748b;
}

.profile-2fa__mail {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	margin: 8px 0 0;
	font-size: 12px;
	line-height: 1.4;
}

.profile-2fa__mail-label {
	color: #94a3b8;
}

.profile-2fa__mail strong {
	color: #1769df;
	font-weight: 600;
	word-break: break-all;
}

.profile-2fa__side {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}

.profile-2fa__side .ui-button {
	white-space: nowrap;
	min-width: 118px;
}

.profile-2fa__verify {
	padding: 14px 16px;
	border: 1px solid #d9e6fb;
	border-radius: 14px;
	background: #f7faff;
}

.profile-2fa__verify-head {
	margin-bottom: 12px;
}

.profile-2fa__verify-head strong {
	display: block;
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.profile-2fa__verify-head p {
	margin: 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.profile-2fa__verify-row {
	display: grid;
	grid-template-columns: minmax(120px, 180px) auto auto;
	gap: 10px;
	align-items: center;
}

.profile-2fa__code-input {
	text-align: center;
	letter-spacing: .28em;
	font-family: Consolas, "Courier New", monospace;
	font-size: 18px;
	font-weight: 700;
	padding-left: 12px;
	padding-right: 8px;
}

@media (max-width: 720px) {
	.profile-2fa__card {
		grid-template-columns: auto 1fr;
	}

	.profile-2fa__side {
		grid-column: 1 / -1;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.profile-2fa__side .ui-button {
		flex: 1 1 auto;
		min-width: 0;
	}

	.profile-2fa__verify-row {
		grid-template-columns: 1fr;
	}
}

.profile-panel__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #eef2f7;
}

.profile-company__meta {
	margin-bottom: 14px;
}

.profile-company__details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 16px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 0;
	border-radius: 12px;
	background: #f8fafc;
}

.profile-company__detail {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.profile-company__detail--wide {
	grid-column: 1 / -1;
}

.profile-company__detail span {
	font-size: 12px;
	color: #64748b;
}

.profile-company__detail strong {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	word-break: break-word;
}

.profile-company__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.profile-company__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.profile-company__rename .profile-company__actions {
	/* Между полем (label.profile-field) и кнопкой нужен нормальный вертикальный отступ. */
	margin-top: 10px;
}

.profile-company__danger {
	margin-top: 14px;
	padding: 12px 14px;
	border: 1px solid #fecaca;
	background: #fff5f5;
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-company__danger-title {
	font-size: 13px;
	font-weight: 700;
	color: #b42318;
}

.profile-company__owner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
	padding: 12px 14px;
	border: 1px solid #e8eef5;
	border-radius: 12px;
	background: #f8fafc;
}

.profile-company__owner > span {
	font-size: 12px;
	color: #64748b;
	flex-shrink: 0;
	padding-top: 2px;
}

.profile-company__owner-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
}

.profile-company__owner strong {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.profile-company__owner small {
	font-size: 12px;
	color: #64748b;
	word-break: break-word;
}

#profile_company_readonly {
	display: block;
	margin-top: 10px;
}

#profile_company_member_actions {
	margin-top: 10px;
}

.profile-company-skel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.profile-company-skel[hidden] {
	display: none !important;
}

.profile-company-skel__card {
	border: 1px solid #e8eef5;
	border-radius: 12px;
	background: #f8fafc;
	padding: 12px 14px;
}

.profile-company-skel__card--meta {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 16px;
}

.profile-company-skel__card--owner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.profile-company-skel__card--details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
}

.profile-company-skel__cell {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.profile-company-skel__cell--wide {
	grid-column: 1 / -1;
}

.profile-company-skel__owner-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	min-width: 0;
}

.profile-company-skel__footer {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-top: 2px;
}

.profile-company-skel__bone {
	display: block;
	border-radius: 999px;
	background: linear-gradient(90deg, #e8eef5 0%, #f8fafc 45%, #e8eef5 90%);
	background-size: 220% 100%;
	animation: profile-company-skel-shimmer 1.4s ease-in-out infinite;
}

.profile-company-skel__bone--label {
	width: 72px;
	height: 10px;
}

.profile-company-skel__bone--value {
	width: 110px;
	height: 14px;
}

.profile-company-skel__bone--wide {
	width: 150px;
}

.profile-company-skel__bone--xl {
	width: 92%;
	max-width: 420px;
	height: 14px;
}

.profile-company-skel__bone--badge {
	width: 96px;
	height: 18px;
}

.profile-company-skel__bone--meta {
	width: 180px;
	height: 11px;
}

.profile-company-skel__bone--hint {
	width: 240px;
	height: 11px;
}

.profile-company-skel__bone--btn {
	width: 156px;
	height: 36px;
	border-radius: 10px;
}

@keyframes profile-company-skel-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

.profile-companies-list {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.profile-companies-list__empty {
	padding: 14px 0;
	color: #64748b;
	font-size: 14px;
}

.profile-companies-list__group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-companies-list__heading {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #64748b;
}

.profile-companies-list__items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-companies-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e5eaf0;
	border-radius: 12px;
	background: #fff;
	text-align: left;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.profile-companies-list__item:hover {
	background: #f8fafc;
	border-color: #d7dce3;
}

.profile-companies-list__item.is-active {
	background: #fff;
	border-color: #93c5fd;
}

.profile-companies-list__item-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.profile-companies-list__item-title {
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
}

.profile-companies-list__item-meta {
	font-size: 12px;
	color: #64748b;
}

.profile-companies-list__item-side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	flex-shrink: 0;
}

.profile-companies-list__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	background: #e8f1ff;
	color: #1769df;
	font-size: 11px;
	font-weight: 600;
}

.profile-companies-list__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	flex-shrink: 0;
}

#profile_group_create_form .profile-group-create,
#profile_company_create_form .profile-company__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

#profile_company_panel .profile-panel__head--row {
	align-items: flex-start;
	gap: 12px;
}

#profile_company_activate_btn {
	flex: 0 0 auto;
	align-self: flex-start;
	white-space: nowrap;
}

#profile_company_back_btn {
	margin-bottom: 10px;
}

.profile-group-create {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.profile-group-create__card {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 14px;
	align-items: center;
	padding: 14px 16px;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
}

.profile-group-create__icon {
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: #e8f1ff;
	color: #1769df;
	flex-shrink: 0;
}

.profile-group-create__icon svg {
	width: 22px;
	height: 22px;
}

.profile-group-create__body {
	min-width: 0;
}

.profile-group-create__title {
	display: block;
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.profile-group-create__lead {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.profile-group-create__form {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-group-create__form .profile-field {
	margin: 0;
}

/* ---------------- Billing (тарифы) ---------------- */

.billing-current {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid #dbeafe;
	border-radius: 12px;
	background: #f8fbff;
	margin-bottom: 16px;
}

.billing-current__plan-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.billing-current__plan {
	font-size: 18px;
}

.billing-status {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #e2e8f0;
	color: #334155;
}

.billing-status[data-status="active"] {
	background: #dcfce7;
	color: #166534;
}

.billing-status[data-status="grace"] {
	background: #fef9c3;
	color: #854d0e;
}

.billing-status[data-status="expired"],
.billing-status[data-status="none"] {
	background: #fee2e2;
	color: #b91c1c;
}

.billing-current__meta {
	margin-top: 6px;
	font-size: 13px;
	color: #64748b;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.billing-warning {
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fffbeb;
	border: 1px solid #fde68a;
	color: #92400e;
	font-size: 13px;
	line-height: 1.45;
}

.billing-usage {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.billing-usage__item {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 12px;
}

.billing-usage__head {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	margin-bottom: 8px;
}

.billing-usage__head span {
	color: #64748b;
}

.billing-usage__bar {
	height: 6px;
	border-radius: 999px;
	background: #e2e8f0;
	overflow: hidden;
}

.billing-usage__bar i {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: #1b6dff;
	transition: width .3s ease;
}

.billing-usage__bar i.is-warn {
	background: #f59e0b;
}

.billing-usage__bar i.is-full {
	background: #dc2626;
}

.billing-period-toggle {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border-radius: 10px;
	background: #f1f5f9;
	margin-bottom: 14px;
}

.billing-period-toggle__btn {
	border: 0;
	background: transparent;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	color: #475569;
}

.billing-period-toggle__btn em {
	font-style: normal;
	font-size: 11px;
	color: #16a34a;
	margin-left: 4px;
}

.billing-period-toggle__btn.is-active {
	background: #fff;
	color: #0f172a;
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

.billing-plans {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}

.billing-plan {
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: #fff;
}

.billing-plan.is-current {
	border-color: #1b6dff;
	box-shadow: 0 0 0 1px #1b6dff inset;
}

.billing-plan__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 15px;
}

.billing-plan__current {
	font-size: 11px;
	font-weight: 600;
	color: #1b6dff;
	background: #eff6ff;
	border-radius: 999px;
	padding: 2px 8px;
}

.billing-plan__price {
	font-size: 20px;
	font-weight: 700;
}

.billing-plan__price small {
	font-size: 12px;
	font-weight: 400;
	color: #64748b;
	margin-left: 4px;
}

.billing-plan__limits {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: #334155;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.billing-plan__descr {
	font-size: 12px;
	color: #64748b;
}

.billing-plan__btn {
	margin-top: auto;
}

.billing-hint {
	margin-top: 12px;
	font-size: 13px;
	color: #64748b;
}

.billing-invoices__empty {
	color: #64748b;
	font-size: 13px;
	padding: 8px 0;
}

.billing-invoices__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.billing-invoices__table th,
.billing-invoices__table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #e2e8f0;
}

.billing-invoices__table th {
	color: #64748b;
	font-weight: 600;
	font-size: 12px;
}

.billing-invoices__table a {
	color: #1b6dff;
	text-decoration: none;
	font-weight: 600;
}

.billing-invoices__table a:hover {
	text-decoration: underline;
}

@media (max-width: 767px) {
	.billing-usage {
		grid-template-columns: 1fr;
	}
}

/* ---------------- /Billing ---------------- */

.profile-company__preview {
	padding: 12px 14px;
	border: 1px solid #dbeafe;
	border-radius: 12px;
	background: #f8fbff;
}

.profile-company__preview-title {
	display: block;
	margin-bottom: 10px;
	font-size: 14px;
}

.profile-company__preview-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 16px;
	margin-bottom: 10px;
}

.profile-company__preview-grid > div {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.profile-company__preview-grid span {
	font-size: 12px;
	color: #64748b;
}

.profile-company__preview-grid strong {
	font-size: 14px;
	word-break: break-word;
}

.profile-links {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.profile-link {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #e5eaf0;
	border-radius: 12px;
	background: #fff;
	color: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .14s ease, border-color .14s ease;
	box-sizing: border-box;
	box-shadow: none;
}

.profile-link:hover {
	background: #f8fafc;
	border-color: #d7dce3;
}

.profile-link__icon {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	border-radius: 10px;
	background: #f8fafc;
	border: 0;
	box-shadow: none;
	color: #64748b;
	flex: 0 0 auto;
}

.profile-link__icon svg {
	width: 17px;
	height: 17px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.profile-link__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.profile-link__text strong {
	color: #0f172a;
	font-size: 14px;
	font-weight: 500;
}

.profile-link__text small {
	color: #64748b;
	font-size: 12px;
	font-weight: 400;
}

.profile-page .service-theme-option__copy strong {
	font-weight: 500;
}

.profile-page .service-theme-option__copy small {
	font-weight: 400;
}

@media (max-width: 900px) {
	.profile-page__layout {
		grid-template-columns: 1fr;
	}

	.profile-page__aside {
		position: static;
	}

	.profile-nav {
		flex-direction: row;
		overflow-x: auto;
		gap: 6px;
		padding: 8px;
		-webkit-overflow-scrolling: touch;
	}

	.profile-nav__item {
		flex: 0 0 auto;
		width: auto;
		padding: 8px 12px;
	}

	.profile-nav__text small {
		display: none;
	}

	.profile-form,
	.profile-meta {
		grid-template-columns: 1fr;
	}

	.profile-company__details,
	.profile-company__preview-grid {
		grid-template-columns: 1fr;
	}

	.profile-panel__head--row {
		flex-direction: column;
		align-items: stretch;
	}

	.profile-session {
		grid-template-columns: auto 1fr;
	}

	.profile-session__actions {
		grid-column: 1 / -1;
	}

	.profile-session__actions .ui-button {
		width: 100%;
		justify-content: center;
	}
}

.ui-button:active:not(:disabled) {
	transform: var(--ui-motion-press);
}

.ui-button:disabled,
.ui-button[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: .5;
}

.ui-button--block {
	width: 100%;
}

.ui-icon-button {
	display: grid;
	box-sizing: border-box;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: var(--ui-radius-sm);
	background: transparent;
	color: var(--ui-muted);
	cursor: pointer;
	box-shadow: none !important;
	transition:
		background-color var(--ui-dur-2) ease,
		color var(--ui-dur-2) ease,
		transform var(--ui-dur-1) var(--ui-ease-out);
}

/* Shared surface recipe: cards/panels use one radius + inset. */
.ui-surface,
.report-card,
.monitoring-card,
.dashboard-summary-card,
.log-card,
.support-card,
.user-card,
.user-stat-card,
.device-stat-card {
	box-sizing: border-box;
	padding: var(--ui-inset-card);
	border-radius: var(--ui-radius-card);
	background: #fff;
	border: 0;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transition: box-shadow var(--ui-dur-3) var(--ui-ease-out);
}

a.ui-surface:hover,
a.report-card:hover,
a.monitoring-card:hover,
a.dashboard-summary-card:hover,
a.log-card:hover,
a.support-card:hover,
a.user-card:hover,
a.device-stat-card:hover,
.ui-surface.is-interactive:hover,
.report-card.is-interactive:hover,
.user-card.is-interactive:hover,
.device-stat-card.is-interactive:hover,
.user-card:hover,
.device-stat-card:hover,
.monitoring-card:hover {
	border-color: #d0d7e2;
	box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
	transform: none;
}

.device-stat-card:hover,
a.device-stat-card:hover,
.device-stat-card.is-interactive:hover {
	border-color: transparent;
}

.dashboard-summary-card {
	cursor: default;
	transform: none;
}

.dashboard-summary-card:hover {
	border-color: #e5e7eb;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transform: none;
}

/* Report cards stay visually separated by spacing and shadow, without an outline. */
#pan_rep .report-card {
	border: 0;
}

/* Top-level tabs use only the active indicator, without a full-width divider. */
.app-tabs:not(.ui-segmented) {
	border-bottom: 0;
}

.app-tab {
	margin-bottom: 0;
	border-bottom-width: 3px;
}

/* Compact section navigation with a calm selected surface. */
.app-tabs.ui-segmented.app-view-tabs {
	display: flex;
	width: max-content;
	max-width: 100%;
	padding: 3px;
	border: 0;
	border-radius: 12px;
	background: #eef1f5;
	box-shadow: none;
}

.app-view-tabs.ui-segmented > .app-view-tab {
	min-height: 38px;
	gap: var(--ui-space-2);
	padding: 0 14px !important;
	border-radius: 10px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
}

.app-view-tabs .app-view-tab svg {
	display: block;
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
}

.app-view-tabs.ui-segmented > .app-view-tab[aria-selected="true"] {
	background: #fff !important;
	color: var(--ui-primary) !important;
	box-shadow: none !important;
}

.app-view-tabs.ui-segmented > .app-view-tab[aria-selected="true"] svg {
	stroke-width: 2;
}

.app-view-tabs.ui-segmented > .app-view-tab:focus-visible {
	outline: 2px solid var(--ui-primary);
	outline-offset: -2px;
}

html[data-theme="dark"] .app-view-tabs.ui-segmented > .app-view-tab[aria-selected="true"] {
	background: #263246 !important;
	color: #69a7fa !important;
	box-shadow: none !important;
}

html[data-theme="dark"] .app-tabs.ui-segmented.app-view-tabs {
	border: 0 !important;
	background: #1a2433 !important;
}

.app-view-tabs > .app-view-tab.is-hidden {
	display: none !important;
}

.reports-tabs.app-view-tabs {
	margin: 0 0 var(--ui-space-3);
	max-width: 100%;
}

@media (max-width: 520px) {
	.dash-mode-tabs.app-view-tabs > .app-view-tab {
		min-height: 36px;
		gap: 6px;
		padding: 0 8px !important;
		font-size: 12px !important;
	}

	.reports-tabs.app-view-tabs {
		width: 100%;
		max-width: none;
		margin: 0 0 12px;
		overflow-x: auto;
		padding: 0 !important;
		background: transparent !important;
		border-radius: 0 !important;
		gap: var(--ui-space-1);
	}

	.reports-tabs.app-view-tabs > .app-view-tab {
		min-width: max-content;
		min-height: 34px !important;
		flex: 0 0 auto;
		gap: 6px;
		padding: 0 10px !important;
		font-size: 13px !important;
		background: transparent !important;
		color: #64748b !important;
	}

	.reports-tabs.app-view-tabs > .app-view-tab[aria-selected="true"] {
		background: #eef4ff !important;
		color: var(--ui-primary) !important;
	}

	.reports-tabs .app-view-tab svg {
		display: block;
		width: 15px;
		height: 15px;
	}
}

@media (max-width: 380px) {
	.reports-tabs.app-view-tabs > .app-view-tab {
		gap: 4px;
		padding: 0 10px !important;
		font-size: 12px !important;
	}
}

/* Settings shells: flat Notion/Stripe surface — no outer card chrome. */
.object-settings-card,
.zone-settings-card {
	box-sizing: border-box;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

/* ===== Settings panel (bento tiles, channel-style surfaces) ===== */
.settings-panel {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	align-self: stretch;
	width: 100%;
	max-width: none;
	min-height: 0;
	margin: 0;
	padding: 0 0 8px;
	border: 0;
	background: transparent;
}

.settings-panel__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: var(--ui-space-3) var(--ui-space-4);
	margin: 0 0 var(--ui-space-4);
	padding: 0;
	border: 0;
	background: transparent;
	min-height: 0;
	flex: 0 0 auto;
}

.settings-panel__titles {
	min-width: 0;
	flex: 1 1 220px;
}

.settings-panel__titles h3 {
	margin: 0;
	color: #0f172a;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.settings-panel__titles p {
	margin: 6px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
	max-width: 42rem;
}

.settings-panel__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ui-space-2);
	margin-left: auto;
}

.settings-panel__head > .ui-button {
	flex: 0 0 auto;
	margin-left: auto;
}

.settings-panel__stack {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	max-width: none;
	align-items: start;
}

.settings-panel__stack--wide {
	max-width: none;
}

.settings-block {
	box-sizing: border-box;
	min-width: 0;
	padding: 18px 18px 16px;
	border: 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: none;
}

.settings-block + .settings-block {
	border-top: 0;
}

.settings-block__head {
	margin: 0 0 var(--ui-space-4);
}

.settings-block__head h4 {
	margin: 0;
	color: #0f172a;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.settings-block__head p {
	margin: 6px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
	max-width: 40rem;
}

.settings-fields {
	display: grid;
	gap: var(--ui-space-4);
}

.settings-fields--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ui-space-4) var(--ui-space-5);
}

.settings-fields--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-fields--compact {
	margin-top: var(--ui-space-4);
}

@media (min-width: 900px) {
	.settings-panel__stack {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	/* Уведомления: пороги слева, Основное+Отправка справа столбиком */
	.settings-panel__stack--wide {
		grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.9fr);
		grid-template-areas:
			"thresholds main"
			"thresholds delivery";
		align-items: start;
	}

	.settings-panel__stack--wide .settings-block--thresholds {
		grid-area: thresholds;
		align-self: stretch;
	}

	.settings-panel__stack--wide .settings-block--main {
		grid-area: main;
	}

	.settings-panel__stack--wide .settings-block--delivery {
		grid-area: delivery;
	}
}

.settings-field label {
	display: block;
	margin: 0 0 6px;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
}

.settings-field input,
.settings-field textarea,
.settings-field select,
.settings-field .entity-editor-control,
.settings-field .entity-form-select,
.settings-field .notif-native-select {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	padding: 9px 12px;
	border: 1px solid transparent;
	border-radius: var(--ui-radius-md);
	background: var(--ui-control-bg);
	color: #0f172a;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.settings-field textarea {
	min-height: 88px;
	resize: vertical;
}

.settings-field input:hover,
.settings-field textarea:hover,
.settings-field select:hover,
.settings-field .entity-editor-control:hover,
.settings-field .entity-form-select:hover,
.settings-field .notif-native-select:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover);
}

.settings-field input:focus,
.settings-field textarea:focus,
.settings-field select:focus,
.settings-field .entity-editor-control:focus,
.settings-field .entity-form-select:focus {
	border-color: var(--ui-control-border-focus);
	background: #fff;
	outline: none;
	box-shadow: none;
}

.settings-field input:disabled,
.settings-field textarea:disabled,
.settings-field select:disabled,
.settings-field .entity-editor-control:disabled,
.settings-field .entity-form-select:disabled,
.settings-field .notif-native-select:disabled {
	opacity: 1;
	border-color: transparent;
	background: var(--ui-control-bg-disabled);
	color: #334155;
	-webkit-text-fill-color: #334155;
	cursor: default;
}

.settings-field__hint {
	display: block;
	margin-top: 6px;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1.4;
}

.settings-field__inline {
	display: flex;
	align-items: center;
	gap: 8px;
}

.settings-field__inline input {
	flex: 1 1 auto;
	max-width: 140px;
}

.settings-field__inline span {
	color: #64748b;
	font-size: 13px;
}

/* В плитках настроек числовые поля тянутся на ширину карточки */
.settings-panel .settings-field__inline {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
	align-items: center;
}

.settings-panel .settings-field__inline input {
	max-width: none;
	width: 100%;
}

.settings-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-4);
	margin-top: var(--ui-space-4);
	padding: var(--ui-space-4) 0 0;
	border: 0;
	border-top: 1px solid #f1f5f9;
	background: transparent;
	cursor: pointer;
}

.settings-block > .settings-toggle:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.settings-toggle__copy {
	min-width: 0;
}

.settings-toggle__copy strong,
.settings-toggle__copy small {
	display: block;
}

.settings-toggle__copy strong {
	color: #0f172a;
	font-size: 14px;
	font-weight: 600;
}

.settings-toggle__copy small {
	margin-top: 3px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.4;
}

.settings-toggle__check {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.settings-panel:not(.is-editing) .settings-toggle {
	cursor: default;
}

.settings-access-list.entity-access-list {
	display: flex;
	flex-direction: column;
	max-height: none;
	gap: 0;
	padding: 0;
	overflow: visible;
}

.settings-access-list .entity-access-option {
	grid-template-columns: 20px minmax(0, 1fr);
	min-height: 48px;
	margin: 0;
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid #f1f5f9;
	border-radius: 0;
	background: transparent;
}

.settings-access-list .entity-access-option:hover {
	background: transparent;
}

.settings-access-list .entity-access-list__empty {
	padding: 12px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	text-align: left;
}

/* Parameters as plain list rows */
.settings-panel .zone-parameter-list {
	gap: 0;
	max-width: none;
}

.settings-panel .zone-parameter-row {
	grid-template-columns: 28px minmax(0, 1fr) auto;
	min-height: 52px;
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid #f1f5f9;
	border-radius: 0;
	background: transparent;
}

.settings-panel .zone-parameter-icon {
	width: 28px;
	height: 28px;
	background: #f1f5f9;
	color: #64748b;
}

.settings-panel .zone-parameter-action {
	border-color: #e2e8f0;
	background: #fff;
}

/* Notification threshold table — колонки порогов читаемые */
.settings-panel .notification-rules-columns,
.settings-panel .notification-rule-row {
	grid-template-columns: minmax(0, 1.1fr) minmax(168px, 200px) minmax(168px, 200px);
	column-gap: 16px;
	justify-content: stretch;
}

/* Логические: тип+полярность шире, «тревога при» — только переход состояний */
.settings-panel .notification-rules-columns.is-logical-only,
.settings-panel .notification-rule-row--logical {
	grid-template-columns: minmax(140px, 1fr) minmax(220px, 280px) minmax(150px, 200px);
	align-items: start;
}

.settings-panel .notification-rules-columns {
	padding: 0 0 8px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 600;
}

.settings-panel .notification-rules-list {
	border-top: 1px solid #e8edf3;
	border-bottom: 0;
}

.settings-panel .notification-rule-row {
	min-height: 56px;
	padding: 12px 0;
	border: 0;
}

.settings-panel .notification-rule-row + .notification-rule-row {
	border-top: 1px solid #f1f5f9;
}

.settings-panel .notification-rule-parameter .sensor-setting-icon {
	width: 28px;
	height: 28px;
	flex-basis: 28px;
}

.settings-panel .notification-rule-field input,
.settings-panel .notification-rule-field .app-select,
.settings-panel .notification-rule-field .app-select__trigger {
	width: 100%;
	max-width: none;
}

@media (max-width: 899px) {
	.settings-panel__stack,
	.settings-panel__stack--wide {
		grid-template-columns: 1fr;
		grid-template-areas: none;
		gap: 12px;
	}

	.settings-panel__stack--wide .settings-block--thresholds,
	.settings-panel__stack--wide .settings-block--main,
	.settings-panel__stack--wide .settings-block--delivery {
		grid-area: auto;
	}
}

@media (max-width: 760px) {
	.settings-panel {
		max-width: none;
		padding-bottom: 4px;
		flex: 0 0 auto;
		min-height: 0;
	}

	.zone-page > .settings-panel,
	.object-page > .settings-panel {
		flex: 0 0 auto !important;
		min-height: 0 !important;
		height: auto !important;
	}

	.settings-block {
		padding: 14px 14px 12px;
		border-radius: 14px;
	}

	.settings-fields--2,
	.settings-fields--3 {
		grid-template-columns: 1fr;
	}

	.settings-panel__head {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		justify-content: flex-start;
		gap: 12px;
		margin-bottom: 12px;
		min-height: 0 !important;
		height: auto !important;
	}

	.settings-panel__titles {
		flex: 0 0 auto !important;
		max-width: none;
	}

	.settings-panel__titles h3 {
		font-size: 18px;
	}

	.settings-panel__actions,
	.settings-panel__head > .ui-button {
		width: 100%;
		margin-left: 0;
	}

	.settings-panel__actions .ui-button {
		flex: 1;
	}

	/* Скрытый блок Отмена/Сохранить не должен занимать место */
	.settings-panel__actions[hidden],
	.settings-panel__actions[style*="display: none"],
	.settings-panel__actions[style*="display:none"] {
		display: none !important;
		margin: 0 !important;
		padding: 0 !important;
		height: 0 !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	.settings-panel .notification-rules-columns {
		display: none;
	}

	.settings-panel .notification-rule-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

/* Object/zone settings: don't let hidden nav embed inflate page height */
html:not(.is-obj-nav) #pado_6,
html:not(.is-zone-nav) #padz_4 {
	display: none !important;
	position: absolute !important;
	width: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

html:not(.is-obj-nav) #pado_6 .nav-map,
html:not(.is-zone-nav) #padz_4.nav-map {
	min-height: 0 !important;
	height: 0 !important;
	max-height: 0 !important;
}

/* Mobile .nav-map { min-height: 100dvh } не должен раздувать скрытые embed */
@media (max-width: 767px) {
	html:not(.is-zone-nav) #padz_4.nav-map,
	html:not(.is-obj-nav) #pado_6 .nav-map,
	html:not(.is-obj-nav):not(.is-zone-nav):not(.is-nav-map) .nav-map--embed {
		min-height: 0 !important;
		height: 0 !important;
		max-height: 0 !important;
	}
}

#pado_1.hidden,
#pado_2.hidden,
#pado_3.hidden,
#pado_4.hidden,
#pado_5.hidden,
#pado_7.hidden,
#padz_1.hidden,
#padz_2.hidden,
#padz_3.hidden,
#pado_1[hidden],
#pado_2[hidden],
#pado_3[hidden],
#pado_4[hidden],
#pado_5[hidden],
#pado_7[hidden],
#padz_2[hidden],
#padz_3[hidden] {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
}

/* Charts left in DOM after visiting «Графики» must not keep layout height */
#pado_3.hidden #obj_chart_,
#pado_3[hidden] #obj_chart_,
#pado_3[style*="display: none"] #obj_chart_,
#pado_3[style*="display:none"] #obj_chart_ {
	display: none !important;
	height: 0 !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

@media (max-width: 860px) {
	.ui-surface,
	.report-card,
	.monitoring-card,
	.dashboard-summary-card,
	.log-card,
	.support-card,
	.user-card,
	.user-stat-card,
	.device-stat-card {
		padding: var(--ui-inset-card-mobile);
	}
}

/* Vertical stack helper: uniform gap between blocks. */
.ui-stack {
	display: flex;
	flex-direction: column;
	gap: var(--ui-stack-md);
	min-width: 0;
}

.ui-stack--sm {
	gap: var(--ui-stack-sm);
}

.ui-stack--lg {
	gap: var(--ui-stack-lg);
}

/* Uniform gap for card grids / dashboards. */
.ui-grid-gap {
	gap: var(--ui-gap-card);
}

.ui-icon-button svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	color: inherit;
}

.ui-icon-button:hover {
	background: #f1f3f6;
	color: #334155;
}

.ui-icon-button:active {
	background: #e6eaf0;
	transform: scale(.96);
}

.ui-icon-button--accent {
	color: #1B6DFF;
	background: #e8f3ff;
}

.ui-icon-button--accent:hover {
	background: #d6ebff;
	color: #1554d4;
}

.ui-icon-button--accent:active {
	background: #c5e1ff;
}

.alarm-main-button {
	width: 40px;
	height: 40px;
	flex-basis: 40px;
	border-radius: 12px;
	color: #64748b;
}

.alarm-main-button .alarm-main-icon {
	display: none;
	width: 23px;
	height: 23px;
	stroke-width: 1.8;
}

.alarm-main-button[data-state="sound-on"] .alarm-main-icon--on,
.alarm-main-button[data-state="sound-off"] .alarm-main-icon--off,
.alarm-main-button[data-state="alarm"] .alarm-main-icon--alert {
	display: block;
}

.alarm-main-button[data-state="sound-off"] {
	color: #94a3b8;
}

.alarm-main-button[data-state="alarm"] {
	background: #fef2f2;
	color: #dc2626;
}

.alarm-main-button[data-state="alarm"]:hover {
	background: #fee2e2;
	color: #b91c1c;
}

/* Shared navigation back control. */
.ui-back-link {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	gap: 7px;
	margin: 0 0 16px;
	padding: 6px 8px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #52617a;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none !important;
	transition: color .16s ease, background-color .16s ease;
}

button.ui-back-link svg {
	display: block;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ui-back-link:hover {
	background: #f2f4f7;
	color: #263247;
}

.ui-back-link:focus-visible,
.ui-back-float:focus-visible {
	outline: 3px solid var(--ui-focus);
	outline-offset: 2px;
}

.ui-back-float {
	position: fixed;
	z-index: 45;
	display: none;
	width: 40px;
	height: 40px;
	padding: 0;
	place-items: center;
	border: 1px solid #dce3ec;
	border-radius: 11px;
	background: rgba(255, 255, 255, .96);
	color: #52617a;
	cursor: pointer;
	box-shadow: none;
	transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.ui-back-float.is-visible {
	display: grid;
}

.ui-back-float:hover {
	border-color: #cbd5e1;
	background: #f2f4f7;
	color: #263247;
}

.ui-back-float svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Custom select popover used by report and journal filters. */
.app-select {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

.app-select__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.app-select__trigger {
	display: flex;
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 11px 0 12px;
	border: 1px solid transparent;
	border-radius: var(--ui-control-radius);
	background: var(--ui-control-bg);
	color: var(--ui-text);
	font: inherit;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	box-shadow: none;
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.app-select__trigger:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover);
}

.app-select__trigger:disabled,
.app-select__trigger:disabled:hover {
	cursor: default;
	border-color: transparent;
	background: var(--ui-control-bg-disabled);
	color: #64748b;
}

.app-select--disabled .app-select__chevron {
	opacity: .5;
}

/* Higher specificity so context skins (.chart-timezone-select etc.) don't kill open/focus border */
.app-select.app-select--open .app-select__trigger,
.app-select .app-select__trigger:focus-visible {
	outline: none;
	border-color: var(--ui-control-border-focus);
	background: #fff;
	box-shadow: none;
}

.app-select__icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--ui-primary);
}

.app-select--compact .app-select__trigger {
	height: 36px;
	padding: 0 10px;
	font-size: 13px;
	font-weight: 600;
}

.app-select--form .app-select__trigger {
	height: 48px;
	padding: 0 14px;
	font-size: 15px;
	background: var(--ui-control-bg);
}

.app-select__value {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.app-select__chevron {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: #64748b;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .16s ease;
}

.app-select--open .app-select__chevron {
	transform: rotate(180deg);
}

/* Tree/object pickers that reuse AppSelect look without native <select>. */
.app-select-like {
	display: flex;
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 var(--ui-space-3);
	border: 1px solid transparent;
	border-radius: var(--ui-control-radius);
	background: var(--ui-control-bg);
	color: var(--ui-text);
	font: inherit;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	box-shadow: none;
	transition:
		border-color var(--ui-dur-2) ease,
		background-color var(--ui-dur-2) ease,
		box-shadow var(--ui-dur-2) ease;
}

.app-select-like > span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app-select-like:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover);
}

button.app-select-like:focus-visible,
button.app-select-like[aria-expanded="true"],
.app-select-like:focus-visible,
.app-select-like[aria-expanded="true"] {
	outline: none;
	border-color: var(--ui-control-border-focus);
	background: #fff;
	box-shadow: none;
}

.app-select-like[aria-expanded="true"] .app-select__chevron {
	transform: rotate(180deg);
}

.app-select-like--form {
	height: 48px;
	padding: 0 var(--ui-space-4);
	font-size: 15px;
	background: var(--ui-control-bg);
}

.app-select-like--compact {
	height: 36px;
	padding: 0 var(--ui-space-3);
	font-size: 13px;
	font-weight: 600;
}

.app-select__menu {
	position: fixed;
	z-index: 7000;
	box-sizing: border-box;
	max-height: min(300px, calc(100vh - 24px));
	padding: 6px;
	overflow-y: auto;
	border: 0;
	border-radius: var(--ui-control-radius);
	background: #fff;
	box-shadow: 0 16px 42px rgba(15, 23, 42, .16), 0 2px 7px rgba(15, 23, 42, .07);
	animation: ui-pop-in var(--ui-dur-2) var(--ui-ease-out);
}

.app-select__menu[hidden] {
	display: none !important;
}

.app-select__option {
	display: grid;
	box-sizing: border-box;
	width: 100%;
	min-height: 38px;
	grid-template-columns: minmax(0, 1fr) 18px;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #334155;
	font: inherit;
	font-size: 14px;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
}

.app-select__option:hover,
.app-select__option:focus-visible {
	outline: none;
	background: #f0f6ff;
	color: #1769df;
}

.app-select__option[aria-selected="true"] {
	background: #e9f3ff;
	color: #1769df;
	font-weight: 500;
}

.app-select__option svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0;
}

.app-select__option[aria-selected="true"] svg {
	opacity: 1;
}

.app-select__option:disabled {
	cursor: not-allowed;
	opacity: .45;
}

/* Keep responsive visibility utilities intact when used with a component. */
@media (min-width: 1024px) {
	.ui-icon-button.lg\:hidden {
		display: none;
	}
}

/* Unified application dialogs */
div#fade {
	background: rgba(15, 23, 42, .54);
	opacity: 0;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	transition: opacity var(--ui-dur-3) ease;
}

div#fade.is-visible {
	opacity: 1;
}

body.app-modal-open {
	overflow: hidden;
}

.app-modal {
	box-sizing: border-box;
	left: 50% !important;
	top: 50% !important;
	width: min(440px, calc(100vw - 32px));
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 32px);
	margin: 0;
	padding: var(--ui-space-6) !important;
	overflow: auto;
	transform: translate(-50%, -50%);
	border: 0;
	border-radius: var(--ui-radius-dialog);
	background: #fff;
	box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
	color: #172033;
	transition: opacity var(--ui-dur-2) ease;
}

.app-modal[aria-hidden="false"] {
	animation: ui-modal-in var(--ui-dur-4) var(--ui-ease-out) both;
}

.app-modal--wide {
	width: min(640px, calc(100vw - 32px));
}

.app-modal--dynamic {
	width: auto;
	padding: 0 !important;
	overflow: hidden;
}

.app-modal--dynamic > br {
	display: none;
}

.app-dialog {
	min-width: 0 !important;
}

.app-dialog__header {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	align-items: start;
	gap: 14px;
}

.app-dialog__header h2 {
	margin: 0;
	color: #172033;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -.01em;
}

.app-dialog__header p {
	margin: 5px 0 0;
	color: #607087;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.app-dialog__icon {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 12px;
}

.app-dialog__icon svg {
	width: 22px;
	height: 22px;
}

.app-dialog__icon--info {
	background: #eef6ff;
	color: #217dff;
}

.app-dialog__icon--question {
	background: #fff7e6;
	color: #c87800;
}

.app-dialog__icon--danger {
	background: #fff0f0;
	color: #dc2626;
}

.app-dialog__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 24px;
}

.app-dialog__button {
	min-width: 112px;
}

.app-dialog__input:focus-visible {
	outline: none;
}

.app-dialog__input {
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	margin-top: 20px;
	padding: 10px 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg);
	color: #172033;
	font-size: 15px;
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.app-dialog__input:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover);
}

.app-dialog__input:focus {
	border-color: var(--ui-control-border-focus);
	background: #fff;
	box-shadow: none;
}

.app-dialog__selection {
	max-height: min(42vh, 320px);
	margin-top: 20px;
	overflow: auto;
	border: 0;
	border-radius: 12px;
	background: var(--ui-control-bg);
}

.app-modal--form {
	width: min(520px, calc(100vw - 32px));
}

.app-modal--form table {
	width: 100% !important;
	margin: 0 !important;
	border-spacing: 0 12px;
}

.app-modal--form .hdr {
	padding: 0 0 12px;
	color: #172033;
	font-size: 18px;
	font-weight: 600;
	text-align: left;
}

.app-modal--form input[type="text"],
.app-modal--form select {
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	border: 1px solid #cfd8e5;
	border-radius: 10px;
	background: #fff;
}

.app-modal--form .card-footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin: 20px -24px -24px;
	padding: 16px 24px;
	border-top: 1px solid #edf1f6;
	background: #fafbfd;
}

.app-modal--form .card-footer .btn {
	margin: 0;
}

.app-modal--form .card-footer .btn-info {
	order: 2;
}

@media (max-width: 520px) {
	.app-modal {
		width: calc(100vw - 24px);
		max-width: calc(100vw - 24px);
		max-height: calc(100vh - 24px);
		padding: 20px !important;
		border-radius: 16px;
	}

	.app-modal--dynamic {
		padding: 0 !important;
	}

	.app-dialog__actions {
		flex-direction: column-reverse;
	}

	.app-dialog__button {
		width: 100%;
	}

	.app-modal--form .card-footer {
		margin: 20px -20px -20px;
		padding: 14px 20px;
	}
}


.loader {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 width: 52px;
 height: 52px;
 line-height: 0;
}

.loader svg {
 display: block;
 width: 52px;
 height: 52px;
 transform-origin: center;
 animation: rotate4 1.6s linear infinite;
}

.loader svg circle {
 fill: none;
 stroke: #0E97E6;
 stroke-width: 4;
 stroke-dasharray: 10, 126;
 stroke-dashoffset: 0;
 stroke-linecap: round;
 animation: dash4 1.6s ease-in-out infinite;
}

.loading-screen-content {
 display: flex;
 align-items: center;
 justify-content: center;
 min-height: 100%;
}

.loading-screen-spinner {
	--loader-accent: var(--ui-primary, #1b6dff);
	--loader-track: rgba(27, 109, 255, .16);
	position: relative;
	box-sizing: border-box;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 4px solid var(--loader-track);
	border-top-color: var(--loader-accent);
	background: transparent;
	box-shadow: none;
	-webkit-mask: none;
	mask: none;
	animation: loading-screen-spin 1s linear infinite;
	will-change: transform;
}

.loading-screen-spinner::after {
	content: none;
	display: none;
}

@keyframes loading-screen-spin {
	to { transform: rotate(360deg); }
}

@keyframes rotate4 {
 100% {
  transform: rotate(360deg);
 }
}

@keyframes dash4 {
 0% {
  stroke-dasharray: 1, 126;
  stroke-dashoffset: 0;
 }
 50% {
  stroke-dasharray: 88, 126;
  stroke-dashoffset: -28;
 }
 100% {
  stroke-dasharray: 1, 126;
  stroke-dashoffset: -124;
 }
}

@media (prefers-reduced-motion: reduce) {
 .loading-screen-spinner {
  animation-duration: 1.8s;
 }

 .loader svg,
 .loader svg circle {
  animation-duration: 3s;
 }
}

.app-busy {
	position: absolute;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 16px;
	background: rgba(255, 255, 255, .55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: app-busy-in .18s ease;
	/* Не перехватываем wheel/touch — иначе нельзя скроллить страницу над графиком */
	pointer-events: none;
}

.app-busy--inline {
	position: relative;
	inset: auto;
	min-height: 72px;
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	pointer-events: none;
}

.is-app-busy {
	position: relative !important;
}

.page.is-app-busy {
	min-height: min(380px, calc(100vh - 160px));
}

.user-invites-list.is-app-busy,
.notif-panel__list.is-app-busy,
.notif-inbox__list.is-app-busy {
	min-height: 96px;
}

.app-busy__chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100% - 16px);
	padding: 8px 14px;
	border-radius: 999px;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

.app-busy__spin {
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	border: 2px solid rgba(255, 255, 255, .28);
	border-top-color: #fff;
	border-radius: 50%;
	animation: app-busy-spin .7s linear infinite;
}

.app-busy__spin--sm {
	width: 14px;
	height: 14px;
	flex: 0 0 14px;
	border-color: rgba(15, 23, 42, .18);
	border-top-color: var(--ui-primary, #1b6dff);
}

.app-busy__text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.user-lookup-status--loading {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ui-button.is-busy,
button.is-busy,
input[type="button"].is-busy,
input[type="submit"].is-busy {
	position: relative;
	pointer-events: none;
	color: transparent !important;
}

.ui-button.is-busy > *,
button.is-busy > * {
	visibility: hidden;
}

.ui-button.is-busy::after,
button.is-busy::after,
input[type="button"].is-busy::after,
input[type="submit"].is-busy::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: app-busy-spin .7s linear infinite;
}

.ui-button--secondary.is-busy::after {
	border-color: rgba(15, 23, 42, .16);
	border-top-color: var(--ui-primary, #1b6dff);
}

@keyframes app-busy-spin {
	to { transform: rotate(360deg); }
}

@keyframes app-busy-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.app-busy,
	.app-busy__chip {
		animation: none;
	}
	.app-busy__spin,
	.ui-button.is-busy::after,
	button.is-busy::after {
		animation-duration: 1.6s;
	}
}

/* Hide page content until real data is applied (no flicker of defaults) */
.notification-page.is-hydrating,
.device-page.is-hydrating {
	position: relative;
	min-height: min(320px, calc(100vh - 180px));
}

.notification-page.is-hydrating .notification-page__header,
.notification-page.is-hydrating .notification-panel,
.device-page.is-hydrating .device-page__body {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.notification-page.is-hydrating *,
.device-page.is-hydrating * {
	transition: none !important;
	animation: none !important;
}

.notification-page:not(.is-hydrating) .notification-panel,
.device-page:not(.is-hydrating) .device-page__body {
	animation: app-busy-in .18s ease;
}

@media (prefers-reduced-motion: reduce) {
	.notification-page:not(.is-hydrating) .notification-panel,
	.device-page:not(.is-hydrating) .device-page__body {
		animation: none;
	}
}

/*--------- checkbox ---------*/

/* Глобальные кастомные чекбоксы (как в UI: скруглённый квадрат + галочка) */
input[type="checkbox"] {
	--app-checkbox-size: 18px;
	--app-checkbox-radius: 6px;
	--app-checkbox-color: var(--ui-primary, #217dff);
	--app-checkbox-border: #b8c3d2;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	box-sizing: border-box;
	width: var(--app-checkbox-size);
	height: var(--app-checkbox-size);
	min-width: var(--app-checkbox-size);
	min-height: var(--app-checkbox-size);
	margin: 0;
	padding: 0;
	flex-shrink: 0;
	vertical-align: middle;
	border: 1.5px solid var(--app-checkbox-border);
	border-radius: var(--app-checkbox-radius);
	background-color: #fff;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 12px;
	cursor: pointer;
	color: #fff;
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

input[type="checkbox"]:hover:not(:disabled) {
	border-color: var(--app-checkbox-color);
}

input[type="checkbox"]:checked,
input[type="checkbox"]:indeterminate {
	border-color: var(--app-checkbox-color);
	background-color: var(--app-checkbox-color);
}

input[type="checkbox"]:checked {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m3.2 8.2 3.1 3.1 6.5-6.6' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="checkbox"]:indeterminate {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8h9' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

input[type="checkbox"]:focus-visible {
	outline: none;
	box-shadow: none;
}

input[type="checkbox"]:active:not(:disabled) {
	transform: scale(.92);
}

input[type="checkbox"]:disabled {
	cursor: default;
	opacity: .55;
	border-color: #cbd5e1;
	background-color: #eef2f7;
	box-shadow: none;
	transform: none;
}

input[type="checkbox"]:disabled:checked,
input[type="checkbox"]:disabled:indeterminate {
	border-color: #78aaf0;
	background-color: #78aaf0;
	opacity: .72;
}

/* Скрытые инпуты у тогглов и кастомных обёрток — не стилизуем как чекбокс */
input[type="checkbox"].checkbox,
input[type="checkbox"].entity-checkbox__input,
input[type="checkbox"][hidden],
.notification-switch input[type="checkbox"],
.zone-switch input[type="checkbox"],
.auth-remember input[type="checkbox"],
#auth_div .auth-remember input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 1px !important;
	height: 1px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	opacity: 0 !important;
	pointer-events: none;
	position: absolute !important;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	transform: none !important;
}

/* The switch - the box around the slider (Ozon-style) */
.container {
  width: 44px;
  height: 26px;
  position: relative;
	display: inline-block;
	vertical-align: middle;
}

/* Hide default HTML checkbox */
.checkbox {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch {
  width: 100%;
  height: 100%;
  display: block;
  background-color: #cfd5de;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .18s ease;
}

/* The slider */
.slider {
  width: 22px;
  height: 22px;
  position: absolute;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
  transition: transform .18s ease;
  cursor: pointer;
}

.checkbox:checked + .switch {
  background-color: var(--ui-primary, #217dff);
}

.checkbox:checked + .switch .slider {
  left: 2px;
  top: 2px;
  transform: translateX(18px);
}


button svg.c0
{
	display: block;
}

button svg.c1
{
	display: none;
}

button.act svg.c1
{
	display: block;
}

button.act svg.c0
{
	display: none;
}


.device-card-meta {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.device-telemetry {
	position: static;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #475569;
	font-size: 13px;
	line-height: 1;
}

.device-status-dot {
	display: block;
	width: 10px;
	height: 10px;
	flex: 0 0 10px;
	border-radius: 999px;
}

.device-card-status {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}

.device-status-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.device-status-chip--offline {
	border: 0;
	background: #f3f4f6;
	color: #6b7280;
}

.device-status-chip--signal {
	border: 0;
	background: #fffbeb;
	color: #d97706;
}

.device-status-chip--pending {
	border: 0;
	background: #eef6ff;
	color: #217dff;
	min-width: 22px;
	min-height: 22px;
	justify-content: center;
	padding: 4px;
}

.device-status-spinner {
	display: block;
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	border: 2px solid rgba(27, 109, 255, .18);
	border-top-color: var(--ui-primary, #1b6dff);
	border-right-color: rgba(27, 109, 255, .4);
	border-radius: 50%;
	animation: device-status-spin .7s cubic-bezier(.45, .05, .55, .95) infinite;
}

.device-status-spinner--dot {
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
}

@keyframes device-status-spin {
	to { transform: rotate(360deg); }
}

.device-status-chip--alarm {
	border-color: #fecaca;
	background: #fef2f2;
	color: #dc2626;
}

.device-verify {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	min-width: 0;
	max-width: 120px;
	line-height: 1.2;
	cursor: default;
}

.device-verify__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
}

.device-verify__meta {
	font-size: 12px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	color: #64748b;
	white-space: nowrap;
	padding-left: 1px;
}

.device-verify--ok .device-verify__badge {
	background: #ecfdf5;
	color: #059669;
}

.device-verify--soon .device-verify__badge {
	background: #fff7ed;
	color: #c2410c;
}

.device-verify--expired .device-verify__badge {
	background: #fef2f2;
	color: #dc2626;
}

.device-verify--missing .device-verify__badge {
	background: #f3f4f6;
	color: #6b7280;
}

.device-verify--loading .device-verify__badge,
.device-verify__badge--loading {
	background: #eff6ff;
	color: #1d4ed8;
	gap: 6px;
}

.device-verify__spinner {
	display: inline-block;
	width: 10px;
	height: 10px;
	border: 1.5px solid rgba(27, 109, 255, .22);
	border-top-color: var(--ui-primary, #1b6dff);
	border-radius: 50%;
	animation: device-verify-spin .7s cubic-bezier(.45, .05, .55, .95) infinite;
	flex: 0 0 auto;
}

@keyframes device-verify-spin {
	to { transform: rotate(360deg); }
}

.device-list-item__verify .device-verify {
	max-width: none;
}

.device-info-modal {
	display: none;
	width: min(760px, calc(100vw - 32px)) !important;
	max-height: min(780px, calc(100vh - 32px));
	padding: 0 !important;
	overflow: hidden !important;
}

.device-info-modal[aria-hidden="false"] {
	display: flex !important;
	flex-direction: column;
}

.device-info-modal__head {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--ui-space-4);
	padding: var(--ui-space-4) var(--ui-space-5);
	border-bottom: 1px solid #eef2f7;
}

.device-info-modal__head h2 {
	margin: 0;
	color: var(--ui-text);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}

.device-info-modal__head p {
	margin: var(--ui-space-1) 0 0;
	color: var(--ui-muted);
	font-size: 14px;
	line-height: 1.4;
}

.device-info-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: var(--ui-space-4) var(--ui-space-5) var(--ui-space-5);
	overflow-y: auto;
}

.device-info-modal__hero {
	display: grid;
	grid-template-columns: 136px minmax(0, 1fr);
	gap: var(--ui-space-4);
	align-items: center;
	margin-bottom: var(--ui-space-4);
	padding: var(--ui-space-3);
	border-radius: var(--ui-radius-lg);
	background: #f6f8fb;
}

.device-info-modal__visual {
	display: grid;
	min-height: 128px;
	place-items: center;
	padding: var(--ui-space-3);
	border-radius: var(--ui-radius-md);
	background: #fff;
	color: #7b8ba1;
	overflow: hidden;
}

.device-info-modal__visual.is-photo {
	background:
		radial-gradient(120% 100% at 50% 0%, #f8fafc 0%, #eef2f7 55%, #e8eef6 100%);
}

.device-info-modal__photo {
	display: block;
	width: 100%;
	max-width: 168px;
	height: auto;
	max-height: 168px;
	object-fit: contain;
}

.device-info-modal__placeholder {
	display: block;
	width: 88px;
	height: 88px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.device-info-modal__summary {
	display: flex;
	min-width: 0;
	flex-direction: column;
	align-items: flex-start;
}

.device-info-modal__eyebrow {
	margin-bottom: var(--ui-space-1);
	color: #94a3b8;
	font-size: 12px;
	font-weight: 650;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.device-info-modal__summary > strong {
	max-width: 100%;
	color: #0f172a;
	font-size: 20px;
	font-weight: 650;
	line-height: 1.3;
	word-break: break-word;
}

.device-info-modal__summary > span:not(.device-info-modal__eyebrow) {
	margin-top: var(--ui-space-1);
	color: var(--ui-muted);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	word-break: break-word;
}

.device-info-modal__connection {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ui-space-2) var(--ui-space-3);
	margin-top: var(--ui-space-2);
}

.device-info-modal__state {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 9px;
	border-radius: var(--ui-radius-full);
	background: #f1f5f9;
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
}

.device-info-modal__state::before {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	content: "";
}

.device-info-modal__state.is-online {
	background: #ecfdf5;
	color: #059669;
}

.device-info-modal__state.is-pending {
	background: #eef6ff;
	color: var(--ui-primary);
}

.device-info-modal__state.is-pending::before {
	box-sizing: border-box;
	background: transparent;
	border: 2px solid rgba(33, 125, 255, .25);
	border-top-color: currentColor;
	animation: app-busy-spin .8s linear infinite;
}

.device-info-modal__last-seen {
	color: var(--ui-muted) !important;
	font-size: 13px !important;
	font-variant-numeric: tabular-nums;
}

.device-info-modal__product-link {
	display: inline-flex;
	align-items: center;
	margin-top: var(--ui-space-2);
	color: var(--ui-primary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.device-info-modal__product-link[hidden] {
	display: none !important;
}

.device-info-modal__product-link:hover {
	text-decoration: underline;
}

.device-info-modal__readings {
	margin: 0 0 var(--ui-space-5);
	padding: var(--ui-space-1) 0 var(--ui-space-4);
	border-bottom: 1px solid #edf1f6;
}

.device-info-modal__readings[hidden] {
	display: none !important;
}

.device-info-modal__readings:not(:has(.device-info-metric)) {
	display: none;
}

.device-info-modal__readings h3 {
	margin: 0 0 var(--ui-space-4);
	color: #334155;
	font-size: 15px;
	font-weight: 650;
}

#device_info_metrics.device-info-modal__metrics {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 0;
}

.device-info-modal #device_info_metrics > .device-info-metric {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 5px;
	padding: 2px var(--ui-space-5);
	border-left: 1px solid #e8edf4;
	background: transparent;
}

.device-info-modal #device_info_metrics > .device-info-metric:first-child {
	padding-left: 0;
	border-left: 0;
}

.device-info-metric__label {
	overflow: hidden;
	color: var(--ui-muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.device-info-metric__value {
	color: #0f172a;
	font-size: 22px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	line-height: 1.25;
}

.device-info-metric__value small {
	color: var(--ui-muted);
	font-size: 12px;
	font-weight: 500;
}

.device-info-modal__sections {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ui-space-4);
}

.device-info-section {
	min-width: 0;
	padding: var(--ui-space-4);
	border: 1px solid #e8eef5;
	border-radius: var(--ui-radius-md);
	background: #fff;
}

.device-info-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-3);
	margin-bottom: var(--ui-space-3);
}

.device-info-section__title {
	margin: 0;
	color: #334155;
	font-size: 15px;
	font-weight: 650;
}

.device-info-section__action,
.device-info-section__link {
	flex: 0 0 auto;
	min-height: 32px;
	padding: 6px 10px;
	border: 0;
	border-radius: var(--ui-radius-sm);
	background: #eef2f7;
	color: var(--ui-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.device-info-section__action.ui-button--secondary {
	background: #eef2f7 !important;
}

.device-info-section__grid {
	display: flex;
	flex-direction: column;
}

.device-info-field {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--ui-space-3);
	padding: 8px 0;
	border-top: 1px solid #f1f5f9;
}

.device-info-field:first-child {
	padding-top: 0;
	border-top: 0;
}

.device-info-field:last-child {
	padding-bottom: 0;
}

.device-info-field__label {
	flex: 0 1 auto;
	color: var(--ui-muted);
	font-size: 13px;
	line-height: 1.35;
}

.device-info-field__value {
	min-width: 0;
	color: #0f172a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	text-align: right;
	word-break: break-word;
}

.device-info-field__value--mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .device-info-modal__head {
	border-color: #293548;
	background: #151f2d;
}

html[data-theme="dark"] .device-info-modal__head h2,
html[data-theme="dark"] .device-info-modal__summary > strong,
html[data-theme="dark"] .device-info-field__value,
html[data-theme="dark"] .device-info-metric__value {
	color: #f1f5f9;
}

html[data-theme="dark"] .device-info-modal__hero {
	background: #1a2534;
}

html[data-theme="dark"] .device-info-modal__visual,
html[data-theme="dark"] .device-info-section {
	border-color: #2b394d;
	background: #202c3d;
}

html[data-theme="dark"] .device-info-modal__visual.is-photo {
	background:
		radial-gradient(120% 100% at 50% 0%, #243246 0%, #1a2534 60%, #162033 100%);
}

html[data-theme="dark"] .device-info-modal__readings {
	border-color: #2b394d;
}

html[data-theme="dark"] .device-info-modal #device_info_metrics > .device-info-metric {
	border-color: #2b394d;
}

html[data-theme="dark"] .device-info-section__title {
	color: #dbe5f2;
}

html[data-theme="dark"] .device-info-field {
	border-color: #2b394d;
}

html[data-theme="dark"] .device-info-modal__head p,
html[data-theme="dark"] .device-info-modal__summary > span:not(.device-info-modal__eyebrow),
html[data-theme="dark"] .device-info-field__label {
	color: #94a3b8;
}

@media (max-width: 767px) {
	.device-info-modal.app-modal,
	#device_info_form.device-info-modal {
		left: 0 !important;
		top: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		width: 100vw !important;
		max-width: 100vw !important;
		height: 100dvh !important;
		max-height: 100dvh !important;
		margin: 0 !important;
		padding: 0 !important;
		transform: none !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		background: #fff !important;
	}

	.device-info-modal__head {
		padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
	}

	.device-info-modal__body {
		padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
		-webkit-overflow-scrolling: touch;
	}

	.device-info-modal__head h2 {
		font-size: 18px;
	}

	.device-info-modal__head p {
		font-size: 13px;
	}

	.device-info-modal__hero {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: var(--ui-space-3);
		padding: var(--ui-space-3);
	}

	.device-info-modal__visual {
		min-height: 96px;
		padding: var(--ui-space-2);
	}

	.device-info-modal__photo {
		max-width: 132px;
		max-height: 132px;
	}

	.device-info-modal__placeholder {
		width: 72px;
		height: 72px;
	}

	.device-info-modal__summary > strong {
		font-size: 17px;
	}

	.device-info-modal__sections {
		grid-template-columns: 1fr;
	}

	#device_info_metrics.device-info-modal__metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.device-info-modal #device_info_metrics > .device-info-metric {
		padding: 10px 12px;
		border-left: 0;
		border-bottom: 1px solid #edf1f6;
	}

	.device-info-modal #device_info_metrics > .device-info-metric:nth-child(odd) {
		padding-left: 0;
	}

	.device-info-modal #device_info_metrics > .device-info-metric:nth-child(even) {
		border-left: 1px solid #edf1f6;
	}

	.device-info-modal #device_info_metrics > .device-info-metric:nth-last-child(-n+2) {
		border-bottom: 0;
	}
}

.device-verify-modal {
	width: min(440px, calc(100vw - 32px)) !important;
	padding: 16px !important;
	border-radius: 16px !important;
}

.device-verify-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.device-verify-modal__head h2 {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 600;
	color: #172033;
}

.device-verify-modal__head p {
	margin: 0;
	font-size: 13px;
	color: #64748b;
	line-height: 1.4;
}

.device-verify-modal__status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #e8eef5;
}

.device-verify-modal__status--ok {
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.device-verify-modal__status--soon {
	background: #fff7ed;
	border-color: #fed7aa;
}

.device-verify-modal__status--expired {
	background: #fef2f2;
	border-color: #fecaca;
}

.device-verify-modal__hint {
	font-size: 13px;
	color: #475569;
}

.device-verify-modal__grid {
	display: flex;
	flex-direction: column;
	gap: 0;
	border: 1px solid #e8eef5;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 4px;
}

.device-verify-modal__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 12px;
	border-bottom: 1px solid #eef2f7;
	font-size: 13px;
}

.device-verify-modal__row:last-child {
	border-bottom: 0;
}

.device-verify-modal__row span {
	color: #64748b;
	flex: 0 0 auto;
}

.device-verify-modal__row strong {
	color: #0f172a;
	font-weight: 600;
	text-align: right;
	word-break: break-word;
}

.device-verify-modal__empty {
	margin: 0;
	padding: 12px;
	font-size: 13px;
	color: #64748b;
	line-height: 1.45;
}

.dash-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding: 0 0 0;
	border-bottom: 0;
}

.dash-head .app-tabs {
	flex: 0 0 auto;
	min-width: 0;
	max-width: min(360px, calc(100% - 132px));
	margin: 0;
	border-bottom: 0;
}

#page_main.is-scheme .dash-head__tools {
	display: none;
}

.dash-head__tools {
	display: flex;
	align-items: center;
	gap: 2px;
	flex: 0 0 auto;
	box-sizing: border-box;
	padding: 3px; /* как у .app-view-tabs / .ui-segmented */
	border-radius: 12px;
	background: #eef1f5;
	box-shadow: none;
}

.dash-head__tools .dash-view-switch.ui-segmented {
	display: flex;
	flex: 0 0 auto;
	gap: 2px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.dash-view-switch .ui-segmented__btn {
	box-sizing: border-box;
	width: 38px !important;
	min-width: 38px !important;
	max-width: 38px !important;
	height: 38px !important;
	min-height: 38px !important;
	flex: 0 0 38px;
	padding: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	color: #64748b !important;
	box-shadow: none !important;
}

.dash-head__tools .dash-view-switch .ui-segmented__btn.is-active {
	background: #fff !important;
	color: var(--ui-primary) !important;
	box-shadow: none !important;
}

.dash-view-switch .ui-segmented__btn svg {
	display: block;
	width: 17px;
	height: 17px;
}

.dash-settings-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 38px;
	min-width: 38px;
	height: 38px;
	min-height: 38px;
	flex: 0 0 38px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.dash-settings-btn svg {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

.dash-settings-btn:hover {
	background: rgba(255, 255, 255, .58);
	color: #334155;
}

.dash-settings-btn.is-active {
	background: #fff;
	color: #1b6dff;
	box-shadow: none;
}

.dash-done-btn {
	min-height: 34px !important;
	padding: 0 14px !important;
	font-size: 13px !important;
	line-height: 1 !important;
	white-space: nowrap;
}

.dash-edit-hint {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	margin: 0 0 10px;
	padding: 8px 12px;
	border: 1px dashed #93c5fd;
	border-radius: 10px;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 12px;
	line-height: 1.35;
}

.dash-edit-hint > span {
	min-width: 0;
}

.dash-view-switch.is-disabled {
	opacity: .45;
	pointer-events: none;
}

html[data-theme="dark"] .dash-head__tools {
	background: #1a2433;
}

html[data-theme="dark"] .dash-head__tools .dash-view-switch.ui-segmented {
	border: 0 !important;
	background: transparent !important;
}

html[data-theme="dark"] .dash-head__tools .dash-settings-btn {
	border: 0 !important;
	background: transparent !important;
	color: #94a3b8 !important;
	box-shadow: none !important;
}

html[data-theme="dark"] .dash-head__tools .dash-view-switch .ui-segmented__btn.is-active,
html[data-theme="dark"] .dash-head__tools .dash-settings-btn.is-active {
	background: #263246 !important;
	color: #69a7fa !important;
	box-shadow: none !important;
}

.dash-context-banner-wrap:not([hidden]) {
	display: block;
	margin-bottom: 16px;
}

.dash-context-banner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.dash-context-banner--warn {
	border-color: #fed7aa;
	background: #fffbeb;
}

.dash-context-banner--info {
	border-color: #bfdbfe;
	background: #eff6ff;
}

.dash-context-banner--bad {
	border-color: #fecaca;
	background: #fef2f2;
}

.dash-context-banner__body {
	min-width: 0;
	flex: 1 1 auto;
}

.dash-context-banner__title {
	display: block;
	margin: 0 0 4px;
	color: #0f172a;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.35;
}

.dash-context-banner__text {
	margin: 0;
	color: #475569;
	font-size: 13px;
	line-height: 1.45;
}

.dash-context-banner__btn {
	flex-shrink: 0;
	align-self: center;
	white-space: nowrap;
}

#pan_m2.is-dashboard-empty > br {
	display: none;
}

#pan_m2.is-dashboard-empty #dash_table_wrap {
	border: 0;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

#pan_m2.is-dashboard-empty #obj_list1 {
	display: block;
	width: 100%;
	min-height: 0;
	padding: 0;
}

#pan_m2.is-dashboard-empty #dash_table_wrap .app-empty {
	width: 100%;
	min-height: min(52vh, 420px);
	margin: 0;
}

#pan_m2.is-dashboard-zones-empty #obj_list1 {
	display: block;
	width: 100%;
	min-height: 0;
	padding: 0;
}

#pan_m2.is-dashboard-zones-empty #dash_table_wrap {
	border: 0;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

#pan_m2.is-dashboard-zones-empty #dash_table_wrap .app-empty {
	width: 100%;
	min-height: min(40vh, 360px);
	margin: 0;
}

.dash-table.is-rows {
	--dash-row-cols: minmax(108px, 1fr) minmax(92px, .85fr) minmax(108px, .9fr) minmax(108px, .78fr) minmax(168px, 2.2fr) 68px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

#pan_m2.is-dash-edit .dash-table.is-rows {
	--dash-row-cols: 20px minmax(108px, 1fr) minmax(82px, .68fr) minmax(90px, .76fr) minmax(70px, .54fr) minmax(140px, 2fr) 58px;
}

.dash-table__head {
	display: grid;
	grid-template-columns: var(--dash-row-cols);
	gap: 0 10px;
	align-items: center;
	padding: 8px 12px;
	border-bottom: 1px solid #e5e7eb;
	background: #f8fafc;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
}

.dash-table__head-status {
	text-align: right;
}

.dash-card-handle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	color: #94a3b8;
	pointer-events: none;
}

#obj_list1:not(.dash-view-rows) .dash-card-handle {
	position: absolute;
	top: 12px;
	left: 10px;
	z-index: 3;
	width: 22px;
	height: 22px;
}

#pan_m2.is-dash-edit #obj_list1:not(.dash-view-rows) .monitoring-card {
	padding-left: 36px;
}

.dash-card-handle svg {
	width: 14px;
	height: 14px;
}

#pan_m2.is-dash-edit .dash-card-handle {
	display: inline-flex;
}

#pan_m2.is-dash-edit .monitoring-card {
	cursor: grab;
	touch-action: none;
	user-select: none;
}

#pan_m2.is-dash-edit .monitoring-card.is-drag-source {
	visibility: hidden;
}

body.is-dash-dragging,
body.is-dash-dragging * {
	cursor: grabbing !important;
	user-select: none !important;
}

.dash-drag-placeholder {
	box-sizing: border-box;
	border: 2px dashed #93c5fd;
	border-radius: 12px;
	background: rgba(239, 246, 255, .55);
	min-height: 72px;
	pointer-events: none;
	transition: opacity .18s ease;
}

#obj_list1.dash-view-rows .dash-drag-placeholder {
	width: 100%;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
}

.dash-drag-float {
	position: fixed;
	z-index: 10050;
	margin: 0;
	pointer-events: none;
	box-sizing: border-box;
	height: auto;
	overflow: hidden;
	transform: none;
	box-shadow:
		0 18px 36px rgba(15, 23, 42, .16),
		0 0 0 2px #93c5fd;
	opacity: .98;
	transition: none !important;
	animation: none;
	container-type: normal;
}

.dash-drag-float.transition-all {
	transition: none !important;
}

.dash-drag-float-shell {
	position: fixed;
	z-index: 10050;
	pointer-events: none;
	box-sizing: border-box;
	transform: translateY(-2px);
	box-shadow:
		0 10px 24px rgba(15, 23, 42, .12),
		0 0 0 1px #bfdbfe;
	background: #fff;
	overflow: hidden;
}

.dash-drag-float--row.monitoring-card {
	display: grid !important;
	grid-template-columns: var(--dash-row-cols);
	gap: 0 8px;
	align-items: center;
	min-height: 42px;
	height: auto;
	padding: 6px 12px !important;
	margin: 0;
	border: 0 !important;
	border-bottom: 1px solid #eef2f7 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #fff !important;
	position: relative !important;
	transform: none !important;
	animation: none !important;
}

.dash-drag-float--row.dash-drag-float {
	transform: none !important;
	animation: none !important;
	box-shadow: none !important;
	opacity: 1;
}

.dash-drag-float--row .device-card-summary {
	display: contents;
}

.dash-drag-float--row .dash-cell--zone {
	grid-column: 1;
	grid-row: 1;
	margin: 0 !important;
	min-width: 0;
}

.dash-drag-float--row .dash-cell--obj {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dash-drag-float--row .dash-cell--dev {
	grid-column: 3;
	grid-row: 1;
	margin: 0 !important;
	min-width: 0;
	font-size: 12px;
	line-height: 1.3;
	color: #334155;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dash-drag-float--row .dash-cell--time {
	grid-column: 4;
	grid-row: 1;
	margin: 0 !important;
	min-width: 0;
	font-size: 11px;
	line-height: 1.3;
	color: #64748b;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.dash-drag-float--row .dash-cell__label,
.dash-drag-float--row .dash-cell .font-mono,
.dash-drag-float--row .dash-cell .text-\[10px\],
.dash-drag-float--row .nav-fix-chip,
.dash-drag-float--row .alarm-limits-cell {
	display: none !important;
}

.dash-drag-float--row .dash-cell--zone h3 {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
}

.dash-drag-float--row .monitoring-sensor-grid {
	display: flex;
	grid-column: 5;
	grid-row: 1;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0;
	min-width: 0;
	overflow: hidden;
}

.dash-drag-float--row .monitoring-sensor-grid > .param-card {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 6px;
	padding: 0 10px 0 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.dash-drag-float--row .device-card-meta {
	position: static;
	grid-column: 6;
	grid-row: 1;
	justify-self: end;
	gap: 6px;
}

.dash-drag-float--row .dash-card-handle {
	grid-column: 1;
	grid-row: 1;
}

#pan_m2.is-dash-edit .dash-drag-float--row .dash-card-handle {
	display: inline-flex;
}

#pan_m2.is-dash-edit .dash-drag-float--row .dash-cell--zone {
	grid-column: 2;
}

#pan_m2.is-dash-edit .dash-drag-float--row .dash-cell--obj {
	grid-column: 3;
}

#pan_m2.is-dash-edit .dash-drag-float--row .dash-cell--dev {
	grid-column: 4;
}

#pan_m2.is-dash-edit .dash-drag-float--row .dash-cell--time {
	grid-column: 5;
}

#pan_m2.is-dash-edit .dash-drag-float--row .monitoring-sensor-grid {
	grid-column: 6;
}

#pan_m2.is-dash-edit .dash-drag-float--row .device-card-meta {
	grid-column: 7;
}

.dash-drag-placeholder--row {
	min-height: 42px !important;
	border-radius: 0 !important;
	border-left: 0 !important;
	border-right: 0 !important;
}

@keyframes dash-drag-lift {
	from {
		transform: rotate(0deg) scale(1);
		box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	}
	to {
		transform: rotate(-1.5deg) scale(1.02);
		box-shadow:
			0 22px 44px rgba(15, 23, 42, .18),
			0 0 0 2px #93c5fd;
	}
}

#pan_m2.is-dash-dragging #obj_list1 .monitoring-card:not(.is-drag-source) {
	transition: none;
	will-change: auto;
}

#pan_m2.is-dash-dragging #obj_list1.dash-view-rows .monitoring-card:not(.is-drag-source) {
	transition: none;
}

#pan_m2.is-dash-edit #obj_list1 {
	transition: none;
}

#obj_list1.dash-view-rows {
	display: flex !important;
	flex-direction: column;
	gap: 0;
}

#obj_list1.dash-view-rows .monitoring-card {
	display: grid;
	grid-template-columns: var(--dash-row-cols);
	gap: 0 8px;
	align-items: center;
	min-height: 42px;
	height: auto;
	padding: 6px 12px;
	border: 0;
	border-bottom: 1px solid #eef2f7;
	border-radius: 0;
	box-shadow: none;
	background: #fff;
}

#obj_list1.dash-view-rows .monitoring-card:last-child {
	border-bottom: 0;
}

#obj_list1.dash-view-rows .monitoring-card:hover {
	background: #fafbfc;
	transform: none;
	box-shadow: none;
}

#obj_list1.dash-view-rows .device-card-summary {
	display: contents;
}

#obj_list1.dash-view-rows .dash-cell--zone {
	grid-column: 1;
	grid-row: 1;
	margin: 0 !important;
	min-width: 0;
}

#obj_list1.dash-view-rows .dash-cell--obj {
	grid-column: 2;
	grid-row: 1;
	margin: 0;
	font-size: 12px;
	line-height: 1.3;
	color: #64748b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#obj_list1.dash-view-rows .dash-cell--dev {
	grid-column: 3;
	grid-row: 1;
	margin: 0 !important;
	min-width: 0;
	font-size: 12px;
	line-height: 1.3;
	color: #334155;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#obj_list1.dash-view-rows .dash-cell--time {
	grid-column: 4;
	grid-row: 1;
	margin: 0 !important;
	min-width: 0;
	font-size: 11px;
	line-height: 1.3;
	color: #64748b;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

#obj_list1.dash-view-rows .dash-cell__label {
	display: none;
}

#obj_list1.dash-view-rows .dash-cell--zone h3 {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
}

#obj_list1.dash-view-rows .dash-cell .font-mono,
#obj_list1.dash-view-rows .dash-cell .text-\[10px\] {
	display: none;
}

#obj_list1.dash-view-rows .nav-fix-chip {
	display: none;
}

#obj_list1.dash-view-rows .monitoring-sensor-grid {
	display: flex;
	grid-column: 5;
	grid-row: 1;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

#obj_list1.dash-view-rows .monitoring-sensor-grid::-webkit-scrollbar {
	display: none;
}

#obj_list1.dash-view-rows .monitoring-sensor-grid > .param-card {
	display: inline-flex;
	flex: 0 0 auto;
	flex-direction: row;
	align-items: baseline;
	gap: 5px;
	min-width: 0;
	min-height: 0;
	height: auto;
	padding: 0 10px 0 0;
	margin-right: 10px;
	border: 0;
	border-right: 1px solid #e5e7eb;
	border-radius: 0;
	background: transparent !important;
}

#obj_list1.dash-view-rows .monitoring-sensor-grid > .param-card:last-child {
	margin-right: 0;
	padding-right: 0;
	border-right: 0;
}

#obj_list1.dash-view-rows .param-card-name {
	margin: 0;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
}

#obj_list1.dash-view-rows .param-card-body {
	margin: 0;
	gap: 4px;
}

#obj_list1.dash-view-rows .param-card-value {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

#obj_list1.dash-view-rows .param-card-value + *,
#obj_list1.dash-view-rows .param-card-body .param-card-value ~ * {
	font-size: 11px;
	color: #64748b;
}

#obj_list1.dash-view-rows .alarm-limits-cell {
	display: none;
}

#obj_list1.dash-view-rows .device-card-meta {
	position: static;
	grid-column: 6;
	grid-row: 1;
	justify-self: end;
	gap: 6px;
}

#obj_list1.dash-view-rows .device-battery__icon {
	width: 16px;
	height: 16px;
}

#obj_list1.dash-view-rows .device-signal__icon {
	width: 15px;
	height: 15px;
}

#obj_list1.dash-view-rows .device-battery__value {
	font-size: 11px;
}

#obj_list1.dash-view-rows .device-status-chip {
	padding: 2px 6px;
	font-size: 10px;
}

#obj_list1.dash-view-rows .device-status-dot {
	width: 8px;
	height: 8px;
	flex-basis: 8px;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .dash-card-handle {
	grid-column: 1;
	grid-row: 1;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .dash-cell--zone {
	grid-column: 2;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .dash-cell--obj {
	grid-column: 3;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .dash-cell--dev {
	grid-column: 4;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .dash-cell--time {
	grid-column: 5;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .monitoring-sensor-grid {
	grid-column: 6;
}

#pan_m2.is-dash-edit #obj_list1.dash-view-rows .device-card-meta {
	grid-column: 7;
}

@media (max-width: 767px) {
	.dash-head {
		align-items: stretch;
	}

	.dash-head__tools {
		width: 100%;
		justify-content: flex-end;
		padding-bottom: 10px;
	}

	/* Mobile rows-mode: не таблица-строка, а отдельные мини-карточки */
	.dash-table.is-rows {
		overflow: visible;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.dash-table.is-rows .dash-table__head {
		display: none;
	}

	#obj_list1.dash-view-rows .monitoring-card {
		min-width: 0 !important;
	}
}

.monitoring-card {
	container-type: inline-size;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Desktop tiles: top inset matches .device-card-meta (14px), so title/star align with battery/signal */
@media (min-width: 768px) {
	#obj_list1:not(.dash-view-rows) .monitoring-card,
	#pado_1_data .monitoring-card {
		padding: 14px 20px 20px;
	}

	#obj_list1:not(.dash-view-rows) .device-card-meta,
	#pado_1_data .device-card-meta {
		top: 14px;
		right: 20px;
	}
}

.monitoring-sensor-grid {
	align-items: stretch;
}

.monitoring-sensor-grid > .param-card {
	height: 100%;
}

.device-card-summary {
	padding-right: 118px;
}

.device-location-data {
	margin-top: 4px;
	color: #64748b;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	line-height: 1.4;
}

.device-telemetry[hidden] {
	display: none;
}

.offline .device-telemetry,
.pending .device-telemetry {
	display: none;
}

.device-battery {
	--battery-color: #94a3b8;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--battery-color);
}

.device-battery__icon {
	width: 20px;
	height: 20px;
	flex: none;
}

.device-battery.blev_0 { --battery-color: #ef4444; }
.device-battery.blev_1 { --battery-color: #f59e0b; }
.device-battery.blev_2 { --battery-color: #22c55e; }
.device-battery.blev_3 { --battery-color: #16a34a; }

.device-battery__value {
	color: #334155;
}

.device-battery__segment {
	opacity: .18;
}

.device-battery.blev_0 .device-battery__segment--1,
.device-battery.blev_1 .device-battery__segment--1,
.device-battery.blev_2 .device-battery__segment--1,
.device-battery.blev_2 .device-battery__segment--2,
.device-battery.blev_3 .device-battery__segment {
	opacity: 1;
}

.device-signal {
	--signal-color: #94a3b8;
	display: inline-flex;
	align-items: center;
	color: var(--signal-color);
}

.device-signal__icon {
	width: 19px;
	height: 19px;
	flex: none;
}

.device-signal.slev_0 { --signal-color: #ef4444; }
.device-signal.slev_1 { --signal-color: #f59e0b; }
.device-signal.slev_2,
.device-signal.slev_3 { --signal-color: #16a34a; }

.device-signal__segment {
	opacity: .18;
}

.device-signal.slev_0 .device-signal__segment--1,
.device-signal.slev_1 .device-signal__segment--1,
.device-signal.slev_1 .device-signal__segment--2,
.device-signal.slev_2 .device-signal__segment--1,
.device-signal.slev_2 .device-signal__segment--2,
.device-signal.slev_2 .device-signal__segment--3,
.device-signal.slev_3 .device-signal__segment {
	opacity: 1;
}

.alarm-limits-cell {
	flex: 0 0 auto;
	padding-left: 10px;
	white-space: nowrap;
}

.param-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-sizing: border-box;
	min-height: 72px;
}

.param-card-name {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.param-card-body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
	margin-top: 4px;
}

.param-card-value {
	min-width: 0;
	flex: 1 1 auto;
	white-space: nowrap;
}

.zone-param-card__name {
	white-space: nowrap;
}

.alarm-limits {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	min-height: 0;
}

.alarm-limit {
	display: block;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.25;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
}

.alarm-limit--empty {
	background: transparent;
	color: #94a3b8;
	font-size: 13px;
	font-weight: 500;
	padding: 0;
	min-height: auto;
}

/* Scheme object switcher (Контроль → Схема) */
.scheme-panel {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	max-width: none;
}

.scheme-panel__card {
	width: 100%;
	max-width: none;
}

.scheme-panel > .app-empty {
	width: 100%;
	min-height: min(52vh, 420px);
}

.scheme-obj-picker {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	width: 100%;
}

.scheme-obj-picker__title-row {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

.scheme-obj-picker__title-wrap {
	display: flex;
	flex: 0 1 360px;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
	width: min(360px, 100%);
	min-width: 0;
}

.scheme-obj-picker__title-wrap .app-select {
	width: 100%;
	max-width: 360px;
}

.scheme-obj-picker__title-wrap .app-select__trigger {
	height: 42px;
	min-height: 42px;
	font-size: 14px;
	font-weight: 500;
}

.scheme-obj-picker__title-row .object-scheme__title {
	flex: 1 1 auto;
	min-width: 0;
	align-self: center;
}

.scheme-obj-picker__title-row .object-scheme__edit {
	flex: 0 0 auto;
	align-self: flex-end;
	min-height: 42px;
	margin: 0;
}

.scheme-obj-picker__label {
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.scheme-obj-picker__title-select {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	min-height: 42px;
	padding: 0 36px 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	color: #0f172a;
	font-size: 18px;
	font-weight: 650;
	line-height: 1.3;
	cursor: pointer;
}

.scheme-obj-picker__title-select:hover,
.scheme-obj-picker__title-select:focus {
	border-color: #cbd5e1;
	outline: none;
}

.scheme-switcher__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	min-width: 0;
}

.scheme-switcher__chip {
	flex: 0 0 auto;
	min-height: 36px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--ui-control-radius, 10px);
	background: var(--ui-secondary, #e9edf3);
	color: var(--ui-text, #1f2937);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .16s ease, color .16s ease;
}

.scheme-switcher__chip:hover {
	background: var(--ui-secondary-hover, #dfe5ec);
}

.scheme-switcher__chip.is-active {
	background: #fff;
	color: var(--ui-primary);
}

.scheme-switcher__chip.is-active:hover {
	background: #fff;
}

@media (max-width: 640px) {
	.scheme-switcher__chips {
		display: none;
	}

	.scheme-obj-picker__title-select {
		min-width: 0;
		font-size: 16px;
	}

	.scheme-obj-picker__title-wrap {
		flex: 1 1 100%;
		width: 100%;
	}
}

/* Object mnemoscheme / plan */
.object-scheme {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	max-width: none;
}

.object-scheme__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: nowrap;
}

.object-scheme__heading {
	flex: 1 1 auto;
	min-width: 0;
}

.object-scheme__title {
	margin: 0;
	color: #0f172a;
	font-size: 18px;
	font-weight: 650;
	line-height: 1.3;
}

.object-scheme__hint {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.object-scheme--readonly .object-scheme__header + .app-empty,
.object-scheme--readonly .object-scheme__header + .object-scheme__empty {
	margin-top: var(--ui-space-4, 16px);
}

.object-scheme__tools {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	margin-left: auto;
}

.object-scheme__edit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	background: #f1f5f9;
	color: #334155;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
}

.object-scheme__edit:hover {
	background: #e2e8f0;
}

.object-scheme__edit svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.object-scheme__editor {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.object-scheme__file {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #64748b;
	font-size: 13px;
}

.object-scheme__actions {
	display: flex;
	gap: 8px;
}

.object-scheme__canvas {
	position: relative;
	overflow: hidden;
	width: 100%;
	border: 1px solid #e8eef5;
	border-radius: 18px;
	background:
		radial-gradient(circle at 1px 1px, rgba(148, 163, 184, .28) 1px, transparent 0) 0 0 / 18px 18px,
		#f8fafc;
}

.object-scheme__image {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

.object-scheme__layers {
	position: absolute;
	inset: 0;
	/* auto: иначе на iOS hit-test к детям с pointer-events:auto часто ломается */
	pointer-events: auto;
	z-index: 2;
}

.object-scheme__banner {
	display: none !important;
}

.scheme-zone {
	position: absolute;
	z-index: 2;
	box-sizing: border-box;
	min-width: 132px;
	max-width: 200px;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 14px;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
	backdrop-filter: blur(8px);
	color: #0f172a;
	cursor: pointer;
	pointer-events: auto;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transform: translateZ(0);
	transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.object-scheme__empty {
	padding: 28px;
	border: 0;
	border-radius: 16px;
	background: #f8fafc;
	color: #64748b;
	text-align: center;
}

.object-scheme__empty-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(248, 250, 252, .92);
}

.object-scheme__empty-overlay .app-empty {
	min-height: 0;
	border: 0;
	background: transparent;
	padding: 12px;
}

.object-scheme__canvas.is-editing .object-scheme__empty-overlay {
	display: none;
}

.scheme-zone:hover {
	border-color: rgba(33, 125, 255, .28);
	box-shadow: 0 14px 32px rgba(15, 23, 42, .18);
}

.scheme-zone__head {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 6px;
	min-width: 0;
}

.scheme-zone__status {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.scheme-zone__title {
	overflow: hidden;
	color: #0f172a;
	font-size: 12px;
	font-weight: 650;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.scheme-zone__metrics {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.scheme-zone__metric {
	display: flex;
	align-items: baseline;
	gap: 4px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.scheme-zone__value {
	color: #0f172a;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.3;
}

.scheme-zone__unit {
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
}

.scheme-zone.offline .scheme-zone__status {
	background: #94a3b8;
	box-shadow: 0 0 0 3px rgba(148, 163, 184, .16);
}

.scheme-zone.pending .scheme-zone__status {
	background: transparent;
	border: 2px solid rgba(33, 125, 255, .25);
	border-top-color: #217dff;
	box-shadow: none;
	animation: device-status-spin .65s linear infinite;
}

.scheme-zone.zalarm {
	border-color: rgba(225, 29, 72, .28);
}

.scheme-zone.zalarm .scheme-zone__status {
	background: #e11d48;
	box-shadow: 0 0 0 3px rgba(225, 29, 72, .14);
}

.scheme-zone.zalarm .scheme-zone__value {
	color: #be123c;
}

.object-scheme__canvas.is-editing .scheme-zone {
	outline: 2px solid rgba(33, 125, 255, .45);
	outline-offset: 2px;
	cursor: move;
	touch-action: none;
}

.object-scheme__canvas.is-editing .scheme-zone.is-dragging {
	outline-color: #217dff;
	box-shadow: 0 16px 36px rgba(33, 125, 255, .22);
	z-index: 5;
}

@media (max-width: 720px) {
	.scheme-zone {
		min-width: 148px;
		max-width: min(220px, 46vw);
		padding: 12px 14px;
		font-size: 15px;
	}

	.scheme-zone__value {
		font-size: 16px;
	}

	.object-scheme__edit {
		min-height: 40px;
	}
}

#pado_5 {
	overflow: visible;
}

.app-lucide-icon {
	display: block;
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	stroke-width: 2;
}

.sensor-summary-icon {
	width: 26px;
	height: 26px;
}

.sensor-inline-icon {
	width: 17px;
	height: 17px;
	color: #334155;
}

.sensor-chart-icon {
	width: 20px;
	height: 20px;
	color: #217dff;
}

.chart-card-heading {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 9px;
	margin: 0;
	color: #172033;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.chart-data-card {
	position: relative;
	/* не clip'ать ползунки range-slider; скругление карточки и так через border-radius */
	overflow: visible;
	border-color: #eef2f7 !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 10px 28px rgba(15, 23, 42, .04);
	padding: 1rem .85rem .7rem !important;
}

/* Логические датчики (type 13): лента событий вместо графика 0/1 */
.chart-data-card--logical {
	overflow: visible;
}

.zone-logical-events {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	padding: 4px 2px 8px;
}

.zone-logical-events__now {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
	padding: 12px 14px;
	border: 1px solid #e2e8f0;
	border-radius: var(--ui-radius-control, 12px);
	background: #f8fafc;
}

.zone-logical-events__now-label {
	color: #94a3b8;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
}

.zone-logical-events__since {
	color: #64748b;
	font-size: 13px;
}

.zone-logical-events__list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 360px;
	overflow-y: auto;
	border: 1px solid #eef2f7;
	border-radius: var(--ui-radius-control, 12px);
	background: #fff;
}

.zone-logical-events__row {
	display: grid;
	grid-template-columns: minmax(120px, 150px) minmax(90px, 1fr) auto;
	align-items: center;
	gap: 10px 14px;
	padding: 10px 14px;
	border-bottom: 1px solid #f1f5f9;
	font-size: 14px;
}

.zone-logical-events__row:last-child {
	border-bottom: 0;
}

.zone-logical-events__time {
	color: #475569;
	font-variant-numeric: tabular-nums;
	font-size: 13px;
}

.zone-logical-events__state {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	width: fit-content;
}

.zone-logical-events__state--0 {
	background: #f1f5f9;
	color: #475569;
}

.zone-logical-events__state--1 {
	background: #eef4ff;
	color: #1d4ed8;
}

.zone-logical-events__hint {
	color: #94a3b8;
	font-size: 12px;
	text-align: right;
}

.zone-logical-events__meta {
	color: #94a3b8;
	font-size: 12px;
	padding: 0 2px;
}

.zone-logical-events__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-height: 160px;
	padding: 24px 16px;
	color: #64748b;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.zone-logical-events__empty span {
	font-size: 13px;
	font-weight: 400;
	color: #94a3b8;
}

@media (max-width: 640px) {
	.zone-logical-events__row {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"time state"
			"hint hint";
	}

	.zone-logical-events__time { grid-area: time; }
	.zone-logical-events__state { grid-area: state; justify-self: end; }
	.zone-logical-events__hint { grid-area: hint; text-align: left; }
}

/* чётче WebGL-линия на retina / мобилках */
.chart-data-card .js-plotly-plot .gl-container canvas,
.chart-data-card .js-plotly-plot canvas {
	image-rendering: auto;
	-webkit-font-smoothing: antialiased;
}

/* Plotly drag-слои не нужны (dragmode:false) и на мобилке перекрывают кнопки шапки */
.chart-data-card .js-plotly-plot .draglayer,
.chart-data-card .js-plotly-plot .nsewdrag,
.chart-data-card .js-plotly-plot .nsdrag,
.chart-data-card .js-plotly-plot .ewdrag,
.chart-data-card .js-plotly-plot .nwsewdrag,
.chart-data-card .js-plotly-plot .neswdrag {
	pointer-events: none !important;
}

.js-plotly-plot,
.js-plotly-plot * {
	cursor: default !important;
}

.chart-data-card--empty,
.object-chart-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
	padding: 12px !important;
	box-shadow: none;
}

.chart-data-card--skel {
	pointer-events: none;
	cursor: default;
	min-height: 320px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.chart-skel__head {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 28px;
}

.chart-skel__icon {
	width: 22px;
	height: 22px;
	border-radius: 8px;
	flex: 0 0 22px;
}

.chart-skel__title {
	width: min(220px, 42%);
	height: 14px;
}

.chart-skel__plot {
	display: block;
	width: 100%;
	height: 260px;
	border-radius: 14px;
}

#zi_charts.is-chart-skel .chart-data-card--skel:nth-child(3n+1) .chart-skel__title { width: min(180px, 36%); }
#zi_charts.is-chart-skel .chart-data-card--skel:nth-child(3n+2) .chart-skel__title { width: min(240px, 48%); }
#zi_charts.is-chart-skel .chart-data-card--skel:nth-child(3n) .chart-skel__title { width: min(200px, 40%); }

#obj_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n+1) .chart-skel__title { width: min(180px, 36%); }
#obj_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n+2) .chart-skel__title { width: min(240px, 48%); }
#obj_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n) .chart-skel__title { width: min(200px, 40%); }

#vis_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n+1) .chart-skel__title,
#rep_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n+1) .chart-skel__title { width: min(180px, 36%); }
#vis_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n+2) .chart-skel__title,
#rep_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n+2) .chart-skel__title { width: min(240px, 48%); }
#vis_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n) .chart-skel__title,
#rep_chart_.is-chart-skel .chart-data-card--skel:nth-child(3n) .chart-skel__title { width: min(200px, 40%); }

.chart-data-card--empty .app-empty,
.object-chart-empty .app-empty {
	width: 100%;
	border: 0;
	min-height: 220px;
	padding: 36px 24px;
}

.chart-card-header {
	display: flex;
	position: relative;
	z-index: 4;
	min-height: 36px;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	margin-bottom: 8px;
}

.chart-card-tools {
	display: none;
}

.chart-card-insights,
.chart-card-actions {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 6px;
}

.chart-card-insights {
	flex: 1 1 auto;
	flex-wrap: wrap;
}

.chart-card-stat {
	display: inline-flex;
	min-height: 28px;
	align-items: baseline;
	gap: 5px;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	background: #f1f5f9;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.chart-card-stat small {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 500;
}

.chart-card-stat strong {
	color: #1e293b;
	font-size: 12px;
	font-weight: 650;
}

.chart-card-actions {
	flex: 0 0 auto;
	margin-left: auto;
	gap: 4px;
}

.chart-zoom-hint {
	margin-right: 4px;
	color: #a0aec0;
	font-size: 11px;
	white-space: nowrap;
}

.chart-card-legend {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	min-width: 0;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.chart-legend-chip {
	display: inline-flex;
	max-width: 100%;
	min-height: 28px;
	align-items: center;
	gap: 7px;
	padding: 5px 12px;
	border: 0;
	border-radius: 999px;
	background: #f1f5f9;
	box-shadow: none;
	color: #334155;
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	transition: background-color .15s ease, color .15s ease;
}

.chart-legend-chip:hover {
	background: #e6edf5;
}

.chart-legend-chip:focus-visible {
	outline: 2px solid #217dff;
	outline-offset: 2px;
}

.chart-legend-chip__swatch {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--chip-color);
}

.chart-legend-chip__label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chart-legend-chip.is-off {
	background: transparent;
	color: #94a3b8;
}

.chart-legend-chip.is-off .chart-legend-chip__swatch {
	background: transparent;
	box-shadow: inset 0 0 0 1.5px #cbd5e1;
}

.chart-legend-chip.is-off:hover {
	background: #f1f5f9;
}

.chart-legend-chip:active {
	transform: translateY(0);
}

.chart-tool-button {
	display: grid;
	box-sizing: border-box;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	position: relative;
	z-index: 5;
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.chart-tool-button:hover {
	background: #f1f5f9;
	color: #334155;
}

.chart-tool-button:active {
	transform: scale(.96);
	background: #e8eef5;
}

.chart-tool-button:focus-visible {
	outline: 2px solid rgba(33, 125, 255, .28);
	outline-offset: 2px;
}

.chart-tool-button svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.chart-data-card .recharts-responsive-container .js-plotly-plot,
.chart-data-card .recharts-responsive-container .plot-container {
	width: 100% !important;
	height: 100% !important;
}
.chart-data-card .recharts-responsive-container .svg-container {
	width: 100% !important;
}
.chart-data-card .hoverlayer {
	display: none !important;
}
.chart-data-card .hoverlayer .hovertext {
	font-family: var(--ui-font) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
}
.chart-data-card .hoverlayer .hovertext path {
	stroke: #94a3b8 !important;
	stroke-width: 1.25px !important;
	filter: drop-shadow(0 6px 16px rgba(15, 23, 42, .18));
}
.chart-data-card .hoverlayer .hovertext text {
	font-size: 13px !important;
	font-weight: 600 !important;
	fill: #0f172a !important;
}
html[data-theme="dark"] .chart-data-card .hoverlayer .hovertext text {
	fill: #f1f5f9 !important;
}
html[data-theme="dark"] .chart-data-card .hoverlayer .hovertext path {
	stroke: #64748b !important;
	filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .45));
}

.anychart-tooltip {
	padding: 9px 11px !important;
	border: 1px solid rgba(15, 23, 42, .12) !important;
	border-radius: 10px !important;
	background: rgba(255, 255, 255, .97) !important;
	color: #273449 !important;
	font-family: inherit !important;
	font-size: 12px !important;
	line-height: 1.45 !important;
	box-shadow: 0 10px 30px rgba(31, 51, 78, .16) !important;
	backdrop-filter: blur(8px);
}

.chart-data-card .recharts-responsive-container {
	height: 360px !important;
	position: relative;
	margin: 0 -8px;
	width: calc(100% + 16px) !important;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	cursor: crosshair;
	box-shadow: none !important;
	overscroll-behavior: contain;
}

.chart-range-ui {
	margin: 4px 0 2px;
	padding: 0 9px 4px;
	width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

.chart-range-badge {
	text-align: center;
	font-family: var(--ui-font);
	font-size: 12px;
	font-weight: 650;
	line-height: 1.3;
	color: #334155;
	margin: 0 0 6px;
	letter-spacing: .01em;
}

.chart-range-scroller {
	position: relative;
	height: 36px;
	border-radius: 10px;
	/* visible: иначе круглые ручки на 0%/100% режутся пополам */
	overflow: visible;
	touch-action: none;
	user-select: none;
	/* без серой «дорожки» — незанятый край не торчит серым обрубком */
	background: transparent;
}

.chart-range-spark {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 36px;
	pointer-events: none;
	border-radius: 10px;
	background: transparent;
}

.chart-range-mask {
	position: absolute;
	top: 0;
	bottom: 0;
	background: rgba(255, 255, 255, .78);
	pointer-events: none;
	z-index: 1;
	border-radius: 0;
}

.chart-range-mask--left {
	left: 0;
	border-radius: 10px 0 0 10px;
}

.chart-range-mask--right {
	right: 0;
	border-radius: 0 10px 10px 0;
}

.chart-range-window {
	position: absolute;
	top: 0;
	bottom: 0;
	border: 1.5px solid #217dff;
	border-radius: 7px;
	background: rgba(33, 125, 255, .10);
	cursor: grab;
	box-sizing: border-box;
	z-index: 2;
	will-change: left, width;
}

.chart-range-window:active {
	cursor: grabbing;
}

.chart-range-thumb {
	position: absolute;
	top: 50%;
	width: 14px;
	height: 22px;
	margin-left: -7px;
	transform: translateY(-50%);
	border: 0;
	border-radius: 6px;
	background: #ffffff;
	box-shadow: 0 0 0 1.5px #217dff, 0 2px 6px rgba(15, 23, 42, .16);
	cursor: ew-resize;
	padding: 0;
	z-index: 3;
	will-change: left;
}

.chart-range-thumb:focus-visible {
	outline: 2px solid #217dff;
	outline-offset: 2px;
}

html[data-theme="dark"] .chart-range-badge {
	color: #e2e8f0 !important;
}

html[data-theme="dark"] .chart-range-scroller {
	background: #1b2635 !important;
	box-shadow: inset 0 0 0 1px rgba(42, 54, 72, .9);
}

html[data-theme="dark"] .chart-range-spark {
	background: #1b2635 !important;
}

html[data-theme="dark"] .chart-range-mask {
	background: rgba(15, 23, 36, .72) !important;
}

html[data-theme="dark"] .chart-range-window {
	border-color: #69a7fa !important;
	background: rgba(105, 167, 250, .14) !important;
}

html[data-theme="dark"] .chart-range-thumb {
	background: #e7edf5 !important;
	box-shadow: 0 0 0 1.5px #69a7fa, 0 2px 6px rgba(0, 0, 0, .35) !important;
}

.chart-sync-cursor {
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	border-left: 1.5px solid rgba(71, 85, 105, .92);
	pointer-events: none;
	z-index: 40;
	display: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	will-change: transform;
}

html[data-theme="dark"] .chart-sync-cursor {
	border-left-color: rgba(226, 232, 240, .9);
}

.chart-sync-points {
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	z-index: 41;
	display: none;
}

.chart-sync-point {
	position: absolute;
	width: 12px;
	height: 12px;
	margin-left: -6px;
	margin-top: -6px;
	border-radius: 50%;
	border: 2.5px solid #ffffff;
	box-shadow: 0 0 0 1.5px currentColor, 0 2px 8px rgba(15, 23, 42, .28);
	box-sizing: border-box;
	pointer-events: none;
	will-change: transform;
}

html[data-theme="dark"] .chart-sync-point {
	border-color: #151f2d;
}

.chart-sync-tip {
	position: absolute;
	z-index: 42;
	display: none;
	pointer-events: none;
	min-width: 120px;
	max-width: 220px;
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, .85);
	background: rgba(255, 255, 255, .98);
	box-shadow: 0 8px 22px rgba(15, 23, 42, .16);
	font-family: var(--ui-font);
	color: #0f172a;
	box-sizing: border-box;
	will-change: transform;
}

.chart-sync-tip__time {
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 4px;
	line-height: 1.3;
}

.chart-sync-tip__row {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
}

.chart-sync-tip__row i {
	display: inline-block;
	width: 14px;
	height: 3px;
	border-radius: 2px;
	flex: 0 0 auto;
}

html[data-theme="dark"] .chart-sync-tip {
	background: rgba(21, 31, 45, .98);
	border-color: #64748b;
	color: #f1f5f9;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
}

.chart-data-card:hover .recharts-responsive-container {
	border-color: transparent;
}

.chart-data-card--zoomed .recharts-responsive-container {
	border-color: transparent;
	box-shadow: none;
}

.chart-data-card:fullscreen,
.chart-data-card:-webkit-full-screen {
	box-sizing: border-box;
	width: 100vw;
	height: 100vh;
	padding: 24px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #fff;
	overflow: visible;
	position: relative;
}

.chart-data-card--expanded {
	position: fixed !important;
	inset: 0 !important;
	z-index: 120 !important;
	box-sizing: border-box;
	width: 100vw !important;
	height: 100dvh !important;
	max-width: none !important;
	margin: 0 !important;
	border-radius: 0 !important;
	padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
	background: #fff !important;
	overflow: auto !important;
	box-shadow: none !important;
}

html.is-chart-expanded,
html.is-chart-expanded body {
	overflow: hidden !important;
}

html[data-theme="dark"] .chart-data-card--expanded {
	background: #151f2d !important;
}

.chart-data-card:fullscreen .recharts-responsive-container,
.chart-data-card:-webkit-full-screen .recharts-responsive-container,
.chart-data-card--expanded .recharts-responsive-container {
	height: calc(100vh - 132px) !important;
	height: calc(100dvh - 132px) !important;
}

.chart-tool-button--fs-settings {
	display: none;
}

.chart-data-card:fullscreen .chart-tool-button--fs-settings,
.chart-data-card:-webkit-full-screen .chart-tool-button--fs-settings {
	display: grid;
}

.chart-fs-settings-backdrop {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 40;
	background: rgba(15, 23, 42, .34);
	backdrop-filter: blur(2px);
}

.chart-fs-settings {
	display: none;
	position: absolute;
	top: 64px;
	right: 24px;
	left: auto;
	z-index: 50;
	width: min(380px, calc(100% - 48px));
	padding: 18px;
	border: 1px solid #e6ebf2;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 22px 50px rgba(15, 23, 42, .18);
}

.chart-data-card:fullscreen .chart-fs-settings-backdrop.is-open,
.chart-data-card:-webkit-full-screen .chart-fs-settings-backdrop.is-open {
	display: block;
}

.chart-data-card:fullscreen .chart-fs-settings.is-open,
.chart-data-card:-webkit-full-screen .chart-fs-settings.is-open {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.chart-fs-settings__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.chart-fs-settings__title {
	margin: 0;
	color: #0f172a;
	font-size: 16px;
	font-weight: 650;
	letter-spacing: -.01em;
}

.chart-fs-settings__close {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
}

.chart-fs-settings__close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.chart-fs-settings__close svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.chart-fs-settings__hint {
	margin: -4px 0 0;
	color: #94a3b8;
	font-size: 12px;
	line-height: 1.35;
}

.chart-fs-periods {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.chart-fs-hrs {
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	color: #334155;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.chart-fs-hrs:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.chart-fs-hrs.is-active {
	border-color: transparent;
	background: var(--ui-primary-gradient);
	color: #fff;
	box-shadow: none;
}

.chart-fs-settings__dates {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.chart-fs-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.chart-fs-field span {
	color: #64748b;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.chart-fs-field input.linec,
.chart-fs-field select {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	color: #0f172a;
	font: inherit;
	font-size: 13px;
}

.chart-fs-field select {
	padding-right: 36px;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
}

.chart-fs-field--tz {
	display: flex;
}

.chart-fs-settings__foot {
	display: flex;
	padding-top: 2px;
}

.chart-fs-settings__apply {
	width: 100%;
	min-height: 44px;
	border: 0;
	border-radius: 12px;
	background: var(--ui-primary-gradient);
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	box-shadow: none;
}

.chart-fs-settings__apply:hover {
	background: var(--ui-primary-gradient-hover);
}

.chart-fs-settings__apply:active {
	background: var(--ui-primary-gradient-active);
}

.chart-fs-loader {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 35;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, .55);
	backdrop-filter: blur(1.5px);
}

.chart-data-card:fullscreen .chart-fs-loader.is-open,
.chart-data-card:-webkit-full-screen .chart-fs-loader.is-open,
.chart-data-card--loading .chart-fs-loader.is-open {
	display: flex;
}

.chart-fs-loader__box {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 999px;
	background: #0f172a;
	color: #fff;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .22);
	font-size: 13px;
	font-weight: 500;
}

.chart-fs-loader__spin {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: chart-fs-spin .7s linear infinite;
}

@keyframes chart-fs-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
	.chart-card-header {
		align-items: flex-start;
		flex-wrap: wrap;
		gap: 8px;
	}

	.chart-card-heading {
		flex: 1 1 auto;
	}

	.chart-card-insights {
		order: 3;
		flex: 1 1 100%;
	}

	.chart-card-legend {
		order: 2;
		flex: 1 1 auto;
	}

	.chart-card-actions {
		margin-left: auto;
		justify-content: flex-end;
	}

	.chart-zoom-hint {
		display: none;
	}
}

@media (max-width: 560px) {
	.chart-card-stat {
		padding: 4px 7px;
	}

	.chart-zoom-hint {
		display: none;
	}

	.chart-card-actions {
		justify-content: flex-end;
		gap: 2px;
		position: relative;
		z-index: 6;
	}

	.chart-tool-button {
		width: 40px;
		height: 40px;
		flex: 0 0 40px;
		border-radius: 12px;
	}

	.chart-tool-button svg {
		width: 20px;
		height: 20px;
	}
}

.zone-kind-icon {
	width: 17px;
	height: 17px;
	color: #fff;
}

.sensor-setting-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	color: #217dff;
	background: #eef6ff;
	border: 1px solid #dbeafe;
	border-radius: 9px;
}

.sensor-setting-icon__svg {
	width: 18px;
	height: 18px;
}

/* Zone settings: one surface, sections by divider — no nested cards (match object settings). */
.zone-settings-card {
	overflow: hidden;
	border: 1px solid #e8edf3;
	border-radius: var(--ui-radius-lg);
	background: #fff;
}

.zone-settings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-5);
	padding: var(--ui-space-5) var(--ui-space-6);
	border-bottom: 1px solid #eef2f7;
	background: #fff;
	transition: background-color .16s ease;
}

.zone-settings-card.is-editing .zone-settings-header {
	background: #f8fbff;
}

.zone-settings-header h3 {
	margin: 0;
	color: #172033;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.zone-settings-header p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.zone-settings-header .ui-button svg {
	width: 17px;
	height: 17px;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.zone-settings-actions {
	display: flex;
	align-items: center;
	gap: var(--ui-space-2);
}

.zone-settings-content {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: var(--ui-space-2) var(--ui-space-6) var(--ui-space-6);
}

.zone-settings-section {
	min-width: 0;
	padding: var(--ui-space-6) 0;
	border: 0;
	border-radius: 0;
	background: transparent;
}

.zone-settings-section + .zone-settings-section {
	border-top: 1px solid #eef2f7;
}

.zone-settings-section__heading {
	display: block;
	margin-bottom: var(--ui-space-5);
}

.zone-settings-section__icon {
	display: none !important;
}

.zone-settings-section__heading h4 {
	margin: 0;
	color: #172033;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.zone-settings-section__heading p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.zone-settings-fields {
	display: grid;
	gap: var(--ui-space-4);
	max-width: 560px;
}

.zone-settings-field label {
	display: block;
	margin-bottom: 7px;
	color: #475569;
	font-size: 14px;
	font-weight: 500;
}

.zone-settings-field input,
.zone-settings-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #cfd8e5;
	border-radius: 11px;
	background: #fff;
	color: #172033;
	font: inherit;
	font-size: 15px;
	line-height: 1.45;
	resize: vertical;
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.zone-settings-field input:focus,
.zone-settings-field textarea:focus {
	border-color: #217dff;
	outline: none;
	box-shadow: none;
}

.zone-settings-field input:disabled,
.zone-settings-field textarea:disabled {
	opacity: 1;
	border-color: #e2e8f0;
	background: #f8fafc;
	color: #334155;
	-webkit-text-fill-color: #334155;
	cursor: default;
}

.zone-switch-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 18px;
}

.zone-switch-row {
	display: flex;
	min-width: 0;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 13px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fbfcfe;
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease;
}

.is-editing .zone-switch-row:hover {
	border-color: #bfdbfe;
	background: #f7fbff;
}

.zone-settings-card:not(.is-editing) .zone-switch-row {
	cursor: default;
}

.zone-switch-row__copy {
	display: block;
	min-width: 0;
}

.zone-switch-row__copy strong,
.zone-switch-row__copy small {
	display: block;
}

.zone-switch-row__copy strong {
	color: #273449;
	font-size: 15px;
	font-weight: 600;
}

.zone-switch-row__copy small {
	margin-top: 3px;
	color: #718096;
	font-size: 13px;
	line-height: 1.35;
}

.zone-switch {
	position: relative;
	display: inline-flex;
	width: 44px;
	height: 26px;
	flex: 0 0 44px;
}

.zone-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.zone-switch__track {
	position: relative;
	display: block;
	width: 44px;
	height: 26px;
	border-radius: 999px;
	background: #cfd5de;
	transition: background-color .18s ease, opacity .18s ease;
}

.zone-switch__track::after {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
	content: "";
	transition: transform .18s ease;
}

.zone-switch input:checked + .zone-switch__track {
	background: #005bff;
}

.zone-switch input:checked + .zone-switch__track::after {
	transform: translateX(18px);
}

.zone-switch input:focus-visible + .zone-switch__track {
	outline: 3px solid rgba(0, 91, 255, .25);
	outline-offset: 2px;
}

.zone-switch input:disabled + .zone-switch__track {
	opacity: .58;
}

/* notification-switch — тот же размер трека, что zone-switch */
.notification-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: auto;
	min-height: 26px;
	flex: 0 0 auto;
	cursor: pointer;
}

.notification-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.notification-switch__track {
	position: relative;
	display: block;
	width: 44px;
	height: 26px;
	flex: 0 0 44px;
	border-radius: 999px;
	background: #cfd5de;
	transition: background-color .18s ease, opacity .18s ease;
}

.notification-switch__track::after {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
	content: "";
	transition: transform .18s ease;
}

.notification-switch input:checked + .notification-switch__track {
	background: #005bff;
}

.notification-switch input:checked + .notification-switch__track::after {
	transform: translateX(18px);
}

.notification-switch input:focus-visible + .notification-switch__track {
	outline: 3px solid rgba(0, 91, 255, .25);
	outline-offset: 2px;
}

.notification-switch input:disabled + .notification-switch__track {
	opacity: .58;
}

.notification-switch__state {
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.notification-switch input:checked ~ .notification-switch__state {
	color: #005bff;
}

.zone-parameter-list {
	display: grid;
	gap: 0;
	max-width: 640px;
}

.zone-parameter-row {
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--ui-space-3);
	min-height: 56px;
	padding: var(--ui-space-3) 0;
	border: 0;
	border-bottom: 1px solid #f1f5f9;
	border-radius: 0;
	background: transparent;
}

.zone-parameter-row:last-child {
	border-bottom: 0;
}

.zone-parameter-icon {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: var(--ui-radius-sm);
	background: #f1f5f9;
	color: #475569;
}

.zone-parameter-icon__svg {
	width: 19px;
	height: 19px;
}

.zone-parameter-copy {
	min-width: 0;
}

.zone-parameter-copy strong {
	display: block;
	overflow: hidden;
	color: #273449;
	font-size: 15px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zone-parameter-copy > span {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 3px;
	overflow: hidden;
	color: #718096;
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zone-parameter-copy i {
	display: block;
	width: 3px;
	height: 3px;
	flex: 0 0 3px;
	border-radius: 50%;
	background: #cbd5e1;
}

.zone-parameter-action {
	display: inline-flex;
	min-height: 34px;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 7px 10px;
	border: 1px solid transparent;
	border-radius: 9px;
	background: var(--ui-control-bg, #f3f4f6);
	color: #1769e8;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.zone-parameter-action:hover:not(:disabled) {
	border-color: transparent;
	background: #eef6ff;
}

.zone-parameter-action:disabled {
	border-color: transparent;
	background: #f1f5f9;
	color: #94a3b8;
	cursor: not-allowed;
}

.zone-parameter-action__icon {
	width: 15px;
	height: 15px;
}

.zone-parameter-badge {
	padding: 5px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #64748b;
	font-size: 12px;
	white-space: nowrap;
}

/* Alert-rule editor: same flat surface language as zone/object settings. */
.notification-settings-layout {
	display: grid;
	grid-template-areas: "rules options";
	grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr);
	min-height: 0;
}

.notification-rules-pane {
	grid-area: rules;
	min-width: 0;
	padding: var(--ui-space-6);
}

.notification-options-pane {
	display: block;
	grid-area: options;
	min-width: 0;
	border-left: 1px solid #eef2f7;
	background: #fff;
}

.notification-pane-heading {
	display: block;
	margin-bottom: var(--ui-space-5);
}

.notification-pane-heading .zone-settings-section__icon {
	display: none !important;
}

.notification-pane-heading h4,
.notification-sidebar-heading h4 {
	margin: 0;
	color: #172033;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.notification-pane-heading p,
.notification-sidebar-heading p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.notification-rules-columns,
.notification-rule-row {
	display: grid;
	grid-template-columns: minmax(200px, 1.2fr) repeat(2, minmax(120px, .8fr));
	align-items: center;
	column-gap: var(--ui-space-4);
}

.notification-rules-columns {
	padding: 0 0 8px;
	color: #94a3b8;
	font-size: 12px;
	font-weight: 600;
}

.notification-rules-list {
	border-top: 1px solid #eef2f7;
	border-bottom: 0;
}

.notification-rule-row {
	min-height: 64px;
	padding: var(--ui-space-4) 0;
}

.notification-rule-row + .notification-rule-row {
	border-top: 1px solid #f1f5f9;
}

.notification-rule-parameter {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: var(--ui-space-3);
}

.notification-rule-parameter .sensor-setting-icon {
	width: 32px;
	height: 32px;
	flex-basis: 32px;
}

.notification-rule-copy {
	min-width: 0;
}

.notification-rule-copy h4 {
	margin: 0;
	overflow: hidden;
	color: #273449;
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.notification-rule-copy p {
	margin: 2px 0 0;
	color: #718096;
	font-size: 12px;
	line-height: 1.35;
}

.notification-sidebar-section {
	padding: var(--ui-space-6);
}

.notification-sidebar-section + .notification-sidebar-section {
	border-top: 1px solid #eef2f7;
}

.notification-sidebar-heading {
	margin-bottom: var(--ui-space-4);
}

.notification-setting-row {
	display: flex;
	min-height: 56px;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-3);
	border-top: 1px solid #f1f5f9;
}

.notification-setting-row > span:first-child {
	min-width: 0;
}

.notification-setting-row strong,
.notification-setting-row small {
	display: block;
}

.notification-setting-row strong {
	color: #273449;
	font-size: 14px;
	font-weight: 600;
}

.notification-setting-row small {
	margin-top: 2px;
	color: #718096;
	font-size: 12px;
	line-height: 1.35;
}

.notification-color-button {
	display: inline-flex;
	min-height: 38px;
	align-items: center;
	gap: 8px;
	padding: 6px 10px 6px 7px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg, #f3f4f6);
	color: #334155;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease, opacity .16s ease;
}

.notification-color-button:hover:not(:disabled) {
	border-color: transparent;
	background: #f7fbff;
}

.notification-color-button:disabled {
	opacity: .58;
	cursor: default;
}

#zs_color_preview,
.notification-color-preview {
	display: block;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	border: 2px solid #fff;
	border-radius: 7px;
	box-shadow: 0 0 0 1px #cbd5e1;
}

.notification-sidebar-fields {
	display: grid;
	gap: 16px;
}

.notification-field label {
	display: block;
	margin-bottom: 6px;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
}

.notification-field > select,
.notification-field > .app-select,
.notification-field__control {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}

.notification-field > .app-select .app-select__trigger {
	height: 44px;
	padding: 0 11px 0 12px;
	font-size: 15px;
	background: var(--ui-control-bg, #f3f4f6);
	border-color: transparent;
	border-radius: 10px;
}

.notification-field > .app-select.app-select--open .app-select__trigger,
.notification-field > .app-select .app-select__trigger:focus-visible {
	border-color: #217dff;
	background: #fff;
	box-shadow: none;
}

.notification-field > .app-select.app-select--disabled .app-select__trigger {
	border-color: transparent;
	background: #f4f7fa;
	color: #64748b;
}

.notification-field > select,
.notification-field__control {
	height: 44px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg, #f3f4f6);
	color: #172033;
	font: inherit;
	font-size: 15px;
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.notification-field > select {
	padding: 9px 11px;
}

.notification-field > select:focus,
.notification-field__control:focus-within {
	border-color: #217dff;
	outline: none;
	box-shadow: none;
}

.notification-field > select:disabled,
.notification-field__control:has(input:disabled) {
	opacity: 1;
	border-color: transparent;
	background: #f4f7fa;
	color: #64748b;
	-webkit-text-fill-color: #64748b;
	cursor: default;
}

.notification-field__control {
	display: flex;
	align-items: center;
	overflow: hidden;
}

.notification-field__control input {
	width: 100%;
	min-width: 0;
	height: 42px;
	padding: 9px 4px 9px 11px;
	border: 0;
	outline: none;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 15px;
}

.notification-field__control span {
	padding: 0 11px 0 7px;
	color: #8491a3;
	font-size: 12px;
	white-space: nowrap;
}

.notification-field small {
	display: block;
	margin-top: 5px;
	color: #8491a3;
	font-size: 12px;
	line-height: 1.35;
}

.notification-rule-field label {
	display: none;
}

.notification-rule-field--event {
	min-width: 0;
	max-width: 220px;
	align-self: center;
}

.notification-rule-field--event > select,
.notification-rule-field--event > .app-select {
	width: 100%;
	max-width: 220px;
}

.notification-rule-field--event > .app-select .app-select__trigger {
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
}

.notification-rule-event-hint {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	min-height: 40px;
	align-items: flex-start;
	align-self: center;
	gap: 0;
}

.notification-rule-event-hint__label {
	display: none;
}

.notification-rule-event-states {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	max-width: 100%;
	line-height: 1.2;
}

.notification-rule-event-states .is-ok {
	color: #8491a3;
	font-size: 13px;
	font-weight: 500;
}

.notification-rule-event-states .is-sep {
	color: #c0c8d4;
	font-size: 13px;
}

.notification-rule-event-states .is-alarm {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 5px 10px;
	border-radius: 8px;
	background: #fff1f0;
	color: #b42318;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.notification-rule-field--logical-stack {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
	max-width: none;
	width: 100%;
}

.notification-rule-field--logical-stack > select,
.notification-rule-field--logical-stack > .app-select {
	width: 100%;
	max-width: none;
}

.notification-rule-field--logical-stack label {
	margin: 0;
}

.notification-rule-field--logical-stack label[for^="ppolar_"] {
	margin-top: 4px;
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
}

.notification-rule-event-hint__polar {
	display: none;
}

.notification-rule-row--logical .notification-rule-field--event label {
	display: none;
}

.notification-rule-row--logical .notification-rule-field--logical-stack > label {
	display: block;
}

.notification-rule-row--logical .notification-rule-event-hint {
	align-self: center;
	min-height: 40px;
}

/* Measurement conversion modal. */
.measurement-modal {
	width: min(620px, calc(100vw - 32px));
}

.measurement-modal__header {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 36px;
	align-items: start;
	gap: 13px;
}

.measurement-modal__icon {
	display: grid;
	width: 42px;
	height: 42px;
	place-items: center;
	border-radius: 12px;
	background: #eef6ff;
	color: #217dff;
}

.measurement-modal__icon svg {
	width: 21px;
	height: 21px;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.measurement-modal__heading h2 {
	margin: 0;
	color: #172033;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
}

.measurement-modal__heading p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.measurement-modal__body {
	display: grid;
	gap: 20px;
	margin-top: 22px;
}

.measurement-modal__fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.measurement-modal__field label {
	display: block;
	margin-bottom: 7px;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
}

.measurement-modal__field input,
.measurement-range input {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	height: 42px;
	padding: 9px 11px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg, #f3f4f6);
	color: #172033;
	font: inherit;
	font-size: 14px;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.measurement-modal__field input:focus,
.measurement-range input:focus {
	border-color: #217dff;
	outline: none;
	box-shadow: none;
}

.measurement-modal__field small {
	display: block;
	margin-top: 5px;
	color: #8491a3;
	font-size: 11px;
	line-height: 1.35;
}

.measurement-range {
	padding: 16px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #f8fafc;
}

.measurement-range__heading h3 {
	margin: 0;
	color: #273449;
	font-size: 14px;
	font-weight: 600;
}

.measurement-range__heading p {
	margin: 3px 0 0;
	color: #718096;
	font-size: 12px;
	line-height: 1.4;
}

.measurement-range__grid {
	display: grid;
	grid-template-columns: 88px repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: 9px;
	margin-top: 14px;
}

.measurement-range__column {
	color: #64748b;
	font-size: 11px;
	font-weight: 600;
	text-align: center;
}

.measurement-range__grid > label {
	color: #475569;
	font-size: 12px;
	font-weight: 500;
}

.measurement-modal__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid #edf1f6;
}

.measurement-modal__actions-main {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-left: auto;
}

.measurement-modal__reset:not(:disabled) {
	color: #dc2626;
}

.measurement-modal__reset:not(:disabled):hover {
	background: #fef2f2;
}

@media (max-width: 1100px) {
	.notification-settings-layout {
		grid-template-areas: "options" "rules";
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.notification-options-pane {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		border-bottom: 1px solid #e2e8f0;
		border-left: 0;
	}

	.notification-sidebar-section + .notification-sidebar-section {
		border-top: 0;
		border-left: 1px solid #e2e8f0;
	}
}

@media (max-width: 900px) {
	.zone-settings-content {
		padding: var(--ui-space-2) var(--ui-space-4) var(--ui-space-4);
	}
}

@media (max-width: 640px) {
	.zone-settings-header {
		align-items: stretch;
		flex-direction: column;
	}

	.zone-settings-actions,
	.zone-settings-header > .ui-button {
		width: 100%;
	}

	.zone-settings-actions .ui-button {
		flex: 1;
	}

	.zone-settings-content {
		padding: var(--ui-space-2) var(--ui-space-4) var(--ui-space-4);
	}

	.zone-settings-section {
		padding: var(--ui-space-5) 0;
	}

	.zone-switch-list,
	.measurement-modal__fields {
		grid-template-columns: 1fr;
	}

	.notification-options-pane {
		grid-template-columns: 1fr;
	}

	.notification-sidebar-section {
		padding: var(--ui-space-5) var(--ui-space-4);
	}

	.notification-sidebar-section + .notification-sidebar-section {
		border-top: 1px solid #eef2f7;
		border-left: 0;
	}

	.notification-rules-pane {
		padding: var(--ui-space-5) var(--ui-space-4);
	}

	.notification-rules-columns {
		display: none;
	}

	.notification-rule-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 13px 10px;
		padding: 16px 0;
	}

	.notification-rule-parameter {
		grid-column: 1 / -1;
	}

	.notification-rule-field label {
		display: block;
	}

	.notification-rule-field--event {
		grid-column: 1 / -1;
		max-width: none;
	}

	.notification-rule-field--event > select,
	.notification-rule-field--event > .app-select {
		max-width: none;
	}

	.notification-rule-row--logical .notification-rule-field--event label {
		display: block;
	}

	.notification-rule-event-hint {
		grid-column: 1 / -1;
		min-height: 0;
		padding: 0;
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.notification-rule-event-hint__label {
		display: block;
		width: 100%;
		margin: 0;
		color: #8491a3;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.2;
	}

	.measurement-range__grid {
		grid-template-columns: 72px repeat(2, minmax(0, 1fr));
	}

	.measurement-modal__actions {
		flex-wrap: wrap;
	}

	.measurement-modal__actions-main {
		flex: 1 1 100%;
	}

	.measurement-modal__actions-main .ui-button {
		flex: 1;
	}
}

@container (max-width: 410px) {
	.device-card-meta {
		top: 12px;
		right: 12px;
		gap: 8px;
	}

	.device-telemetry {
		gap: 6px;
		font-size: 12px;
	}

	.device-card-summary {
		padding-right: 104px;
		margin-bottom: 8px;
	}

	.device-battery__value {
		font-size: 11px;
	}
}

.p10 td
{
	padding: 5px;
}

.p10 h5
{
	margin-bottom: 10px;
}

.p10 td img
{
	margin-top: 10px;
}

.p10 td.cp
{
    background: url(/img/copy.svg) center right no-repeat;
    background-size: 16px;
    padding: 5px 30px 5px 5px;
    cursor: pointer;
}

.p10 td.cp.copied
{
    background: url(/img/ok.svg) center right no-repeat;
}

#offline
{
    position: fixed;
    top: 0px;
    left: calc(50% - 100px);
    background: #e60;
    color: #fff;
    padding: 0px 20px;
    border-radius: 10px;
    height: 22px;
    line-height: 20px;
    z-index: 100000;
}


.alarm
{
	background: #fdd;
}

/* Sensor card: make an out-of-range value read as an alarm, not as a blue card. */
.zone-param-card {
	border-color: transparent !important;
	transition: background .18s ease, border-color .18s ease;
}

.zone-param-card.alarm {
	background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
	border-color: transparent !important;
}

.zone-param-card.alarm .zone-param-card__icon {
	background: linear-gradient(135deg, #fb7185 0%, #e11d48 100%);
}

.zone-param-card.alarm .zone-param-card__name {
	color: #9f1239;
}

.zone-param-card.alarm .zone-param-card__value {
	color: #be123c;
	font-weight: 650;
}

.zone-param-card.alarm .zone-param-card__limits {
	color: #9f1239;
}

.zone-param-card.alarm .zone-param-card__limits::before {
	content: "Вне диапазона · ";
	font-weight: 700;
}

/* Expandable rows in the object tree. */
#padol_1 > .bg-white.rounded-xl {
	overflow: hidden;
}

.tree-node__row {
	cursor: default;
	border-radius: 10px;
	transition: background-color .16s ease;
}

.tree-node--expandable > .tree-node__row,
.tree-node--expandable > .tree-node__row .tree-node__main {
	cursor: pointer;
}

/* Hover on the row only — not the whole tree-node (avoids nested enter/leave flicker). */
#obj_list_card .tree-node > .tree-node__row:hover {
	background-color: #eceff3;
}

#obj_list_card .tree-node[id^="div_o"] > .tree-node__row:hover {
	background-color: #eceff3;
}

#obj_list_card .tree-node[id^="div_o"] {
	background: #fff;
	border: 0;
}

#padol_1 > .bg-white.rounded-xl {
	border: 0;
}

.tree-node__main {
	border-radius: 9px;
}

.entity-badge {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
	color: #fff;
}

.entity-badge--tree {
	width: 28px;
	height: 28px;
	border-radius: 8px;
}

@media (min-width: 768px) {
	.entity-badge--tree {
		width: 36px;
		height: 36px;
		border-radius: 10px;
	}
}

.entity-badge--zone {
	width: 28px;
	height: 28px;
	border-radius: 8px;
}

.entity-badge__icon,
.entity-badge .zone-kind-icon,
.entity-badge .entity-appearance__preview-icon {
	width: 16px;
	height: 16px;
}

.entity-badge--photo {
	background: #e5e7eb;
}

.entity-badge--photo img,
.entity-appearance__preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.zone-tree-row__icon {
	padding: 0;
	background: transparent;
}

.entity-appearance-field__label {
	display: block;
	margin-bottom: 4px;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
}

.entity-appearance-field__hint {
	margin: 0 0 10px;
	color: #64748b;
	font-size: 12px;
	line-height: 1.4;
}

.entity-appearance {
	display: flex;
	gap: 14px;
	align-items: flex-start;
}

.entity-appearance__preview {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: 14px;
	background: #9ca3af;
	color: #fff;
	overflow: hidden;
	flex-shrink: 0;
}

.entity-appearance__preview-icon {
	width: 28px;
	height: 28px;
}

.entity-appearance__controls {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.entity-appearance__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.entity-appearance__row--icons {
	gap: 6px;
}

.entity-appearance__icon-btn {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 9px;
	background: #fff;
	color: #475569;
	cursor: pointer;
}

.entity-appearance__icon-btn.is-selected,
.entity-appearance__icon-btn:hover {
	border-color: #2684ff;
	color: #217dff;
	background: #eff6ff;
}

.entity-appearance__icon-svg {
	width: 16px;
	height: 16px;
}

.entity-appearance__row--color label,
.entity-appearance__color-label {
	margin: 0;
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
}

.entity-appearance__color-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	padding: 4px 10px 4px 4px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
}

.entity-appearance__color-btn:hover {
	border-color: #2684ff;
}

.entity-appearance__color-native {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	flex: 0 0 auto;
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08);
}

.entity-appearance__color-native::-webkit-color-swatch-wrapper {
	padding: 0;
}

.entity-appearance__color-native::-webkit-color-swatch {
	border: 0;
	border-radius: 8px;
}

.entity-appearance__color-native::-moz-color-swatch {
	border: 0;
	border-radius: 8px;
}

.entity-appearance__color-value {
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.entity-appearance__color {
	width: 42px;
	height: 32px;
	padding: 0;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
}

.entity-appearance-modal .entity-editor-modal__body {
	padding-top: 4px;
}

.entity-thumb-crop-modal {
	width: min(420px, calc(100vw - 24px));
}

.entity-thumb-crop {
	display: grid;
	gap: 14px;
	justify-items: center;
}

.entity-thumb-crop__viewport {
	position: relative;
	width: min(320px, calc(100vw - 72px));
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 16px;
	background: #0f172a;
	touch-action: none;
	cursor: grab;
	user-select: none;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.entity-thumb-crop__viewport.is-dragging {
	cursor: grabbing;
}

.entity-thumb-crop__canvas {
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.entity-thumb-crop__zoom {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	width: min(320px, calc(100vw - 72px));
	color: #64748b;
	font-size: 13px;
	font-weight: 600;
}

.entity-thumb-crop__zoom input[type="range"] {
	width: 100%;
	accent-color: #217dff;
}

.tree-node__main:focus-visible {
	outline: 2px solid #2684ff;
	outline-offset: 3px;
}

.tree-node__toggle {
	display: grid;
	width: 24px;
	height: 24px;
	place-items: center;
	border-radius: 8px;
	transition: background-color .16s ease;
}

.tree-node--expandable > .tree-node__row:hover .tree-node__toggle {
	background: #e9eef5;
}

.tree-node__chevron {
	transform: rotate(0deg);
	transform-origin: center;
	transition: transform .18s ease;
}

.tree-node.opened > .tree-node__row .tree-node__chevron {
	transform: rotate(90deg);
}

.tree-node.opened > .sub {
	display: block;
}

.tree-node.closed > .sub {
	display: none;
}

.zone-tree-row {
	padding: 10px 12px 10px 0;
	border-radius: 10px;
	cursor: pointer;
	transition: background-color .16s ease;
}

.zone-tree-row:hover {
	background-color: #f3f4f6;
}

.zone-tree-row__indent {
	width: 24px;
	flex: 0 0 24px;
}

.zone-tree-row__icon {
	width: 28px;
	height: 28px;
}

.zone-tree-row__head {
	row-gap: 2px;
}

.zone-tree-row__head h5 {
	line-height: 1.25;
}

.zone-params-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-top: 4px;
	line-height: 1.2;
}

.zone-param-chip {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	white-space: nowrap;
}

.zone-param-chip .sensor-inline-icon {
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
}

.zone-tree-row__actions {
	align-self: flex-start;
	margin-top: 1px;
}

.object-actions {
	position: relative;
	z-index: 1;
}

/* Пункты из быстрых кнопок — только в мобильном меню «⋯» */
.object-actions__menu .object-actions__mobile-only {
	display: none !important;
}

.object-actions:has(.object-actions__menu.is-open) {
	z-index: 80;
}

.object-actions__toggle {
	display: grid;
	width: 32px;
	min-width: 32px;
	height: 32px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.object-actions__toggle:hover {
	background: #f1f5f9;
	color: #334155;
}

.object-actions__toggle[aria-expanded="true"] {
	background: transparent;
	color: #217dff;
}

.object-actions__toggle svg {
	width: 18px;
	height: 18px;
}

.object-actions__menu {
	display: none;
	position: fixed;
	z-index: 1450;
	width: min(230px, calc(100vw - 20px));
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	padding: 6px;
	border: 0;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
	transform-origin: top right;
}

.object-actions__menu.is-open {
	display: flex;
	animation: ui-pop-in var(--ui-dur-2) var(--ui-ease-out);
}

.object-actions__menu > button {
	display: flex;
	width: 100%;
	min-height: 40px;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	padding: 0 10px !important;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #334155;
	cursor: pointer;
	text-align: left;
}

.object-actions__menu > button::after {
	content: attr(title);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
}

.object-actions__menu > button:hover {
	background: #f1f5f9;
}

.object-actions__menu > button[title^="Удалить"]::after {
	color: #dc2626;
}

.object-actions__menu > button svg {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}

html[data-theme="dark"] .object-actions__toggle {
	background: transparent;
	border: 0;
	color: #94a3b8;
}

html[data-theme="dark"] .object-actions__toggle:hover {
	background: #273449;
	color: #cbd5e1;
}

html[data-theme="dark"] .object-actions__toggle[aria-expanded="true"] {
	background: transparent;
	color: #60a5fa;
}

html[data-theme="dark"] .object-actions__menu {
	border-color: #334155;
	background: #172033;
}

html[data-theme="dark"] .object-actions__menu > button {
	color: #e2e8f0;
}

html[data-theme="dark"] .object-actions__menu > button:hover {
	background: rgba(148, 163, 184, .12);
}

@keyframes object-actions-pop {
	from {
		opacity: 0;
		transform: translateY(-4px) scale(.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (min-width: 768px) {
	.zone-tree-row {
		padding: 12px 16px 12px 0;
	}

	.zone-tree-row__icon {
		width: 32px;
		height: 32px;
	}

	.zone-params-row {
		gap: 6px 12px;
		margin-top: 6px;
	}
}

/* Object and zone editors */
.entity-editor-modal {
	width: min(480px, calc(100vw - 32px));
	padding: 0 !important;
	overflow-x: hidden;
	background: #fff;
}

.entity-editor-modal--object {
	width: min(860px, calc(100vw - 32px));
}

.entity-editor-modal--zone {
	width: min(460px, calc(100vw - 32px));
}

.entity-editor-modal--category {
	width: min(460px, calc(100vw - 32px));
}

.entity-editor-modal__header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	padding: 22px 24px 18px;
	background: #fff;
}

.entity-editor-modal__title {
	margin: 0;
	color: #172033;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
}

.entity-editor-modal__subtitle {
	margin: 5px 0 0;
	color: #718096;
	font-size: 14px;
	line-height: 1.4;
}

.entity-editor-modal__close {
	margin: -4px -6px 0 0;
}

.entity-editor-modal__body {
	padding: 2px 24px 0;
}

.entity-editor-modal__body--split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.entity-editor-modal__col {
	min-width: 0;
	display: grid;
	gap: 16px;
}

.entity-editor-modal__col--side .entity-editor-modal__section {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.entity-editor-modal--object .entity-access-list {
	max-height: min(260px, 36vh);
}

.entity-editor-modal--object .entity-check-row {
	margin-top: 0;
}

.entity-editor-modal__fields {
	display: grid;
	gap: 16px;
}

.entity-editor-field > label {
	display: block;
	margin-bottom: 7px;
	color: #475569;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
}

.entity-editor-field__required {
	color: #e5484d;
}

.entity-editor-control {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	padding: 0 13px;
	border: 1px solid transparent;
	border-radius: 11px;
	outline: none;
	background: var(--ui-control-bg);
	color: #172033;
	font: inherit;
	font-size: 16px;
	font-weight: 400;
	box-shadow: none;
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.entity-editor-control::placeholder {
	color: #9aa6b6;
	font-weight: 400;
}

.entity-editor-control:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover);
}

.entity-editor-control:focus {
	border-color: var(--ui-control-border-focus);
	background: #fff;
	box-shadow: none;
}

.entity-editor-control:disabled {
	cursor: default;
	border-color: transparent;
	background: var(--ui-control-bg-disabled);
	color: #475569;
}

.entity-editor-field .app-select__trigger {
	height: 44px;
	padding-right: 12px;
	padding-left: 13px;
	border-color: #cfd8e4;
	border-radius: 11px;
	background: #fff;
	font-size: 16px;
}

.app-select__menu--entity .app-select__option {
	min-height: 44px;
	font-size: 15px;
}

/* Compact chart filters use the shared select behavior without native OS styling. */
.object-chart-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
}

.zone-updated {
	font-size: 13px;
	line-height: 1.3;
	color: #64748b;
	white-space: nowrap;
}

.zone-updated__value {
	color: #334155;
	font-weight: 500;
}

.zone-page__telemetry {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 0;
	padding: 0;
}

.zone-page__telemetry .device-battery__icon {
	width: 18px;
	height: 18px;
}

.zone-page__telemetry .device-battery__value {
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
}

.zone-status-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 0;
	padding: 4px 10px;
	border: 0;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 550;
	line-height: 1.35;
	white-space: nowrap;
}

.zone-status-chip svg {
	display: none;
}

.zone-status-chip--offline {
	background: #e5e7eb;
	color: #4b5563;
}

.zone-status-chip--pending {
	background: #eef6ff;
	color: #217dff;
	gap: 6px;
}

.zone-status-chip--ok {
	background: #dcfce7;
	color: #16a34a;
}

.zone-status-chip--alarm {
	background: #fee2e2;
	color: #dc2626;
}

.zone-status-chip--warn {
	background: #fef3c7;
	color: #b45309;
}

.zone-status-chip--signal {
	background: #fef3c7;
	color: #b45309;
}

.monitoring-card .zone-batt-chip {
	min-height: 0;
	padding: 2px 8px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.2;
	gap: 0;
	flex: 0 0 auto;
}

/* в дереве объектов icon_warn / icon_signal видны при своих состояниях */
.zone-tree-row .icon_warn,
.zone-tree-row .icon_signal
{
	display: none;
}

.zone-tree-row.zwarn .icon_warn,
.zone-tree-row.zsignal .icon_signal
{
	display: inline-flex;
}

.zone-chart-filter__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	color: #475569;
	font-size: 14px;
	font-weight: 500;
}

.zone-chart-filter__title svg {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
}

.zone-chart-toolbar {
	margin-bottom: 0;
}

.chart-zone-select {
	position: relative;
	z-index: 20;
	flex: 0 0 auto;
}

.chart-zone-select__trigger {
	display: inline-flex;
	box-sizing: border-box;
	height: 40px;
	align-items: center;
	gap: 8px;
	padding: 0 10px 0 12px;
	list-style: none;
	border: 1px solid #d7dce3;
	border-radius: var(--ui-control-radius);
	background: #f8fafc;
	color: var(--ui-text);
	font-size: 14px;
	font-weight: 400;
	cursor: pointer;
	user-select: none;
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.chart-zone-select__trigger::-webkit-details-marker {
	display: none;
}

.chart-zone-select__trigger:hover {
	border-color: #aeb8c6;
	background: #fff;
}

.chart-zone-select__trigger:focus-visible,
.chart-zone-select[open] .chart-zone-select__trigger {
	outline: none;
	border-color: var(--ui-primary);
	box-shadow: none;
	background: #fff;
}

.chart-zone-select__chevron {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	stroke: #64748b;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .16s ease;
}

.chart-zone-select[open] .chart-zone-select__chevron {
	transform: rotate(180deg);
}

.chart-zone-select__count {
	display: inline-flex;
	min-width: 34px;
	height: 24px;
	align-items: center;
	justify-content: center;
	padding: 0 7px;
	border-radius: 999px;
	background: var(--ui-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
}

.chart-zone-select__menu {
	position: absolute;
	top: calc(100% + 7px);
	left: 0;
	z-index: 50;
	box-sizing: border-box;
	width: max-content;
	min-width: 250px;
	max-width: min(340px, calc(100vw - 32px));
	padding: 7px;
	border: 1px solid #e0e6ee;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(15, 23, 42, .14), 0 2px 7px rgba(15, 23, 42, .06);
}

#oizones {
	max-height: 236px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.chart-zone-option {
	display: grid;
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	grid-template-columns: 10px auto minmax(0, 1fr);
	align-items: center;
	gap: 11px;
	padding: 7px 9px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #334155;
	font: inherit;
	font-size: 14px;
	text-align: left;
	cursor: pointer;
	transition: background-color .14s ease, color .14s ease;
}

.chart-zone-option:hover,
.chart-zone-option:focus-visible {
	outline: none;
	background: #f3f7fc;
}

.chart-zone-option.act {
	background: #f0f6ff;
}

.chart-zone-option__dot {
	display: block;
	width: 9px;
	height: 9px;
	border: 0;
	border-radius: 50%;
	background: #d6dde7;
	box-shadow: none;
	transition: background-color .14s ease, transform .14s ease;
}

.chart-zone-option.act .chart-zone-option__dot {
	background: var(--zone-color, #2684ff);
	transform: scale(1.06);
}

.chart-zone-option__id {
	display: inline-flex;
	min-width: 32px;
	height: 22px;
	align-items: center;
	justify-content: center;
	padding: 0 6px;
	border-radius: 6px;
	background: #f1f4f8;
	color: #64748b;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
}

.chart-zone-option__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.chart-zone-select__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5px;
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid #edf1f5;
}

.chart-zone-select__actions button {
	height: 32px;
	padding: 0 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #1769df;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.chart-zone-select__actions button:hover,
.chart-zone-select__actions button:focus-visible {
	outline: none;
	background: #f0f6ff;
}

.chart-zone-select__actions button:last-child {
	color: #64748b;
}

.chart-periods {
	display: flex;
	align-items: center;
	gap: 4px;
}

.chart-periods .hrs {
	height: 34px;
	min-width: 42px;
	padding: 0 12px;
	border-radius: 11px;
	font-size: 13px;
	line-height: 1;
}

.chart-date-field {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	color: #334155;
	font-size: 14px;
}

.chart-date-field .linec {
	box-sizing: border-box;
	height: 40px;
	padding: 0 11px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg);
	color: #172033;
	font-size: 14px;
	box-shadow: none;
	cursor: pointer;
}

.chart-date-field .linec:hover {
	border-color: transparent;
	background: var(--ui-control-bg-hover);
}

.chart-date-field .linec:focus {
	outline: none;
	border-color: var(--ui-control-border-focus);
	background: #fff;
	box-shadow: none;
}

.chart-timezone-select {
	display: inline-block;
	width: 190px;
	flex: 0 0 190px;
	vertical-align: middle;
}

.chart-timezone-select .app-select__trigger {
	height: 40px;
	border-color: transparent;
	border-radius: var(--ui-control-radius);
	background: var(--ui-control-bg);
	font-size: 14px;
}

.chart-timezone-select .app-select.app-select--open .app-select__trigger,
.chart-timezone-select .app-select .app-select__trigger:focus-visible {
	border-color: var(--ui-primary);
	background: #fff;
	outline: none;
	box-shadow: none;
}

.app-select__menu--chart .app-select__option {
	min-height: 40px;
	font-size: 14px;
}

.chart-filter-submit {
	height: 40px;
	min-height: 40px;
	padding: 0 18px;
	border-radius: var(--ui-control-radius);
}

.chart-periods.ui-segmented {
	flex: 0 1 auto;
}

@media (max-width: 760px) {
	.object-chart-toolbar {
		align-items: stretch;
	}

	.chart-periods {
		width: 100%;
		overflow-x: auto;
		padding-bottom: 2px;
	}

	.chart-date-field {
		flex: 1 1 calc(50% - 4px);
	}

	.chart-date-field .linec {
		width: 100% !important;
		min-width: 0;
	}

	.chart-timezone-select {
		width: min(100%, 240px);
		flex-basis: 190px;
	}
}

/* Native RGB picker and a curated, graph-safe palette. */
#color_picker_form.color-picker-modal {
	width: min(500px, calc(100vw - 32px)) !important;
	max-height: calc(100vh - 32px);
	padding: 0 !important;
	overflow: hidden;
	border-radius: 18px;
}

.color-picker-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 22px 24px 18px;
	border-bottom: 1px solid #e8edf3;
}

.color-picker-modal__header > div {
	width: 100%;
}

.color-picker-modal__header h2 {
	margin: 0;
	color: #172033;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.3;
}

.color-picker-modal__header p {
	margin: 4px 0 0;
	color: #718096;
	font-size: 14px;
	line-height: 1.4;
}

.color-picker-modal__body {
	max-height: calc(100vh - 112px);
	padding: 20px 24px 0;
	overflow-y: auto;
}

.color-picker-current {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border: 1px solid #e1e7ef;
	border-radius: 14px;
	background: #f8fafc;
}

.color-picker-native {
	display: block;
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	cursor: pointer;
}

.color-picker-native input[type="color"] {
	display: block;
	box-sizing: border-box;
	width: 58px;
	height: 58px;
	padding: 3px;
	border: 1px solid #cfd8e4;
	border-radius: 13px;
	outline: none;
	background: #fff;
	cursor: pointer;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.color-picker-native input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
}

.color-picker-native input[type="color"]::-webkit-color-swatch {
	border: 0;
	border-radius: 9px;
}

.color-picker-native input[type="color"]::-moz-color-swatch {
	border: 0;
	border-radius: 9px;
}

.color-picker-native input[type="color"]:hover {
	border-color: #aeb8c6;
}

.color-picker-native input[type="color"]:focus-visible {
	border-color: #2684ff;
	box-shadow: none;
}

.color-picker-native > span {
	display: none;
}

.color-picker-current__info {
	display: grid;
	min-width: 0;
	grid-template-columns: auto 1fr;
	align-items: baseline;
	column-gap: 10px;
	row-gap: 3px;
}

.color-picker-current__info small {
	grid-column: 1 / -1;
	color: #718096;
	font-size: 13px;
}

.color-picker-current__info strong {
	color: #172033;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .01em;
}

.color-picker-current__info span {
	color: #64748b;
	font-size: 14px;
}

.color-picker-section {
	margin-top: 20px;
}

.color-picker-section__heading p,
.color-picker-custom > label {
	display: block;
	margin: 0;
	color: #334155;
	font-size: 14px;
	font-weight: 500;
}

.color-picker-section__heading small,
.color-picker-custom > small {
	display: block;
	margin-top: 3px;
	color: #8491a3;
	font-size: 12px;
	line-height: 1.4;
}

.color-picker-palette {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 8px;
	margin-top: 11px;
}

.color-picker-swatch {
	position: relative;
	display: grid;
	width: 100%;
	aspect-ratio: 1;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 10px;
	outline: none;
	background: var(--swatch-color);
	cursor: pointer;
	box-shadow: none;
	transition: transform .14s ease, box-shadow .14s ease;
}

.color-picker-swatch:hover {
	transform: translateY(-1px);
	box-shadow: 0 5px 12px color-mix(in srgb, var(--swatch-color) 26%, transparent);
}

.color-picker-swatch:focus-visible,
.color-picker-swatch.is-selected {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2684ff;
}

.color-picker-swatch svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: #fff;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0;
	filter: drop-shadow(0 1px 1px rgba(15, 23, 42, .25));
}

.color-picker-swatch.is-selected svg {
	opacity: 1;
}

.color-picker-hex {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 44px;
	margin-top: 7px;
	padding: 0 13px;
	border: 1px solid #cfd8e4;
	border-radius: 11px;
	outline: none;
	background: #fff;
	color: #172033;
	font: inherit;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 15px;
	text-transform: uppercase;
	box-shadow: none;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.color-picker-hex:hover {
	border-color: #aeb8c6;
}

.color-picker-hex:focus {
	border-color: #2684ff;
	box-shadow: none;
}

.color-picker-hex[aria-invalid="true"] {
	border-color: #e5484d;
	box-shadow: 0 0 0 3px rgba(229, 72, 77, .12);
}

.color-picker-modal__footer {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 22px -24px 0;
	padding: 16px 24px 20px;
	border-top: 1px solid #e8edf3;
	background: #fff;
}

@media (max-width: 520px) {
	.color-picker-modal__header {
		padding: 20px 20px 16px;
	}

	.color-picker-modal__body {
		padding-right: 20px;
		padding-left: 20px;
	}

	.color-picker-palette {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.color-picker-modal__footer {
		margin-right: -20px;
		margin-left: -20px;
		padding-right: 20px;
		padding-left: 20px;
	}
}

/* User editor controls share the same cross-platform states as entity forms. */
#user_edit_card .user-form-control-wrap,
#user_edit_card .user-form-select-wrap {
	position: relative;
}

#user_edit_card .user-form-leading-icon {
	z-index: 2;
	display: flex;
	pointer-events: none;
	color: #64748b;
}

#user_edit_card .user-form-control {
	display: block;
	box-sizing: border-box;
	width: 100%;
	height: 48px;
	padding-top: 0;
	padding-bottom: 0;
	border: 1px solid #cfd8e4;
	border-radius: 11px;
	outline: none;
	background: #fff;
	color: #172033;
	font: inherit;
	font-size: 16px;
	box-shadow: none;
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

#user_edit_card .user-form-control::placeholder {
	color: #9aa6b6;
}

#user_edit_card .user-form-control:hover {
	border-color: #aeb8c6;
}

#user_edit_card .user-form-control:focus {
	border-color: #2684ff;
	box-shadow: none;
}

#user_edit_card .user-form-control:disabled {
	cursor: default;
	border-color: #dbe2ea;
	background: #f6f8fb;
	color: #64748b;
}

#user_edit_card .user-form-control[readonly] {
	cursor: default;
	border-color: #dbe2ea;
	background: #f6f8fb;
	color: #64748b;
}

#user_edit_card > .max-w-4xl {
	margin-top: 0;
	position: relative;
}

#user_edit_card .user-edit-backbar {
	margin-bottom: 10px !important;
	margin-left: 0;
}

#user_edit_card .user-edit-backbar .ui-back-link {
	padding-left: 6px;
}

#user_edit_card .user-form-fields > div > label,
#user_edit_card .user-form-section .block.text-sm {
	line-height: 1.35;
}

#user_edit_card .user-form-control,
#user_edit_card .user-form-select-wrap .app-select__trigger {
	line-height: 1.35;
}

#user_edit_card .user-form-fields.space-y-5 > :not([hidden]) ~ :not([hidden]) {
	margin-top: 14px !important;
}

#user_edit_card #user_profile_fields.user-form-fields > :not([hidden]) ~ :not([hidden]) {
	margin-top: 14px !important;
}

#user_edit_card .user-form-section {
	margin-top: 2px;
}

@media (min-width: 1024px) {
	#user_edit_card {
		padding-top: 0 !important;
	}

	#user_edit_card > .max-w-4xl {
		margin-top: 0;
	}

	#user_edit_card .user-edit-backbar {
		position: absolute;
		left: -170px;
		top: 18px;
		margin: 0 !important;
		z-index: 2;
	}
}

#user_edit_card.user-form--validated .user-form-control[aria-invalid="true"] {
	border-color: #e5484d;
	box-shadow: 0 0 0 3px rgba(229, 72, 77, .12);
}

#user_edit_card .user-form-select-wrap .app-select__trigger {
	height: 48px;
	padding-right: 13px;
	padding-left: 44px;
	border-color: #cfd8e4;
	border-radius: 11px;
	background: #fff;
	font-size: 16px;
}

#user_edit_card .user-form-select-wrap .app-select__trigger:hover {
	border-color: #aeb8c6;
}

#user_edit_card .user-form-select-wrap .app-select__trigger:focus-visible,
#user_edit_card .user-form-select-wrap .app-select--open .app-select__trigger {
	border-color: #2684ff;
	box-shadow: none;
}

.user-mode-tabs {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	border-radius: 12px;
	background: #eef1f5;
}

.user-mode-tabs__btn {
	border: 0;
	border-radius: 9px;
	padding: 8px 14px;
	background: transparent;
	color: #64748b;
	font: inherit;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.user-mode-tabs__btn.is-active {
	background: #fff;
	color: var(--ui-primary);
	box-shadow: none;
}

.user-lookup-btn {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	border: 0;
	border-radius: 8px;
	padding: 8px 12px;
	background: #eff6ff;
	color: #1d4ed8;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
}

.user-lookup-btn:hover {
	background: #dbeafe;
}

.user-lookup-status {
	margin-top: 8px;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.4;
}

.user-lookup-status.hidden {
	display: none;
}

.user-lookup-status--loading {
	background: #f8fafc;
	color: #475569;
}

.user-lookup-status--success {
	background: #ecfdf5;
	color: #047857;
}

.user-lookup-status--info {
	background: #eff6ff;
	color: #1d4ed8;
}

.user-lookup-status--error {
	background: #fef2f2;
	color: #b91c1c;
}

html[data-theme="dark"] .user-mode-tabs {
	background: rgba(148, 163, 184, 0.12);
}

html[data-theme="dark"] .user-mode-tabs__btn.is-active {
	background: rgba(30, 41, 59, 0.95);
	color: #e2e8f0;
}

html[data-theme="dark"] .user-lookup-btn {
	background: rgba(59, 130, 246, 0.16);
	color: #93c5fd;
}

.user-password-toggle {
	position: absolute;
	z-index: 3;
	top: 50%;
	right: 7px;
	display: inline-flex;
	width: 36px;
	height: 36px;
	align-items: center;
	justify-content: center;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #718096;
	cursor: pointer;
	transition: color .16s ease, background-color .16s ease;
}

.user-password-toggle:hover {
	background: #f1f4f8;
	color: #334155;
}

.user-password-toggle:focus-visible {
	outline: none;
	background: #eef5ff;
	color: #1769df;
	box-shadow: none;
}

.user-password-toggle svg {
	width: 20px;
	height: 20px;
	stroke-width: 1.8;
}

/* Скрытый пароль → закрытый глаз; видимый → открытый */
.user-password-toggle__show,
.user-password-toggle.is-visible .user-password-toggle__hide {
	display: none;
}

.user-password-toggle.is-visible .user-password-toggle__show {
	display: block;
}

.user-activity-status {
	color: #52617a;
	font-variant-numeric: tabular-nums;
}

.user-activity-status[data-activity-state="online"] {
	color: #15825c;
	font-weight: 600;
}

.user-activity-status[data-activity-state="recent"] {
	color: #334155;
}

.user-activity-status[data-activity-state="empty"] {
	color: #8a98aa;
}

.entity-editor-modal__section {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #e8edf3;
}

.entity-editor-section-heading {
	display: grid;
	gap: 3px;
	margin-bottom: 10px;
}

.entity-editor-section-heading > span {
	color: #172033;
	font-size: 15px;
	font-weight: 600;
}

.entity-editor-section-heading small,
.entity-check-row__text small {
	color: #718096;
	font-size: 13px;
	line-height: 1.35;
}

.entity-access-list {
	display: grid;
	max-height: 132px;
	gap: 6px;
	padding-right: 4px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #cbd5e1 transparent;
}

.entity-access-option {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	align-items: center;
	gap: 10px;
	min-height: 46px;
	padding: 7px 10px;
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
	transition: background-color .16s ease;
}

.entity-access-option:hover {
	background: #f1f6fc;
}

.entity-access-option__text {
	display: grid;
	min-width: 0;
	gap: 1px;
	color: #263247;
	font-size: 15px;
	line-height: 1.3;
}

.entity-access-option__text > span,
.entity-access-option__text small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.entity-access-option__text small {
	color: #7b8798;
	font-size: 13px;
}

.entity-access-list__empty {
	padding: 12px;
	border-radius: 10px;
	background: #f8fafc;
	color: #718096;
	font-size: 14px;
	text-align: center;
}

.entity-check-list {
	display: grid;
	gap: 8px;
	margin-top: 20px;
}

.entity-check-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 58px;
	margin-top: 14px;
	padding: 9px 11px 9px 13px;
	border: 1px solid #e3e9f1;
	border-radius: 11px;
	background: #f8fafc;
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease;
}

.entity-check-list .entity-check-row {
	margin-top: 0;
}

.entity-check-row:hover {
	border-color: #cbd8e8;
	background: #f5f9fd;
}

.entity-check-row__text {
	display: grid;
	min-width: 0;
	gap: 3px;
}

.entity-check-row__title {
	color: #263247;
	font-size: 15px;
	font-weight: 500;
}

.entity-checkbox__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.entity-checkbox {
	display: grid;
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	place-items: center;
	border: 1.5px solid #b8c3d2;
	border-radius: 6px;
	background: #fff;
	color: #fff;
	transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.entity-checkbox svg {
	display: block;
	width: 12px;
	height: 12px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0;
	transform: scale(.7);
	transition: opacity .12s ease, transform .12s ease;
}

.entity-checkbox__input:checked + .entity-checkbox {
	border-color: var(--ui-primary, #217dff);
	background: var(--ui-primary, #217dff);
}

.entity-checkbox__input:checked + .entity-checkbox svg {
	opacity: 1;
	transform: scale(1);
}

.entity-checkbox__input:focus-visible + .entity-checkbox {
	box-shadow: none;
}

.entity-check-row:active .entity-checkbox__input:not(:disabled) + .entity-checkbox,
.entity-access-option:active .entity-checkbox__input:not(:disabled) + .entity-checkbox {
	transform: scale(.92);
}

.entity-checkbox__input:disabled + .entity-checkbox {
	cursor: default;
	opacity: .55;
	border-color: #cbd5e1;
	background: #eef2f7;
}

.entity-checkbox__input:disabled:checked + .entity-checkbox {
	opacity: .72;
	border-color: #78aaf0;
	background: #78aaf0;
}

.entity-access-option:has(.entity-checkbox__input:disabled),
.entity-check-row:has(.entity-checkbox__input:disabled) {
	cursor: default;
}

.entity-access-option:has(.entity-checkbox__input:disabled):hover,
.entity-check-row:has(.entity-checkbox__input:disabled):hover {
	border-color: #e3e9f1;
	background: #f8fafc;
}

.entity-editor-modal__actions {
	position: sticky;
	bottom: 0;
	z-index: 2;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 20px;
	padding: 17px 24px 22px;
	border-top: 1px solid #edf1f6;
	background: #fff;
}

.entity-editor-modal__actions .ui-button {
	width: 100%;
	font-size: 15px;
}

/* Object settings page — same flat section rhythm */
.object-settings-card {
	overflow: hidden;
	border: 1px solid #e8edf3;
	border-radius: var(--ui-radius-lg);
	background: #fff;
}

.object-settings-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-5);
	padding: var(--ui-space-5) var(--ui-space-6);
	border-bottom: 1px solid #eef2f7;
	background: #fff;
}

.object-settings-card__header h3 {
	margin: 0;
	color: #172033;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.35;
}

.object-settings-card__header p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.object-settings-card__actions {
	display: flex;
	align-items: center;
	gap: var(--ui-space-2);
}

.object-settings-card__body {
	padding: var(--ui-space-2) var(--ui-space-6) var(--ui-space-6);
}

.object-settings-section + .object-settings-section {
	margin-top: 0;
	padding-top: var(--ui-space-6);
	border-top: 1px solid #eef2f7;
}

.object-settings-section {
	padding: var(--ui-space-6) 0 0;
}

.object-settings-section:first-child {
	padding-top: var(--ui-space-6);
}

.object-settings-section__heading {
	margin-bottom: var(--ui-space-5);
}

.object-settings-section__heading h4 {
	margin: 0;
	color: #172033;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
}

.object-settings-section__heading p {
	margin: 4px 0 0;
	color: #64748b;
	font-size: 13px;
	line-height: 1.45;
}

.object-settings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ui-space-4) var(--ui-space-5);
	max-width: 720px;
}

.object-settings-access-list {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	max-height: 220px;
	gap: 8px;
}

.object-settings-visibility {
	margin-top: 14px;
}

.object-settings-card--editing .object-settings-card__header {
	background: #f8fbff;
}

@media (max-width: 760px) {
	.object-settings-card__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.object-settings-card__actions {
		width: 100%;
	}

	.object-settings-card__actions .ui-button {
		flex: 1;
	}

	.object-settings-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 520px) {
	.object-settings-card__header,
	.object-settings-card__body {
		padding: 20px;
	}

	.object-settings-card__actions {
		align-items: stretch;
		flex-direction: column-reverse;
	}
}

@media (max-width: 760px) {
	.entity-editor-modal--object {
		width: min(520px, calc(100vw - 24px));
	}

	.entity-editor-modal__body--split {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.entity-editor-modal__col--side .entity-editor-modal__section {
		margin-top: 12px;
		padding-top: 16px;
		border-top: 1px solid #e8edf3;
	}

	.entity-editor-modal--object .entity-access-list {
		max-height: 160px;
	}
}

@media (max-width: 520px) {
	.entity-editor-modal {
		width: calc(100vw - 24px);
		padding: 0 !important;
	}

	.entity-editor-modal--object {
		width: calc(100vw - 24px);
	}

	.entity-editor-modal__header {
		padding: 20px 20px 16px;
	}

	.entity-editor-modal__body {
		padding: 2px 20px 0;
	}

	.entity-editor-modal__actions {
		padding: 16px 20px 20px;
	}
}

/* Application feedback — Geist-style toast cards */
.app-toast-region {
	position: fixed;
	top: auto;
	right: auto;
	bottom: max(24px, calc(12px + env(safe-area-inset-bottom, 0px)));
	left: 50%;
	z-index: 12000;
	display: flex;
	align-items: center;
	flex-direction: column-reverse;
	gap: 10px;
	width: max-content;
	max-width: calc(100vw - 32px);
	transform: translateX(-50%);
	pointer-events: none;
}

.app-toast {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
	min-width: min(320px, calc(100vw - 32px));
	max-width: min(420px, calc(100vw - 32px));
	min-height: 0;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 12px;
	background: #fff;
	color: #171717;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .03),
		0 2px 4px rgba(0, 0, 0, .04),
		0 12px 24px rgba(0, 0, 0, .08);
	opacity: 0;
	transform: translateY(12px) scale(.98);
	transition:
		opacity var(--ui-dur-3) var(--ui-ease-out),
		transform var(--ui-dur-3) var(--ui-ease-out);
	pointer-events: auto;
}

.app-toast--visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.app-toast--leaving {
	opacity: 0;
	transform: translateY(8px) scale(.98);
	pointer-events: none;
}

.app-toast--success,
.app-toast--error,
.app-toast--warning,
.app-toast--info {
	border-color: rgba(0, 0, 0, .08);
	background: #fff;
	color: #171717;
}

.app-toast__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	margin-top: 1px;
	color: #666;
}

.app-toast--success .app-toast__icon { color: #16a34a; }
.app-toast--error .app-toast__icon { color: #dc2626; }
.app-toast--warning .app-toast__icon { color: #ca8a04; }
.app-toast--info .app-toast__icon { color: #2563eb; }

.app-toast__icon svg {
	display: block;
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.app-toast__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.app-toast__label {
	overflow: hidden;
	color: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -.01em;
	text-overflow: ellipsis;
}

.app-toast__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	margin: -4px -6px -4px 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #737373;
	cursor: pointer;
}

.app-toast__close:hover {
	background: rgba(0, 0, 0, .05);
	color: #171717;
}

.app-toast__close svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}

@media (max-width: 767px) {
	.app-toast-region {
		bottom: max(76px, calc(58px + env(safe-area-inset-bottom, 0px)));
		width: calc(100vw - 28px);
		max-width: none;
	}

	.app-toast {
		width: 100%;
		min-width: 0;
		max-width: none;
		padding: 14px 14px;
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.app-toast {
		transition: none;
	}
}

/* Inbox desktop toasts — bottom-right */
.notif-toast-region {
	position: fixed;
	right: max(var(--ui-space-4), env(safe-area-inset-right, 0px));
	bottom: max(var(--ui-space-5), env(safe-area-inset-bottom, 0px));
	left: auto;
	z-index: 11900;
	display: flex;
	flex-direction: column-reverse;
	align-items: stretch;
	gap: var(--ui-space-2);
	width: min(380px, calc(100vw - 32px));
	pointer-events: none;
}

.notif-toast {
	display: flex;
	align-items: flex-start;
	gap: var(--ui-space-3);
	box-sizing: border-box;
	width: 100%;
	padding: var(--ui-space-3) var(--ui-space-4);
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: var(--ui-radius-md);
	background: #fff;
	color: #171717;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, .03),
		0 2px 4px rgba(0, 0, 0, .04),
		0 12px 24px rgba(0, 0, 0, .1);
	opacity: 0;
	transform: translateY(12px) translateX(8px) scale(.98);
	transition: opacity .22s cubic-bezier(.22, 1, .36, 1), transform .22s cubic-bezier(.22, 1, .36, 1);
	pointer-events: auto;
	cursor: pointer;
}

.notif-toast.is-visible {
	opacity: 1;
	transform: translateY(0) translateX(0) scale(1);
}

.notif-toast.is-leaving {
	opacity: 0;
	transform: translateY(8px) translateX(8px) scale(.98);
	pointer-events: none;
}

.notif-toast__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: 0 0 36px;
	border-radius: var(--ui-radius-sm);
	background: rgba(37, 99, 235, .1);
	color: #2563eb;
}

.notif-toast--alarm .notif-toast__icon {
	background: rgba(220, 38, 38, .12);
	color: #dc2626;
}

.notif-toast--problem .notif-toast__icon {
	background: rgba(202, 138, 4, .14);
	color: #ca8a04;
}

.notif-toast--system .notif-toast__icon,
.notif-toast--verification .notif-toast__icon {
	background: rgba(37, 99, 235, .1);
	color: #2563eb;
}

.notif-toast__icon svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
}

.notif-toast__body {
	flex: 1 1 auto;
	min-width: 0;
}

.notif-toast__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--ui-space-2);
}

.notif-toast__title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #171717;
}

.notif-toast__time {
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 1.3;
	color: #737373;
	white-space: nowrap;
}

.notif-toast__text {
	margin: var(--ui-space-1) 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #525252;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.notif-toast__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	margin: -4px -6px 0 0;
	padding: 0;
	border: 0;
	border-radius: var(--ui-radius-sm);
	background: transparent;
	color: #a3a3a3;
	cursor: pointer;
}

.notif-toast__close:hover {
	background: rgba(0, 0, 0, .06);
	color: #525252;
}

.notif-toast__close svg {
	width: 16px;
	height: 16px;
}

@media (max-width: 767px) {
	.notif-toast-region {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.notif-toast {
		transition: none;
	}
}

/* Device list search, filters and row actions */
.device-tools {
	position: relative;
	margin: var(--ui-space-2) 0 var(--ui-space-5);
	padding: 0;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.device-tools__bar {
	display: flex;
	min-height: 0;
	align-items: center;
	gap: var(--ui-space-2);
	padding: 0 !important;
	overflow: visible;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.device-search {
	display: flex;
	min-width: 220px;
	height: 44px;
	flex: 0 1 700px;
	width: 700px;
	max-width: 700px;
	align-items: center;
	gap: var(--ui-space-2);
	padding: 0 var(--ui-space-3);
	border: 0;
	border-radius: var(--ui-control-radius);
	background: #f3f4f6;
	color: #64748b;
	transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.device-search:hover {
	background: #eef1f5;
	border-color: transparent;
}

.device-search:focus-within {
	background: #fff;
	border: 1px solid #217dff;
	box-shadow: none;
	outline: 0;
	color: #64748b;
}

.device-search__icon,
.device-search > svg {
	display: block;
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	color: #64748b;
	opacity: .7;
}

.device-search input {
	min-width: 0;
	height: 100%;
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	color: #0f172a;
	font-size: 14px;
}

.device-search input::-webkit-search-cancel-button {
	display: none;
}

.device-search input::placeholder {
	color: #94a3b8;
}

.device-search__clear,
.device-filter-panel__close {
	display: grid;
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: var(--ui-radius-sm);
	background: transparent;
	color: #64748b;
}

.device-search__clear:hover,
.device-filter-panel__close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.device-search__clear svg,
.device-filter-panel__close svg {
	width: 16px;
	height: 16px;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.device-filter-toggle {
	display: inline-flex;
	position: relative;
	height: 44px;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 14px;
	border: 0;
	border-radius: var(--ui-control-radius);
	background: #f3f4f6;
	color: #334155;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	box-sizing: border-box;
	transition: background-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.device-filter-toggle:hover {
	background: #eef1f5;
	color: #0f172a;
}

.device-filter-toggle:focus-visible {
	outline: 3px solid var(--ui-focus);
	outline-offset: 2px;
}

.device-filter-toggle[aria-expanded="true"] {
	background: #eff6ff;
	color: #1d4ed8;
	box-shadow: none;
}

.device-filter-toggle.is-active {
	background: #eff6ff;
	color: #1d4ed8;
}

.device-filter-toggle.is-active:hover {
	background: #eff6ff;
	color: #1d4ed8;
}

.device-filter-toggle.is-active[aria-expanded="true"] {
	background: #eff6ff;
	color: #1d4ed8;
	box-shadow: none;
}

.device-filter-toggle > svg {
	width: 18px;
	height: 18px;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.device-filter-toggle__label {
	line-height: 1;
}

.device-filter-toggle__count {
	display: inline-grid;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	place-items: center;
	border-radius: 999px;
	background: #217dff;
	color: #fff;
	font-size: 10px;
	font-weight: 600;
}

.device-filter-toggle__dot {
	display: none;
	position: absolute;
	top: 8px;
	right: 8px;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #217dff;
	box-shadow: 0 0 0 2px #fff;
}

.device-filter-toggle.is-active .device-filter-toggle__dot {
	display: block;
}

.device-filter-toggle.is-active .device-filter-toggle__count:not([hidden]) ~ .device-filter-toggle__dot {
	display: none;
}

.device-filter-popover__grab {
	display: none;
}

.device-filter-sheet-anchor {
	display: contents;
}

.device-tools__result {
	min-width: 92px;
	flex: 0 0 auto;
	color: #64748b;
	font-size: 12px;
	text-align: right;
	white-space: nowrap;
}

.device-filter-panel {
	padding: 18px;
	border-top: 1px solid #e8edf3;
	background: #fbfcfe;
}

.device-filter-panel__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.device-filter-panel__header strong,
.device-filter-panel__header span {
	display: block;
}

.device-filter-panel__header strong {
	color: #172033;
	font-size: 15px;
	font-weight: 600;
}

.device-filter-panel__header span {
	margin-top: 2px;
	color: #718096;
	font-size: 12px;
}

.device-filter-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(145px, 1fr));
	gap: 12px;
}

.device-filter-grid label {
	display: grid;
	gap: 6px;
	color: #52617a;
	font-size: 12px;
	font-weight: 500;
}

.device-filter-grid select {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	border: 1px solid #d8e0ea;
	border-radius: 10px;
	outline: 0;
	background-color: #fff;
	color: #172033;
	font-size: 14px;
}

.device-filter-grid select:hover {
	border-color: #b9c8da;
}

.device-filter-grid select:focus {
	border-color: #217dff;
	outline: none;
	box-shadow: none;
}

.device-filter-panel__footer {
	display: flex;
	justify-content: flex-end;
	margin-top: 14px;
}

.device-filter-reset {
	height: 38px;
	padding: 0 13px;
	border: 1px solid #d8e0ea;
	border-radius: 9px;
	background: #fff;
	color: #52617a;
	font-size: 13px;
	font-weight: 500;
}

.device-filter-reset:hover {
	border-color: #a9c9f7;
	background: #f5f9ff;
	color: #1769df;
}

.device-filter-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 10px 0 0;
}

.device-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 28px;
	padding: 2px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--ui-control-bg, #f3f4f6);
	color: #0f172a;
	font-size: 12px;
	font-weight: 500;
	box-shadow: none;
}

.device-filter-chip svg {
	width: 12px;
	height: 12px;
	stroke-width: 2;
	stroke-linecap: round;
}

.device-filter-chip:hover {
	background: var(--ui-control-bg-hover, #eef1f5);
	border-color: transparent;
	color: #0f172a;
}

.device-filter-empty {
	display: flex;
	min-height: 180px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	padding: 28px;
	color: #718096;
	text-align: center;
}

.device-filter-empty svg {
	width: 28px;
	height: 28px;
	margin-bottom: 4px;
	stroke-width: 1.6;
	stroke-linecap: round;
}

.device-filter-empty strong {
	color: #334155;
	font-size: 14px;
	font-weight: 600;
}

.device-filter-empty span {
	font-size: 12px;
}

.device-row-menu__backdrop {
	z-index: 1190;
	background: transparent;
}

.device-row-menu {
	position: fixed;
	z-index: 1200;
	margin: 0;
	overflow: hidden;
	border: 1px solid #e5e7eb !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: 0 10px 32px rgba(15, 23, 42, .14);
}

.device-row-menu button {
	background: #fff;
	transition: background-color .14s ease;
}

.device-row-menu button:hover {
	background: #f3f4f6;
}

.device-row-menu button:focus-visible {
	outline: 2px solid rgba(33, 125, 255, .35);
	outline-offset: -2px;
	background: #f3f4f6;
}

.device-row-menu button.text-red-700:hover,
.device-row-menu button:last-child:hover {
	background: #fef2f2;
}

.device-list-shell {
	border: 0;
}

.device-list-shell thead th {
	border: 0;
}

.device-list-group td {
	padding: 0 !important;
	border-top: 0;
	border-bottom: 0;
	background: #f7f9fc;
}

.device-list-group__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 10px 24px;
}

.device-list-group__icon {
	display: grid;
	width: 32px;
	height: 32px;
	flex: 0 0 auto;
	place-items: center;
	border-radius: 9px;
	background: #fff;
	border: 0;
	color: #64748b;
}

.device-list-group__icon svg {
	width: 16px;
	height: 16px;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.device-list-group__meta {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
	flex: 1 1 auto;
}

.device-list-group__label {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	line-height: 1.2;
}

.device-list-group__name {
	color: #0f172a;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.device-list-group__count {
	flex: 0 0 auto;
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.device-list-object-empty td {
	padding: 0 !important;
	background: #fff;
}

.device-list-object-empty__inner {
	padding: 14px 24px;
	color: #94a3b8;
	font-size: 13px;
}

.device-list-group--mobile {
	border-top: 0;
	border-bottom: 0;
	background: #f7f9fc;
}

.device-list-group--mobile .device-list-group__inner {
	padding: 12px 14px;
}

@media (max-width: 1180px) {
	.device-filter-grid {
		grid-template-columns: repeat(3, minmax(160px, 1fr));
	}
}

@media (max-width: 720px) {
	.device-tools__bar {
		min-height: 0;
		flex-wrap: nowrap;
		align-items: center;
		gap: 8px;
		padding: 0;
	}

	.device-search {
		min-width: 0;
		width: auto;
		max-width: none;
		flex: 1 1 auto;
		height: 44px;
	}

	.device-filter-toggle {
		display: inline-flex;
		width: 44px;
		height: 44px;
		padding: 0;
		position: relative;
		border-radius: 10px;
	}

	.device-filter-toggle__label {
		display: none;
	}

	.device-filter-toggle__count {
		position: absolute;
		top: -5px;
		right: -5px;
		min-width: 18px;
		height: 18px;
		font-size: 10px;
	}

	.device-filter-toggle__dot {
		top: 6px;
		right: 6px;
	}

	.device-filters-reset,
	.device-tools__result {
		display: none !important;
	}

	.device-filter-backdrop--dim {
		background: rgba(15, 23, 42, .42);
		z-index: 1100;
	}

	.device-filter-popover,
	.device-filter-popover.device-filter-popover--sheet,
	.device-filter-popover.device-filter-popover--panel {
		top: auto !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
		z-index: 1101;
		width: 100%;
		max-width: 100%;
		max-height: 94vh;
		padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px));
		border: 0;
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -10px 40px rgba(15, 23, 42, .16);
	}

	.device-filter-popover__grab {
		display: block;
		width: 36px;
		height: 4px;
		margin: 2px auto 8px;
		border-radius: 999px;
		background: #d4dbe5;
	}

	.device-filter-options {
		max-height: min(66vh, 560px);
		padding: 4px 0 8px;
	}

	.device-filter-options--sheet {
		display: block;
	}

	.device-filter-option {
		min-height: var(--app-sheet-control-h, 44px);
		font-size: var(--app-sheet-font, 14px);
	}

	.device-filter-popover__footer {
		position: sticky;
		bottom: 0;
		padding-top: 10px;
		background: #fff;
	}

	.device-filter-popover__footer:not(.device-filter-popover__footer--panel) button,
	.device-filter-popover__footer:not(.device-filter-popover__footer--panel) .device-filter-popover__clear,
	.device-filter-popover__footer:not(.device-filter-popover__footer--panel) .device-filter-popover__apply {
		height: var(--app-sheet-btn-h, 46px);
		min-height: var(--app-sheet-btn-h, 46px);
		font-size: 14px;
		border-radius: var(--app-sheet-radius, 12px);
	}

	html.device-filter-sheet-open,
	html.zone-period-sheet-open {
		overflow: hidden;
	}

	.device-filter-panel {
		padding: 16px 12px;
	}

	.device-filter-grid {
		grid-template-columns: 1fr;
	}

	.device-filter-grid select {
		height: 48px;
	}

	.zone-mobile-bar {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 12px;
	}

	.zone-period-trigger {
		display: flex;
		width: auto;
		min-width: 0;
		flex: 1 1 auto;
		min-height: 44px;
		align-items: center;
		gap: 10px;
		padding: 8px 12px;
		border: 1px solid #d8e0ea;
		border-radius: 12px;
		background: #fff;
		color: #334155;
		text-align: left;
	}

	.zone-period-trigger[aria-expanded="true"] {
		border-color: #217dff;
		box-shadow: none;
	}

	.zone-period-trigger > svg:first-child {
		width: 18px;
		height: 18px;
		flex: 0 0 18px;
		color: #64748b;
	}

	.zone-period-trigger__text {
		display: flex;
		min-width: 0;
		flex: 1;
		flex-direction: column;
		gap: 2px;
	}

	.zone-period-trigger__title {
		color: #64748b;
		font-size: 11px;
		font-weight: 500;
		line-height: 1.2;
	}

	.zone-period-trigger__value {
		overflow: hidden;
		color: #0f172a;
		font-size: 14px;
		font-weight: 600;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.zone-period-trigger__chevron {
		width: 18px;
		height: 18px;
		flex: 0 0 18px;
		color: #64748b;
		stroke-width: 1.8;
		transition: transform .16s ease;
	}

	.zone-period-trigger[aria-expanded="true"] .zone-period-trigger__chevron {
		transform: rotate(180deg);
	}

	.zone-period-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 115;
		background: rgba(15, 23, 42, .48);
		opacity: 0;
		pointer-events: none;
		transition: opacity .28s ease;
	}

	.zone-period-backdrop.is-open {
		opacity: 1;
		pointer-events: auto;
	}

	.zone-period-backdrop[hidden] {
		display: none;
	}

	.zone-period-panel {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 120;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		max-height: min(92dvh, calc(100dvh - 12px));
		padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
		overflow: auto;
		border-radius: 22px 22px 0 0;
		background: #fff;
		box-shadow: 0 -16px 48px rgba(15, 23, 42, .22);
		transform: translate3d(0, 110%, 0);
		visibility: hidden;
		pointer-events: none;
		transition: transform .34s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .34s;
		will-change: transform;
	}

	.zone-period-panel.is-open {
		transform: translate3d(0, 0, 0);
		visibility: visible;
		pointer-events: auto;
		transition: transform .34s cubic-bezier(.22, 1, .36, 1), visibility 0s linear 0s;
	}

	.zone-period-panel.is-dragging {
		transition: none;
	}

	.zone-period-panel__grab {
		display: block;
		width: 40px;
		height: 5px;
		margin: 2px auto 4px;
		border-radius: 999px;
		background: #d4dbe5;
		flex-shrink: 0;
		touch-action: none;
	}

	.zone-period-panel__header {
		display: flex;
		min-height: 44px;
		align-items: center;
		justify-content: space-between;
		margin: 0;
	}

	.zone-period-panel__header strong {
		color: #0f172a;
		font-size: 18px;
		font-weight: 650;
		letter-spacing: -.02em;
	}

	.zone-period-panel__header button {
		display: grid;
		width: 40px;
		height: 40px;
		place-items: center;
		border: 0;
		border-radius: 12px;
		background: #f3f4f6;
		color: #64748b;
	}

	.zone-period-panel__header svg {
		width: 18px;
		height: 18px;
		stroke-width: 1.8;
	}

	.zone-period-panel .zone-chart-filter__title {
		display: none;
	}

	.zone-export-button--mobile {
		display: inline-flex;
		flex: 0 0 auto;
		margin: 0;
	}

	.zone-export-button--desktop {
		display: none;
	}
}

/* Device filters: search + filter button */
.device-tools__bar {
	overflow: visible;
	flex-wrap: nowrap;
	align-items: center;
	gap: 10px;
}

.device-search {
	width: auto;
	min-width: 220px;
	max-width: none;
	flex: 1 1 auto;
	height: 44px;
}

.device-quick-filters {
	display: none !important;
}

.device-filter-field {
	display: grid;
	min-width: 0;
	gap: 6px;
}

.device-filter-field > span {
	color: #172033;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}

.device-filter-button {
	display: flex;
	width: 100%;
	max-width: none;
	height: 44px;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--ui-control-bg);
	color: #64748b;
	font-size: 14px;
	font-weight: 400;
	box-shadow: none;
	transition: background-color .14s ease, color .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.device-filter-button:hover {
	background: var(--ui-control-bg-hover);
	border-color: transparent;
	color: #172033;
}

.device-filter-button[aria-expanded="true"] {
	background: #fff;
	border-color: var(--ui-control-border-focus);
	color: #172033;
	box-shadow: none;
}

.device-filter-button.is-active {
	background: var(--ui-control-bg);
	border-color: transparent;
	color: #172033;
	box-shadow: none;
}

.device-filter-button.is-active:hover,
.device-filter-button.is-active[aria-expanded="true"] {
	background: #fff;
	border-color: var(--ui-control-border-focus);
	color: #172033;
}

.device-filter-button.is-active[aria-expanded="true"] {
	box-shadow: none;
}

.device-filter-button span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: none;
	min-width: 0;
	flex: 1 1 auto;
	text-align: left;
}

.device-filter-button__icon {
	display: none !important;
}

.device-filter-button__chevron {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	margin-left: 0;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: .65;
	transition: transform .16s ease;
}

.device-filter-button[aria-expanded="true"] .device-filter-button__chevron {
	transform: rotate(180deg);
}

.device-tools__result {
	min-width: 0;
	margin-left: 0;
	margin-right: 0;
	font-size: 12px;
	white-space: nowrap;
}

.device-filters-reset {
	display: inline-flex;
	height: 44px;
	flex: 0 0 auto;
	align-items: center;
	gap: 4px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	font-weight: 500;
	transition: background-color .14s ease, color .14s ease, border-color .14s ease;
}

.device-filters-reset:hover {
	background: #f8fafc;
	border-color: #e2e8f0;
	color: #0f172a;
}

.device-filters-reset svg {
	width: 15px;
	height: 15px;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.device-filter-backdrop {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: transparent;
}

.device-filter-popover {
	position: fixed;
	z-index: 70;
	width: 280px;
	max-width: calc(100vw - 24px);
	padding: 8px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
}

.device-filter-popover.device-filter-popover--panel {
	width: min(380px, calc(100vw - 24px));
	max-height: min(72vh, 640px);
	display: flex;
	flex-direction: column;
	padding: 16px 16px 12px;
	border: 1px solid #e8edf3;
	border-radius: 18px;
	box-shadow: 0 18px 48px rgba(15, 23, 42, .14), 0 2px 8px rgba(15, 23, 42, .06);
}

.device-filter-popover[hidden],
.device-filter-backdrop[hidden],
.device-filter-toggle__count[hidden],
.device-filters-reset[hidden],
.device-filter-chips[hidden] {
	display: none !important;
}

.device-filter-options {
	display: grid;
	max-height: min(320px, calc(100vh - 190px));
	gap: 2px;
	padding: 4px 0;
	overflow-y: auto;
}

.device-filter-options.device-filter-options--sheet {
	display: block;
	flex: 1 1 auto;
	max-height: none;
	min-height: 0;
	overflow-y: auto;
	padding: 0;
	gap: 0;
}

.device-filter-option {
	display: flex;
	width: 100%;
	min-height: 34px;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 10px;
	border: 0;
	border-radius: 8px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 400;
	text-align: left;
}

.device-filter-option:hover {
	background: #f8fafc;
}

.device-filter-option.is-checked,
.device-filter-option[aria-checked="true"] {
	background: #f1f5f9;
	color: #0f172a;
	font-weight: 500;
}

.device-filter-option.is-checked:hover,
.device-filter-option[aria-checked="true"]:hover {
	background: #e2e8f0;
	color: #0f172a;
}

.device-filter-option > span {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.device-filter-option > svg,
.device-filter-option__box svg {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px;
	min-height: 18px;
	max-width: 18px;
	max-height: 18px;
	flex: 0 0 18px;
	opacity: 0;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.device-filter-option.is-checked > svg,
.device-filter-option[aria-checked="true"] > svg,
.device-filter-option.is-checked .device-filter-option__box svg,
.device-filter-option[aria-checked="true"] .device-filter-option__box svg {
	opacity: 1;
}

.device-filter-option__box {
	display: none;
}

.device-filter-empty-inline {
	padding: 14px 12px;
	color: #94a3b8;
	font-size: 13px;
	text-align: center;
}

.device-filter-popover__footer {
	display: flex;
	gap: 8px;
	padding: 8px 0 0;
	border-top: 1px solid #edf1f5;
}

.device-filter-popover__footer--panel {
	justify-content: flex-start;
	padding-top: 12px;
	margin-top: 4px;
	border-top: 1px solid #edf1f5;
}

.device-filter-popover__footer button,
.device-filter-popover__clear,
.device-filter-popover__apply {
	width: 100%;
	height: 34px;
	padding: 0 10px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	color: #475569;
	font-size: 13px;
	font-weight: 500;
}

.device-filter-popover__footer--panel .device-filter-popover__clear {
	width: auto;
	height: auto;
	padding: 4px 2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #64748b;
	font-size: 13px;
	font-weight: 500;
}

.device-filter-popover__footer--panel .device-filter-popover__clear:hover {
	background: transparent;
	color: #0f172a;
}

.device-filter-popover__footer button:hover {
	background: #f8fafc;
	color: #0f172a;
}

.device-filter-popover__apply {
	background: #0f172a;
	border-color: #0f172a;
	color: #fff;
}

.device-filter-popover__apply:hover {
	background: #1e293b;
	border-color: #1e293b;
	color: #fff;
}

.device-filter-sheet-section {
	padding: 4px 0 16px;
	border-bottom: 0;
}

.device-filter-sheet-section:last-child {
	border-bottom: 0;
	padding-bottom: 8px;
}

.device-filter-sheet-section h4 {
	margin: 0 0 10px;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.device-filter-sheet-search {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px;
	margin: 0 0 10px;
	padding: 0 12px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #fff;
	color: #94a3b8;
}

.device-filter-sheet-search svg {
	width: 14px;
	height: 14px;
	flex: 0 0 14px;
	stroke-width: 1.8;
	opacity: .7;
}

.device-filter-sheet-search input {
	min-width: 0;
	flex: 1;
	height: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	color: #0f172a;
	font-size: 13px;
}

.device-filter-sheet-search input::-webkit-search-cancel-button {
	display: none;
}

.device-filter-sheet-search input::placeholder {
	color: #94a3b8;
}

.device-filter-sheet-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.device-filter-sheet-chip {
	min-height: 34px;
	padding: 6px 12px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 500;
	transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.device-filter-sheet-chip:hover {
	border-color: #cbd5e1;
	color: #0f172a;
}

.device-filter-sheet-chip.is-active {
	border-color: #0f172a;
	background: #f8fafc;
	color: #0f172a;
}

.device-filter-sheet-empty {
	padding: 4px 0 2px;
	color: #94a3b8;
	font-size: 13px;
}

.zone-period-trigger {
	display: none;
}

.zone-period-backdrop {
	display: none;
}

.zone-period-panel__grab,
.zone-period-panel__header {
	display: none;
}

.object-period-sheet {
	display: contents;
}

.object-period-trigger {
	display: none;
}

.zone-export-button {
	display: inline-flex;
	width: auto;
	min-height: 40px;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.zone-export-button svg {
	width: 18px;
	height: 18px;
}

.zone-export-button--desktop {
	margin-left: auto;
}

.zone-export-button--mobile {
	display: none;
}

.zone-mobile-bar {
	display: none;
}

.zone-chart-toolbar {
	width: 100%;
}

/* Restore mobile period controls after the desktop-hide defaults above.
   Those defaults must not win over the phone layout. */
@media (max-width: 767px) {
	.zone-mobile-bar {
		display: flex;
		align-items: center;
		gap: 8px;
		margin-bottom: 12px;
	}

	.zone-period-trigger,
	.object-period-trigger {
		display: flex;
		width: auto;
		min-width: 0;
		flex: 1 1 auto;
		min-height: 44px;
		align-items: center;
		gap: 10px;
		padding: 8px 12px;
		border: 1px solid #d8e0ea;
		border-radius: 12px;
		background: #fff;
		color: #334155;
		text-align: left;
	}

	.zone-export-button--mobile {
		display: inline-flex;
		flex: 0 0 auto;
		margin: 0;
	}

	.zone-export-button--desktop {
		display: none;
	}

	.zone-period-backdrop {
		display: block;
	}

	.zone-period-backdrop[hidden] {
		display: none;
	}

	.zone-period-panel__grab {
		display: block;
	}

	.zone-period-panel__header {
		display: flex;
	}

	.object-period-sheet,
	.object-period-sheet.zone-period-panel {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
	}
}

@media (max-width: 1180px) {
	.device-filter-grid {
		grid-template-columns: repeat(3, minmax(160px, 1fr));
	}
}

@media (max-width: 900px) {
	.device-tools__bar {
		flex-wrap: nowrap;
		overflow: visible;
	}

	.device-search {
		width: auto;
		max-width: none;
		flex: 1 1 auto;
		height: 44px;
	}
}

@media (max-width: 720px) {
	.device-tools__bar {
		flex-wrap: nowrap;
	}

	.device-search {
		flex: 1 1 auto;
	}

	.device-quick-filters {
		display: none !important;
	}
}

/* Object page head: back arrow + name + id on one row */
.object-page__head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 4px;
}

.object-page__topline {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.zone-page__topline {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.zone-page__head .ui-back-link {
	flex: 0 0 auto;
	width: 36px;
	min-width: 36px;
	min-height: 36px;
	margin: 2px 0 0;
	padding: 0;
	justify-content: center;
	border-radius: 10px;
}

.zone-page__identity {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.zone-page__title-row {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.zone-page__title-row h1 {
	margin: 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.25;
}

.zone-page__fav {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	transition: background-color var(--ui-dur-2) ease;
}

.zone-page__fav:hover {
	background: #f1f5f9;
}

.zone-page__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	min-width: 0;
}

.zone-page__meta > * {
	display: inline-flex;
	align-items: center;
}

.zone-page__meta > :not(:first-child) {
	margin-left: 10px;
	padding-left: 10px;
	border-left: 1px solid #e2e8f0;
}

.zone-page__id {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 7px;
	background: #f1f5f9;
	color: #64748b;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
}

.zone-page__status {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	align-self: center;
	gap: 6px;
	margin-left: 0;
}

.zone-page__title {
	min-width: 0;
	flex: 1 1 auto;
	margin: 0;
}

.zone-page__title h1 {
	margin: 0;
}

.object-page__head .ui-back-link {
	flex: 0 0 auto;
	width: 36px;
	min-width: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	justify-content: center;
	border-radius: 10px;
}

.object-page__title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 10px;
	min-width: 0;
	flex: 1 1 auto;
	margin: 0;
}

.object-page__title h1 {
	margin: 0;
	min-width: 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.object-page__id {
	flex: 0 0 auto;
	height: auto;
	margin: 0;
	line-height: 1.3;
}

.object-page__live {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	min-width: 0;
}

.object-page.is-skeleton .object-page__live {
	visibility: hidden;
}

.object-page__addr {
	margin: 0;
	padding-left: 44px;
	font-size: 14px;
	line-height: 1.4;
}

.object-page__addr:empty {
	display: none;
}

.object-skel {
	display: inline-block;
	vertical-align: middle;
	border-radius: 999px;
	background: linear-gradient(90deg, #e8eef5 0%, #f4f7fb 45%, #e8eef5 90%);
	background-size: 220% 100%;
	animation: object-skel-shimmer 1.25s ease-in-out infinite;
}

.object-skel--title {
	width: min(320px, 70vw);
	height: 28px;
	border-radius: 10px;
}

.object-skel--id {
	width: 72px;
	height: 14px;
}

.object-skel--addr {
	width: min(240px, 55vw);
	height: 14px;
	margin-top: 2px;
}

.object-skel--stat {
	width: 42px;
	height: 28px;
	border-radius: 10px;
}

.object-skel-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 128px;
	padding: 18px 16px;
	border: 1px solid #e8eef5;
	border-radius: 16px;
	background: #fff;
}

.object-skel--card-title {
	width: 58%;
	height: 16px;
	border-radius: 8px;
}

.object-skel--card-line {
	width: 88%;
	height: 12px;
	border-radius: 8px;
}

.object-skel--card-line-short {
	width: 46%;
}

.object-page.is-skeleton .object-summary-card > div:first-child {
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.object-page:not(.is-skeleton) .object-skel,
.object-page:not(.is-skeleton) .object-skel-card {
	display: none !important;
}

@keyframes object-skel-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

/* Object problems tab: compact actionable list instead of broken card grid. */
.object-problems {
	box-sizing: border-box;
	min-width: 0;
}

.object-problems__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ui-space-3);
	margin: 0 0 var(--ui-space-3);
}

.object-problems__head strong {
	color: #172033;
	font-size: 14px;
	font-weight: 600;
}

.object-problems__head span {
	display: inline-flex;
	min-width: 22px;
	height: 22px;
	align-items: center;
	justify-content: center;
	padding: 0 var(--ui-space-2);
	border-radius: var(--ui-radius-full);
	background: #fee2e2;
	color: #b91c1c;
	font-size: 12px;
	font-weight: 700;
}

.object-problems__list {
	display: flex;
	flex-direction: column;
	gap: var(--ui-space-2);
	min-width: 0;
}

.object-problem {
	display: grid;
	box-sizing: border-box;
	width: 100%;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: var(--ui-space-3);
	margin: 0;
	padding: var(--ui-space-3) var(--ui-space-4);
	border: 1px solid #fecaca;
	border-radius: var(--ui-radius-lg);
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
	transition: border-color .14s ease, background-color .14s ease, transform .1s ease;
}

.object-problem.is-action {
	cursor: pointer;
	grid-template-columns: 40px minmax(0, 1fr) auto 18px;
}

.object-problem.is-action:hover {
	border-color: #fca5a5;
	background: #fff7f7;
}

.object-problem.is-action:active {
	transform: translateY(1px);
}

.object-problem.is-action:focus-visible {
	outline: 3px solid var(--ui-focus);
	outline-offset: 2px;
}

.object-problem--offline {
	border-color: #e2e8f0;
	background: #f8fafc;
}

.object-problem--offline.is-action:hover {
	border-color: #cbd5e1;
	background: #f1f5f9;
}

.object-problem__icon {
	display: grid;
	width: 40px;
	height: 40px;
	place-items: center;
	border-radius: var(--ui-radius-md);
	background: #fee2e2;
	color: #dc2626;
	flex: 0 0 auto;
}

.object-problem--offline .object-problem__icon {
	background: #e2e8f0;
	color: #64748b;
}

.object-problem__glyph,
.object-problem__chevron {
	display: block;
	width: 18px;
	height: 18px;
}

.object-problem__chevron {
	color: #94a3b8;
}

.object-problem__body {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
}

.object-problem__title {
	color: #7f1d1d;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.object-problem--offline .object-problem__title {
	color: #334155;
}

.object-problem__meta {
	display: flex;
	min-width: 0;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px var(--ui-space-2);
}

.object-problem__zone {
	min-width: 0;
	overflow: hidden;
	color: #64748b;
	font-size: 12px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.object-problem__id {
	display: inline-flex;
	align-items: center;
	padding: 1px 6px;
	border-radius: var(--ui-radius-sm);
	background: #f1f5f9;
	color: #94a3b8;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 11px;
	line-height: 1.4;
}

.object-problem__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	padding: 0 var(--ui-space-2);
	border-radius: var(--ui-radius-full);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .01em;
	white-space: nowrap;
}

.object-problem__badge--alarm {
	background: #fee2e2;
	color: #b91c1c;
}

.object-problem__badge--battery {
	background: #fef3c7;
	color: #b45309;
}

.object-problem__badge--offline {
	background: #e2e8f0;
	color: #475569;
}

.object-problems__empty {
	display: flex;
	box-sizing: border-box;
	min-height: 220px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--ui-space-2);
	padding: var(--ui-space-7) var(--ui-space-5);
	border: 0;
	border-radius: var(--ui-radius-card);
	background: #f0fdf4;
	text-align: center;
}

.object-problems__empty-icon {
	display: grid;
	width: 52px;
	height: 52px;
	margin-bottom: var(--ui-space-1);
	place-items: center;
	border-radius: var(--ui-radius-full);
	background: #dcfce7;
	color: #16a34a;
}

.object-problems__empty-icon svg {
	width: 28px;
	height: 28px;
}

.object-problems__empty strong {
	color: #14532d;
	font-size: 16px;
	font-weight: 600;
}

.object-problems__empty > span:last-child {
	color: #3f7a55;
	font-size: 13px;
	line-height: 1.4;
}

@media (max-width: 640px) {
	.object-problem,
	.object-problem.is-action {
		grid-template-columns: 36px minmax(0, 1fr);
		gap: var(--ui-space-2) var(--ui-space-3);
		padding: var(--ui-space-3);
	}

	.object-problem__icon {
		width: 36px;
		height: 36px;
	}

	.object-problem__badge {
		grid-column: 2;
		justify-self: start;
	}

	.object-problem__chevron {
		display: none;
	}
}

@media (max-width: 767px) {
	#scrolldiv > .page {
		box-sizing: border-box;
		width: 100%;
		padding: 16px;
	}

	.dashboard-summary-grid,
	#pado_1_data,
	#user_list {
		gap: 12px;
	}

	#pan_rep .reports-layout,
	.log-layout {
		gap: 12px;
		padding: 0 !important;
	}

	#pan_r1,
	#pan_r2,
	#pan_r3,
	#pan_r4,
	.log-results {
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	.monitoring-card {
		padding: var(--ui-inset-card-mobile);
	}

	.monitoring-sensor-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--ui-space-2);
	}

	.monitoring-sensor-grid > .param-card,
	.monitoring-sensor-grid > div {
		min-height: 64px;
		padding: 10px;
	}

	.device-card-meta {
		top: 12px;
		right: 12px;
		gap: 8px;
	}

	.device-telemetry {
		gap: 6px;
		font-size: 12px;
	}

	.device-card-summary {
		margin-bottom: 8px;
		padding-right: 104px;
	}

	.device-card-summary h3 {
		overflow: hidden;
		font-size: 15px;
		line-height: 1.25;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.device-card-summary .mb-1 {
		margin-bottom: 2px;
	}

	.device-card-summary .mt-0\.5 {
		margin-top: 2px;
	}

	.device-location-data {
		display: none;
	}

	.device-battery__value {
		font-size: 11px;
	}

	.object-page__title {
		align-items: center;
		flex-wrap: wrap;
		gap: 6px 8px;
	}

	.object-page__title h1 {
		min-width: 0;
		margin: 0;
		font-size: 18px;
		line-height: 1.25;
	}

	.object-page__id {
		height: auto;
		margin: 0;
		padding: 3px 8px;
		font-size: 11px;
		line-height: 1.3;
	}

	.object-page__live .zone-status-chip {
		min-height: 28px;
		padding: 4px 10px;
		font-size: 12px;
		gap: 6px;
	}

	.object-page__live .zone-status-chip svg {
		width: 14px;
		height: 14px;
		flex-basis: 14px;
	}

	.object-page__addr {
		padding-left: 44px;
		font-size: 13px;
	}

	.object-summary-grid {
		gap: 8px;
	}

	.object-summary-card {
		display: flex;
		min-width: 0;
		min-height: 88px;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		padding: 12px 6px;
		border-radius: 14px;
	}

	.object-summary-card > div:first-child {
		font-size: 28px;
	}

	.object-summary-card > div:last-child {
		min-width: 0;
		font-size: 11px;
		white-space: nowrap;
	}

	.object-section-tabs,
	.zone-section-tabs {
		box-sizing: border-box;
		width: max-content;
		max-width: 100%;
		scrollbar-width: none;
	}

	.object-section-tabs::-webkit-scrollbar,
	.zone-section-tabs::-webkit-scrollbar {
		display: none;
	}

	.object-chart-empty {
		padding: 44px 18px;
	}

	.zone-param-card,
	.zone-device-info {
		padding: 12px;
		border-radius: 12px;
	}

	.zone-param-card .zone-param-card__icon {
		width: 40px;
		height: 40px;
		border-radius: 10px;
	}

	.zone-param-card .zone-param-card__value {
		font-size: 20px;
	}

	.zone-device-info > div:last-child {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 12px;
	}

	.zone-export-button {
		width: auto;
	}

	.chart-data-card {
		padding: 18px;
		border-radius: 14px;
	}

	.chart-data-card .recharts-responsive-container {
		height: 290px !important;
	}

	.device-stats-grid,
	.user-stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--ui-space-3);
	}

	.device-stat-card,
	.user-stat-card {
		min-height: 94px;
		padding: var(--ui-inset-card-mobile);
	}

	.device-stat-card {
		border: 0;
	}

	.device-list-shell {
		border: 0;
		border-radius: 0;
	}

	.device-list-item {
		padding: var(--ui-space-3) var(--ui-space-4);
		background: #fff;
		cursor: pointer;
	}

	.device-list-item__head {
		margin-bottom: var(--ui-space-3);
	}

	.device-list-item__details {
		display: flex;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 10px 12px;
	}

	.device-list-item__field {
		flex: 1 1 0;
		min-width: 0;
	}

	.device-list-item__label {
		display: block;
		margin-bottom: 2px;
		color: #6b7280;
		font-size: 11px;
		line-height: 1.2;
	}

	.device-list-item__value {
		display: block;
		color: #111827;
		font-size: 12px;
		line-height: 1.3;
	}

	.device-list-item__value--mono {
		font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
		font-size: 11px;
		word-break: break-all;
	}

	.device-list-item__value--verify .device-verify {
		display: inline-flex;
		max-width: 100%;
		vertical-align: top;
	}

	.device-list-item__verify .device-verify__badge {
		padding: 2px 7px;
		font-size: 10px;
		line-height: 1.25;
	}

	.device-list-item__verify .device-verify__meta {
		display: none;
	}

	.device-list-item__menu-wrap {
		position: relative;
		z-index: 2;
	}

	.device-list-item__menu {
		position: relative;
		z-index: 3;
	}

	.device-list-item__note {
		margin-top: 8px;
	}

	.user-card {
		padding: var(--ui-inset-card-mobile);
		border-color: #dfe5ec;
	}

	#obj_list_card > .flex:first-child {
		align-items: flex-start;
		gap: 12px;
	}

	.tree-node__row {
		padding-top: 12px;
		padding-bottom: 12px;
	}

	#user_edit_card {
		padding: 0;
	}

	.user-edit-panel,
	#pado_5,
	#pado_6 {
		padding: var(--ui-space-5);
		border-radius: var(--ui-radius-lg);
	}
}

@media (max-width: 520px) {
	#scrolldiv > .page {
		padding: 12px;
	}

	.app-tabs {
		gap: 2px;
		padding: 0 4px;
	}

	.app-tab {
		min-height: 42px;
		padding: 10px 12px;
	}

	.dashboard-summary-card {
		padding: 16px;
		border-radius: 16px;
	}

	.dash-context-banner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 12px 14px;
	}

	.dash-context-banner__btn {
		align-self: stretch;
		width: 100%;
	}

	.dashboard-summary-card > .flex {
		gap: var(--ui-space-3);
		margin-bottom: var(--ui-space-4);
	}

	.report-range-presets,
	.log-range-presets {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.dashboard-summary-card > .flex > div:first-child {
		width: 42px;
		height: 42px;
		border-radius: var(--ui-radius-md);
	}

	.dashboard-metrics {
		gap: var(--ui-space-2);
	}

	.dashboard-metric {
		display: flex;
		min-width: 0;
		min-height: 80px;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		padding: 10px 5px;
		border-radius: 12px;
	}

	.dashboard-metric > div:first-child {
		font-size: 28px;
	}

	.dashboard-metric > div:last-child {
		font-size: 11px;
		white-space: nowrap;
	}

	.dashboard-metric svg {
		width: 15px;
		height: 15px;
	}

	.device-card-summary {
		margin-bottom: 8px;
	}

	.device-location-data {
		overflow-x: auto;
		white-space: nowrap;
		scrollbar-width: none;
	}

	.param-card-name {
		font-size: 11px;
	}

	.param-card-value {
		font-size: 14px;
	}

	.alarm-limit {
		font-size: 11px;
	}

	.object-chart-toolbar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		align-items: end;
		gap: 10px 8px;
		margin-bottom: 16px;
	}

	.chart-zone-select,
	.chart-periods {
		grid-column: 1 / -1;
		width: 100%;
	}

	.chart-zone-select__trigger {
		width: 100%;
		justify-content: flex-start;
	}

	.chart-zone-select__count {
		margin-left: auto;
	}

	.chart-zone-select__menu {
		width: 100%;
		min-width: 0;
		max-width: 100%;
	}

	.chart-periods {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 6px;
		overflow: visible;
		padding: 0;
	}

	.chart-periods .hrs {
		width: 100%;
		min-width: 0;
		height: 36px;
		padding: 0 5px;
	}

	.chart-date-field {
		display: grid;
		min-width: 0;
		gap: 5px;
		font-size: 12px;
	}

	.chart-date-field .linec {
		height: 42px;
		font-size: 13px;
	}

	.chart-timezone-select {
		width: 100%;
		min-width: 0;
		flex-basis: auto;
	}

	.chart-timezone-select .app-select__trigger,
	.chart-filter-submit {
		height: 42px;
		min-height: 42px;
	}

	.chart-filter-submit {
		width: 100%;
		padding-right: 14px;
		padding-left: 14px;
	}

	.zone-export-button--mobile {
		width: auto;
		min-height: 44px;
		flex: 0 0 auto;
		margin: 0;
	}

	.chart-data-card {
		padding: 14px;
		border-radius: 12px;
	}

	.chart-data-card .recharts-responsive-container {
		height: 250px !important;
	}

	.device-tools {
		border: 0;
		border-radius: 0;
		background: transparent;
	}

	.device-tools__bar {
		gap: 8px;
		padding: 0;
	}

	.device-search {
		height: 44px;
	}

	.device-stat-card,
	.user-stat-card {
		min-height: 88px;
		padding: 12px;
	}

	.notification-panel .notification-settings__footer,
	.notification-panel__header {
		align-items: stretch;
	}
}

@media (max-width: 374px) {
	#scrolldiv > .page {
		padding-right: 10px;
		padding-left: 10px;
	}

	.dashboard-summary-card {
		padding: 14px;
	}

	.dashboard-metric,
	.object-summary-card {
		padding-right: 3px;
		padding-left: 3px;
	}

	.dashboard-metric > div:last-child,
	.object-summary-card > div:last-child {
		font-size: 10px;
	}

	.chart-periods {
		gap: 4px;
	}
}

/* Shared empty states: full-width white panel, centered icon → title → text → CTA */
.app-empty {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 100%;
	min-height: 280px;
	padding: 48px 28px;
	border: 0;
	border-radius: 16px;
	background: #fff;
	box-shadow: none;
	text-align: center;
}

.app-empty--compact {
	min-height: 180px;
	padding: 28px 20px;
	border-radius: 14px;
}

.app-empty--muted {
	background: #fff;
}

.app-empty--flush {
	border: 0;
	border-radius: 0;
	background: transparent;
	min-height: 220px;
}

.app-empty__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	margin-bottom: 16px;
	border-radius: 14px;
	background: #eef4fb;
	border: 0;
	color: #1B6DFF;
	box-shadow: none;
}

.app-empty--compact .app-empty__icon {
	width: 44px;
	height: 44px;
	margin-bottom: 12px;
	border-radius: 12px;
}

.app-empty__icon svg {
	width: 24px;
	height: 24px;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.app-empty--compact .app-empty__icon svg {
	width: 20px;
	height: 20px;
}

.app-empty__title {
	margin: 0;
	color: #111827;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.app-empty--compact .app-empty__title {
	font-size: 15px;
}

.app-empty__text {
	max-width: 38ch;
	margin: 8px 0 0;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.5;
}

.app-empty--compact .app-empty__text {
	font-size: 13px;
	margin-top: 6px;
}

.app-empty__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

.app-empty--compact .app-empty__actions {
	margin-top: 14px;
}

/* Table / list wrappers for empty states */
.app-empty-cell {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

.device-filter-empty {
	gap: 0;
}

.device-filter-empty .app-empty {
	min-height: 200px;
	width: 100%;
	border: 0;
	background: transparent;
	padding: 32px 20px;
}

.device-list-object-empty__inner.app-empty,
.object-scheme__empty.app-empty {
	min-height: 160px;
	border: 0;
}

.notif-empty.app-empty,
.user-invites-empty.app-empty {
	margin: 0;
	min-height: 160px;
}

.report-data-table .report-empty-state .app-empty,
.log-data-table .log-empty-state .app-empty {
	min-height: 160px;
	border: 0;
	background: transparent;
	padding: 28px 16px;
}

@media (max-width: 640px) {
	.app-empty {
		min-height: 220px;
		padding: 28px 16px;
	}

	.app-empty__title {
		font-size: 16px;
	}

	.app-empty__actions {
		width: 100%;
	}

	.app-empty__actions .ui-button {
		width: 100%;
	}
}

/* Navigation map scaffold */
.nav-fix-chip {
	display: inline-flex;
	max-width: 100%;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 3px 8px 3px 6px;
	border: 1px solid #d0d7de;
	border-radius: 4px;
	background: #f6f8fa;
	color: #334155;
	font-size: 11px;
	line-height: 1.2;
	white-space: nowrap;
}

.nav-fix-chip svg {
	width: 13px;
	height: 13px;
	flex: 0 0 13px;
	stroke-width: 1.8;
	color: #2563eb;
}

.nav-fix-chip__coords {
	overflow: hidden;
	min-width: 0;
	font-variant-numeric: tabular-nums;
	text-overflow: ellipsis;
}

.nav-fix-chip__spd {
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

.nav-fix-chip:hover {
	border-color: #2563eb;
	background: #eff6ff;
	color: #1d4ed8;
}

#page_obj_list .nav-map-page,
#padol_2.nav-map-page {
	box-sizing: border-box;
	min-height: 0;
}

html.is-nav-map #scrolldiv {
	display: flex;
	overflow: hidden;
	flex-direction: column;
}

html.is-nav-map #page_obj_list {
	display: flex !important;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	height: auto;
	padding: 0 !important;
}

html.is-nav-map #obj_list_card {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	height: 100%;
}

html.is-nav-map .obj-list-head {
	flex: 0 0 auto;
	padding: 8px 12px 0;
}

html.is-nav-map .obj-list-head__meta {
	display: flex;
}

html.is-nav-map .obj-list-head .object-section-tabs {
	margin-top: 0;
}

#obj_list_card .object-section-tabs[hidden],
#obj_list_card [data-obj-tab="nav"][hidden] {
	display: none !important;
}

html.is-nav-map #page_obj_list > br,
html.is-nav-map #obj_list_card > br {
	display: none;
}

html.is-nav-map #padol_2 {
	display: flex !important;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	padding: 10px 12px 12px;
	box-sizing: border-box;
}

html:not(.is-nav-map) #padol_2 {
	display: none !important;
}

html.is-nav-map #padol_2 > .nav-map {
	flex: 1;
	min-height: 0;
	height: auto;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__toolbar {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	width: auto;
	padding: 12px 14px;
	border: 0;
	background: transparent;
	pointer-events: none;
	transition: left .2s ease;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__toolbar > * {
	pointer-events: auto;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__body {
	flex: 1;
	min-height: 0;
	height: 100%;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__controls {
	top: 64px;
	right: 14px;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__tool-btn {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border: 0;
	border-radius: var(--ui-radius-lg);
	background: rgba(255, 255, 255, .94);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, .05),
		0 10px 24px rgba(15, 23, 42, .12);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	color: #1f2937;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__tool-btn:hover {
	background: #eff6ff;
	color: #217dff;
}

html.is-nav-map .nav-map:not(.is-table-view) .nav-map__sheet-reopen {
	top: 64px;
	left: 14px;
}

@media (min-width: 768px) {
	html.is-nav-map .nav-map:not(.is-table-view):not(.is-sheet-hidden) .nav-map__toolbar {
		left: 340px;
	}

	html.is-nav-map .nav-map:not(.is-table-view).is-sheet-hidden .nav-map__toolbar {
		left: 0;
	}
}

html.is-nav-map .nav-map.is-table-view .nav-map__toolbar {
	position: relative;
	padding: 12px 14px;
	border-bottom: 1px solid #e5e7eb;
	background: #fff;
}

html.is-nav-map .nav-map.is-table-view .nav-map__table-panel {
	padding-top: 4px;
}

html.is-nav-map .ui-back-float {
	display: none !important;
}

html.is-obj-nav .object-summary-grid,
html.is-obj-nav .object-summary-grid + br {
	display: none !important;
}

html.is-obj-nav #scrolldiv {
	overflow: hidden;
}

html.is-obj-nav #page_obj {
	padding: 4px 12px 16px !important;
	box-sizing: border-box;
}

html.is-obj-nav .object-page > br {
	display: none !important;
}

html.is-obj-nav .object-page__head {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-height: 36px;
	margin: 0 0 4px;
}

html.is-obj-nav .object-page__topline {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 6px 8px;
	min-height: 36px;
}

html.is-obj-nav .object-page__head .ui-back-link {
	flex: 0 0 auto;
	width: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	justify-content: center;
	border-radius: 10px;
}

html.is-obj-nav .object-page__title {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
	margin: 0;
}

html.is-obj-nav .object-page__title h1 {
	margin: 0 !important;
	padding: 0;
	font-size: 18px !important;
	line-height: 1.25 !important;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

html.is-obj-nav .object-page__id {
	flex: 0 0 auto;
	padding: 3px 8px !important;
	font-size: 11px !important;
}

html.is-obj-nav .object-page__addr,
html.is-obj-nav #oi_addr {
	display: none !important;
}

html.is-obj-nav .object-section-tabs {
	margin: 4px 0 6px;
}

html.is-obj-nav #pado_6 {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	min-height: 0 !important;
}

html:not(.is-obj-nav) #pado_6 {
	display: none !important;
}

html.is-zone-nav #scrolldiv {
	overflow: hidden;
}

html.is-zone-nav #page_zone {
	padding: 4px 12px 16px !important;
	box-sizing: border-box;
}

html.is-zone-nav .zone-page__head #zi_id,
html.is-zone-nav .zone-page__id {
	display: none;
}

html.is-zone-nav .zone-page {
	gap: 8px !important;
}

html.is-zone-nav .zone-page > br,
html.is-zone-nav .zone-page > * {
	margin-top: 0 !important;
}

html.is-zone-nav .zone-page > br {
	display: none !important;
}

html.is-zone-nav .zone-page__head {
	margin: 0 0 4px;
}

html.is-zone-nav .zone-page__topline {
	gap: 6px;
}

html.is-zone-nav .zone-page__head .ui-back-link {
	width: 36px;
	min-height: 36px;
	margin: 0;
	padding: 0;
	justify-content: center;
}

html.is-zone-nav .zone-page__head .ui-back-link span {
	display: none;
}

html.is-zone-nav .zone-page__title-row h1,
html.is-zone-nav .zone-page__head h1 {
	margin: 0 !important;
	font-size: 18px !important;
	line-height: 1.25 !important;
}

html.is-zone-nav .zone-updated {
	display: none;
}

html.is-zone-nav .zone-page__meta > :not(:first-child) {
	margin-left: 0;
	padding-left: 0;
	border-left: 0;
}

html.is-zone-nav .zone-section-tabs {
	margin: 4px 0 6px;
}

html.is-zone-nav #padz_4 {
	display: flex !important;
	margin: 0 !important;
}

html.is-zone-nav .ui-back-float {
	display: none !important;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed {
	position: relative;
	display: flex !important;
	flex-direction: column;
	box-sizing: border-box;
	width: 100%;
	height: calc(100dvh - 196px);
	min-height: 420px;
	max-height: calc(100dvh - 196px);
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #e8edf3;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__toolbar {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 6;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	padding: 12px 14px !important;
	border: 0;
	background: transparent;
	pointer-events: none;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__toolbar > * {
	pointer-events: auto;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__body {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	height: 100%;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__stage,
html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__table-panel {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0 !important;
	height: auto !important;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__canvas,
html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .maplibregl-map,
html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .maplibregl-canvas-container,
html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .maplibregl-canvas {
	width: 100% !important;
	height: 100% !important;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__canvas {
	border-radius: 12px;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__focus {
	top: 56px;
	right: auto;
	bottom: auto;
	left: 12px;
	width: min(300px, calc(100% - 72px));
	max-width: 300px;
	max-height: calc(100% - 68px - var(--nav-scrubber-h, 0px));
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__controls {
	top: 64px;
	right: 14px;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed.is-table-view .nav-map__table-panel {
	padding-top: 60px;
	box-sizing: border-box;
	overflow: auto;
	background: #fff;
}

html.is-obj-nav .ui-back-float {
	display: none !important;
}

html.is-zone-nav .nav-map--embed {
	height: calc(100dvh - 248px);
	max-height: calc(100dvh - 248px);
}

@media (max-width: 767px) {
	html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed {
		height: calc(100dvh - 100px - env(safe-area-inset-bottom, 0px));
		min-height: 420px;
		max-height: none;
	}

	html.is-zone-nav .nav-map--embed {
		height: calc(100dvh - 132px - env(safe-area-inset-bottom, 0px));
		max-height: none;
	}

	html.is-obj-nav #page_obj,
	html.is-zone-nav #page_zone {
		padding-bottom: 0 !important;
	}

	html.is-obj-nav .object-page__title h1 {
		font-size: 16px !important;
	}

	html.is-zone-nav .zone-page__head h1 {
		font-size: 16px !important;
	}
}

.nav-map--embed .nav-map__toolbar {
	border-bottom: 0;
	padding: 12px 14px;
	background: transparent;
}

/* Карта/Сводка — тот же ui-segmented, что и вкладки объекта; без отдельного градиента */
.nav-map--embed .nav-map__view-switch {
	min-height: 0;
}

.nav-map--embed .nav-map__toolbar > .nav-map__ghost {
	height: 40px;
	border: 0;
	border-radius: 10px;
	background: #fff;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, .05),
		0 4px 14px rgba(15, 23, 42, .08);
}

.nav-map-page,
.nav-map {
	height: 100%;
}

.nav-map {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

/* Full-height map only when the nav surface is actually active */
html.is-nav-map .nav-map-page .nav-map,
html.is-nav-map #padol_2 .nav-map {
	min-height: calc(100vh - 132px);
}

.nav-map.is-table-view {
	background: #fff;
}

.nav-map__toolbar {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
	z-index: 5;
	padding: 8px;
	border-bottom: 1px solid #e5e7eb;
	background: #fff;
}

.nav-map__view-switch {
	flex: 0 0 auto;
}

.nav-map__view-switch:empty {
	display: none !important;
}

.nav-map__view-switch button svg {
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
}

.nav-map__search--toolbar {
	flex: 1 1 auto;
	max-width: 380px;
	margin-left: auto;
	height: 38px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

.nav-map__search-fab {
	display: none;
}

.nav-map__focus-grab {
	display: none;
}

.nav-map__body {
	position: relative;
	display: flex;
	flex: 1;
	min-height: 0;
}

.nav-map.is-table-view .nav-map__stage,
.nav-map.is-table-view .nav-map__sheet,
.nav-map.is-table-view .nav-map__pin,
.nav-map.is-table-view .nav-map__focus {
	display: none !important;
}

.nav-map:not(.is-table-view) .nav-map__table-panel {
	display: none !important;
}

.nav-map__table-panel {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
	padding: 12px;
	overflow: hidden;
	background: #f3f5f8;
}

.nav-map__ops-kpis {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	flex: 0 0 auto;
}

.nav-map__ops-kpi {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	color: #64748b;
	font: inherit;
	cursor: pointer;
	text-align: left;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.nav-map__ops-kpi span {
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
}

.nav-map__ops-kpi strong {
	color: #111827;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1;
}

.nav-map__ops-kpi:hover {
	border-color: #cbd5e1;
}

.nav-map__ops-kpi.is-active {
	border-color: #93c5fd;
	background: #eff6ff;
	box-shadow: 0 0 0 1px rgba(59, 130, 246, .18);
	color: #1d4ed8;
}

.nav-map__ops-kpi--moving strong { color: #15803d; }
.nav-map__ops-kpi--offline strong { color: #6b7280; }
.nav-map__ops-kpi--alarm strong { color: #b91c1c; }
.nav-map__ops-kpi--moving.is-active { border-color: #86efac; background: #f0fdf4; color: #166534; }
.nav-map__ops-kpi--offline.is-active { border-color: #cbd5e1; background: #f8fafc; color: #475569; }
.nav-map__ops-kpi--alarm.is-active { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }

.nav-map__ops-body {
	display: grid;
	grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
	gap: 12px;
	flex: 1;
	min-height: 0;
}

.nav-map__ops-fleet {
	display: flex;
	flex-direction: column;
	min-height: 0;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
}

.nav-map__ops-fleet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid #eef2f7;
}

.nav-map__ops-fleet-head strong {
	color: #111827;
	font-size: 13px;
	font-weight: 700;
}

.nav-map__ops-fleet-count {
	color: #94a3b8;
	font-size: 12px;
}

.nav-map__ops-fleet-list {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 6px;
}

.nav-map__ops-fleet-empty {
	padding: 24px 14px;
	color: #94a3b8;
	font-size: 13px;
	text-align: center;
}

.nav-map__ops-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	padding: 10px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background .14s ease;
}

.nav-map__ops-row:hover {
	background: #f8fafc;
}

.nav-map__ops-row.is-active {
	background: #eff6ff;
}

.nav-map__ops-row.is-alarm.is-active {
	background: #fef2f2;
}

.nav-map__ops-row-main {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.nav-map__ops-row-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.nav-map__ops-row-top strong {
	overflow: hidden;
	color: #111827;
	font-size: 13px;
	font-weight: 650;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__ops-row-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	color: #94a3b8;
	font-size: 11px;
}

.nav-map__ops-row-meta em {
	font-style: normal;
}

.nav-map__ops-row-meta em.is-alarm {
	color: #b91c1c;
	font-weight: 600;
}

.nav-map__ops-detail,
.nav-map__spotlight {
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	overflow: auto;
}

.nav-map__ops-detail-inner {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 14px 16px 16px;
}

.nav-map__ops-detail-empty {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 32px 20px;
	color: #94a3b8;
	text-align: center;
}

.nav-map__ops-detail-empty strong {
	color: #64748b;
	font-size: 15px;
}

.nav-map__ops-detail-empty span {
	max-width: 280px;
	font-size: 13px;
	line-height: 1.4;
}

.nav-map__ops-detail-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.nav-map__ops-detail-title {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.nav-map__ops-detail-title h2 {
	margin: 0;
	color: #111827;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.25;
}

.nav-map__ops-detail-title p {
	margin: 2px 0 0;
	color: #94a3b8;
	font-size: 12px;
}

.nav-map__ops-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.nav-map__ops-section-head strong {
	color: #111827;
	font-size: 13px;
	font-weight: 700;
}

.nav-map__ops-section-head span {
	color: #94a3b8;
	font-size: 12px;
}

.nav-map__ops-section-head span.is-ok { color: #15803d; font-weight: 650; }
.nav-map__ops-section-head span.is-off { color: #6b7280; font-weight: 650; }

.nav-map__ops-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: #fef2f2;
	color: #b91c1c !important;
	font-size: 12px !important;
	font-weight: 700;
}

.nav-map__ops-cargo-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	gap: 2px 16px;
	align-items: center;
	padding: 14px 16px;
	border: 1px solid #e5eaf0;
	border-radius: 12px;
	background: #fff;
}

.nav-map__ops-cargo-hero span {
	grid-column: 1;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 650;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.nav-map__ops-cargo-hero strong {
	grid-column: 2;
	grid-row: 1 / span 2;
	color: #0f172a;
	font-size: 28px;
	font-weight: 750;
	letter-spacing: -.03em;
	line-height: 1;
	text-align: right;
	white-space: nowrap;
}

.nav-map__ops-cargo-hero em {
	grid-column: 1;
	color: #64748b;
	font-size: 12px;
	font-style: normal;
}

.nav-map__ops-cargo-hero.is-alarm {
	border-color: #fecaca;
	background: #fef2f2;
}

.nav-map__ops-cargo-hero.is-alarm strong {
	color: #b91c1c;
}

.nav-map__ops-cargo {
	padding: 12px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #f8fafc;
}

.nav-map__ops-cargo .nav-map__ops-section-head {
	margin-bottom: 10px;
}

.nav-map__ops-cargo-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.nav-map__ops-cargo-tile {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	padding: 10px 11px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}

.nav-map__ops-cargo-tile span {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.nav-map__ops-cargo-tile strong {
	color: #0f172a;
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -.02em;
	line-height: 1.15;
}

.nav-map__ops-cargo-tile em {
	color: #94a3b8;
	font-size: 11px;
	font-style: normal;
	line-height: 1.3;
}

.nav-map__ops-cargo-tile.is-alarm {
	border-color: #fca5a5;
	background: #fff7f7;
}

.nav-map__ops-cargo-tile.is-alarm strong {
	color: #b91c1c;
}

.nav-map__ops-cargo-tile.is-off strong {
	color: #6b7280;
}

.nav-map__ops-metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.nav-map__ops-metric {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	padding: 10px 11px;
	border: 1px solid #eef2f7;
	border-radius: 10px;
	background: #f8fafc;
}

.nav-map__ops-metric span {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.nav-map__ops-metric strong {
	color: #0f172a;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.25;
	word-break: break-word;
}

.nav-map__ops-metric--wide {
	grid-column: 1 / -1;
}

.nav-map__ops-metric--wide strong {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	font-weight: 600;
}

.nav-map__ops-metric.is-ok strong { color: #15803d; }
.nav-map__ops-metric.is-off strong { color: #6b7280; }
.nav-map__ops-metric.is-alarm strong { color: #b91c1c; }

.nav-map__ops-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.nav-map__ops-cards--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nav-map__ops-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding: 12px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #f8fafc;
}

.nav-map__ops-power {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}

.nav-map__ops-power-val {
	color: #0f172a;
	font-size: 28px;
	font-weight: 750;
	letter-spacing: -.03em;
	line-height: 1;
}

.nav-map__ops-power-val.is-ok { color: #15803d; }
.nav-map__ops-power-val.is-alarm { color: #b91c1c; }

.nav-map__ops-card .nav-map__ops-section-head {
	margin-bottom: 0;
}

.nav-map__ops-card-facts {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nav-map__ops-card-facts > div {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	gap: 2px 10px;
	align-items: center;
	padding: 8px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}

.nav-map__ops-card-facts > div > span {
	grid-column: 1;
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.nav-map__ops-card-facts > div > strong {
	grid-column: 2;
	grid-row: 1 / span 2;
	color: #0f172a;
	font-size: 14px;
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

.nav-map__ops-card-facts > div > em {
	grid-column: 1;
	color: #64748b;
	font-size: 12px;
	font-style: normal;
}

.nav-map__ops-card-facts .nav-map__ops-meter {
	grid-column: 1 / -1;
	margin-top: 4px;
}

.nav-map__ops-meter {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	height: 14px;
}

.nav-map__ops-meter span {
	display: block;
	flex: 1;
	min-width: 0;
	border-radius: 2px;
	background: #e2e8f0;
}

.nav-map__ops-meter--sig span:nth-child(1) { height: 4px; }
.nav-map__ops-meter--sig span:nth-child(2) { height: 7px; }
.nav-map__ops-meter--sig span:nth-child(3) { height: 10px; }
.nav-map__ops-meter--sig span:nth-child(4) { height: 14px; }

.nav-map__ops-meter--bat span { height: 8px; }

.nav-map__ops-meter span.is-on {
	background: #3b82f6;
}

.nav-map__ops-meter.is-lev-0 span.is-on { background: #ef4444; }
.nav-map__ops-meter.is-lev-1 span.is-on { background: #f59e0b; }
.nav-map__ops-meter.is-lev-2 span.is-on { background: #3b82f6; }
.nav-map__ops-meter.is-lev-3 span.is-on { background: #22c55e; }

.nav-map__ops-meter.is-empty span {
	background: #e2e8f0;
}

.nav-map__ops-card .nav-map__track-period {
	margin-top: 2px;
}

.nav-map__ops-spark {
	padding: 12px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #f8fafc;
}

.nav-map__ops-spark .nav-map__ops-section-head {
	margin-bottom: 8px;
}

.nav-map__ops-spark-svg {
	display: block;
	width: 100%;
	height: 56px;
	color: #2563eb;
}

.nav-map__ops-spark.is-empty .nav-map__ops-empty-note {
	margin: 0;
}

.nav-map__ops-move {
	padding: 12px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #f8fafc;
}

.nav-map__ops-move-grid {
	display: grid;
	grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
}

.nav-map__ops-speed {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	padding: 12px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.nav-map__ops-speed strong {
	color: #0f172a;
	font-size: 28px;
	font-weight: 750;
	letter-spacing: -.03em;
	line-height: 1;
}

.nav-map__ops-speed span {
	color: #94a3b8;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.nav-map__ops-move-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.nav-map__ops-move-facts > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 10px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.nav-map__ops-move-facts span {
	color: #94a3b8;
	font-size: 11px;
}

.nav-map__ops-move-facts strong {
	color: #111827;
	font-size: 13px;
	font-weight: 650;
	word-break: break-word;
}

.nav-map__ops-violations {
	padding: 12px;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	background: #fff;
}

.nav-map__ops-violations.is-ok {
	background: #f8fafc;
}

.nav-map__ops-vcards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-map__ops-vcard {
	padding: 10px 12px;
	border: 1px solid #fecaca;
	border-radius: 10px;
	background: #fef2f2;
}

.nav-map__ops-vcard--offline {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.nav-map__ops-vcard-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.nav-map__ops-vcard-top strong {
	color: #111827;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.35;
}

.nav-map__ops-vcard-val {
	margin: 6px 0 0;
	color: #b91c1c;
	font-size: 14px;
	font-weight: 700;
}

.nav-map__ops-vcard--offline .nav-map__ops-vcard-val {
	color: #475569;
}

.nav-map__ops-vcard-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin-top: 6px;
	color: #94a3b8;
	font-size: 11px;
}

.nav-map__ops-vcard-meta b {
	color: #64748b;
	font-weight: 650;
}

.nav-map__ops-empty-note {
	margin: 0;
	color: #94a3b8;
	font-size: 13px;
}

.nav-map__ops-timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav-map__ops-timeline-item {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr);
	gap: 10px;
	position: relative;
	padding: 0 0 14px;
}

.nav-map__ops-timeline-item:last-child {
	padding-bottom: 0;
}

.nav-map__ops-timeline-item:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 5px;
	top: 14px;
	bottom: 0;
	width: 2px;
	background: #fecaca;
}

.nav-map__ops-timeline-dot {
	width: 12px;
	height: 12px;
	margin-top: 3px;
	border-radius: 999px;
	background: #ef4444;
	box-shadow: 0 0 0 3px #fee2e2;
}

.nav-map__ops-timeline-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}

.nav-map__ops-timeline-top strong {
	color: #111827;
	font-size: 13px;
}

.nav-map__ops-timeline-body p {
	margin: 0 0 6px;
	color: #475569;
	font-size: 13px;
	line-height: 1.4;
}

.nav-map__ops-timeline-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	color: #94a3b8;
	font-size: 11px;
}

.nav-map__ops-timeline-meta b {
	color: #64748b;
	font-weight: 650;
}

@media (max-width: 1100px) {
	.nav-map__ops-cards--3 {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 959px) {
	.nav-map__ops-body {
		grid-template-columns: 1fr;
		grid-template-rows: auto minmax(220px, 1fr);
	}

	.nav-map__ops-detail {
		order: -1;
		min-height: 280px;
	}

	.nav-map__ops-fleet {
		max-height: 280px;
	}
}

@media (max-width: 640px) {
	.nav-map__ops-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nav-map__ops-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nav-map__ops-cargo-grid,
	.nav-map__ops-cards,
	.nav-map__ops-cards--3 {
		grid-template-columns: 1fr;
	}

	.nav-map__ops-move-grid {
		grid-template-columns: 1fr;
	}
}

/* legacy table styles kept for embeds / older markup */
.nav-map__stats {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}

.nav-map__stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 14px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

.nav-map__stat span {
	color: #6b7280;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__stat strong {
	color: #111827;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -.02em;
	line-height: 1.1;
}

.nav-map__stat--moving strong { color: #15803d; }
.nav-map__stat--stopped strong { color: #1d4ed8; }
.nav-map__stat--offline strong { color: #6b7280; }
.nav-map__stat--alarm strong { color: #b91c1c; }

.nav-map__filters--table {
	align-self: stretch;
	flex: 0 0 auto;
	width: 100%;
	max-width: 100%;
	min-height: 40px;
	margin-top: 0;
	margin-bottom: 0;
	box-sizing: border-box;
}

.nav-map__table-wrap {
	position: relative;
	flex: 1;
	min-height: 220px;
	overflow: auto;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

.nav-map__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.nav-map__table th,
.nav-map__table td {
	padding: 12px 14px;
	border-bottom: 1px solid #f3f4f6;
	text-align: left;
	vertical-align: middle;
	white-space: nowrap;
}

.nav-map__table th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: #f9fafb;
	color: #6b7280;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.nav-map__table tbody tr {
	cursor: pointer;
	transition: background-color .14s ease;
}

.nav-map__table tbody tr:hover {
	background: #f9fafb;
}

.nav-map__table tbody tr.is-active {
	background: #eff6ff;
}

.nav-map__table td strong {
	display: block;
	color: #111827;
	font-weight: 600;
}

.nav-map__td-sub {
	display: block;
	margin-top: 2px;
	color: #9ca3af;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__td-mono {
	font-variant-numeric: tabular-nums;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	color: #4b5563;
}

.nav-map__table-empty {
	padding: 36px 16px;
	color: #9ca3af;
	font-size: 13px;
	text-align: center;
}

.nav-map__stage {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 240px;
	overflow: hidden;
	background: #f3f4f6;
	--nav-scrubber-h: 0px;
}

.nav-map__match-toast,
.nav-map__track-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 600;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	max-width: min(92%, 420px);
	padding: 14px 18px;
	border-radius: 16px;
	background: rgba(17, 24, 39, 0.92);
	color: #f9fafb;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	pointer-events: none;
}

.nav-map__match-toast[hidden],
.nav-map__track-loader[hidden] {
	display: none !important;
}

.nav-map__track-loader-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nav-map__track-loader-text strong {
	font-size: 14px;
	font-weight: 650;
}

.nav-map__track-loader-sub {
	color: rgba(249, 250, 251, 0.72);
	font-size: 12px;
	font-weight: 500;
}

.nav-map__track-loader.is-empty {
	background: rgba(15, 23, 42, 0.82);
}

.nav-map__match-spin {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.28);
	border-top-color: #86efac;
	animation: nav-match-spin 0.7s linear infinite;
	flex: 0 0 auto;
}

.nav-map__match-spin[hidden] {
	display: none !important;
}

@keyframes nav-match-spin {
	to { transform: rotate(360deg); }
}

html[data-theme="dark"] .nav-map__match-toast,
html[data-theme="dark"] .nav-map__track-loader {
	background: rgba(15, 23, 42, 0.94);
	color: #e5e7eb;
}

/* Лоадер трека: затемнение sibling-оверлеем — НЕ filter на canvas (ломает WebGL/линию). */
.nav-map__stage.is-track-drawing::after,
.nav-map__stage.is-track-empty::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: var(--nav-scrubber-h, 0px);
	z-index: 2;
	pointer-events: none;
	background: rgba(15, 23, 42, 0.28);
	transition: background .2s ease;
}

.nav-map__stage.is-track-empty::after {
	background: rgba(15, 23, 42, 0.12);
}

.nav-map__stage:has(.nav-map__track-scrubber:not([hidden])) {
	--nav-scrubber-h: 72px;
}

.nav-map__stage:has(.nav-map__track-scrubber.has-vals:not([hidden])) {
	--nav-scrubber-h: 104px;
}

.nav-map__stage > .nav-map__canvas {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	height: auto;
	inset: auto;
	overflow: hidden;
	background: transparent;
}

.nav-map__pin {
	display: none !important;
}

.nav-map__pin span {
	display: block;
	width: 18px;
	height: 18px;
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	background: #217dff;
	transform: rotate(-45deg);
}

.nav-map__pin--moving span { background: #16a34a; }
.nav-map__pin--stopped span { background: #217dff; }
.nav-map__pin--offline span { background: #9ca3af; }
.nav-map__pin--nofix span { background: #f59e0b; }

.nav-map__focus,
.nav-map__spotlight {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px;
	border: 1px solid rgba(15, 23, 42, .08);
	border-radius: 16px;
	background: rgba(255, 255, 255, .94);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, .06),
		0 12px 28px rgba(15, 23, 42, .12);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.nav-map__ops .nav-map__ops-detail,
.nav-map__ops .nav-map__spotlight {
	gap: 0;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	background: #fff;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}

.nav-map__focus {
	position: absolute;
	right: 14px;
	bottom: calc(14px + var(--nav-scrubber-h, 0px));
	z-index: 500;
	box-sizing: border-box;
	width: min(300px, calc(100% - 28px));
	max-width: 300px;
	max-height: min(520px, calc(100% - 28px - var(--nav-scrubber-h, 0px)));
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 16px;
}

.nav-map__focus.is-details {
	gap: 10px;
}

.nav-map__focus.is-details .nav-map__focus-meta {
	gap: 4px 10px;
	font-size: 11px;
}

.nav-map__focus.is-details .nav-map__chip-row {
	display: none;
}

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__stage:has(.nav-map__track-scrubber:not([hidden])) .nav-map__focus {
	max-height: calc(100% - 56px - var(--nav-scrubber-h, 0px) - 8px);
}

.nav-map__focus-top {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

.nav-map__focus > * {
	min-width: 0;
}

.nav-map__focus-title {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	gap: 3px;
}

.nav-map__focus-title strong {
	overflow: hidden;
	color: #0f172a;
	font-size: 15px;
	font-weight: 650;
	letter-spacing: -.02em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__focus-title span,
.nav-map__focus-note {
	color: #64748b;
	font-size: 12px;
	line-height: 1.35;
}

.nav-map__focus-note {
	margin: 0;
}

.nav-map__focus-hero {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.nav-map__focus-hero.is-alarm {
	border-color: #fecaca;
	background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
}

.nav-map__focus-hero.is-off {
	opacity: .72;
}

.nav-map__focus-hero-label {
	color: #64748b;
	font-size: 11px;
	font-weight: 500;
}

.nav-map__focus-hero-value {
	color: #0f172a;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

.nav-map__focus-hero.is-alarm .nav-map__focus-hero-value {
	color: #b91c1c;
}

.nav-map__focus-hero-meta {
	color: #94a3b8;
	font-size: 11px;
	font-style: normal;
}

.nav-map__focus-params {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.nav-map__focus-param {
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
}

.nav-map__focus-param.is-alarm {
	border-color: #fecaca;
	background: #fff1f2;
}

.nav-map__focus-param.is-off {
	opacity: .7;
}

.nav-map__focus-param span {
	display: block;
	overflow: hidden;
	color: #9ca3af;
	font-size: 10px;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__focus-param strong {
	display: block;
	overflow: hidden;
	margin-top: 1px;
	color: #111827;
	font-size: 13px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__focus-param.is-alarm strong {
	color: #b91c1c;
}

.nav-map__focus-param em {
	display: block;
	overflow: hidden;
	margin-top: 2px;
	color: #94a3b8;
	font-size: 10px;
	font-style: normal;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map-marker-wrap.is-selected .nav-map-marker {
	box-shadow:
		0 0 0 3px rgba(33, 125, 255, .35),
		0 2px 8px rgba(15, 23, 42, .25);
	transform: scale(1.15);
}

.nav-map__focus .nav-map__badge {
	flex: 0 0 auto;
	margin-top: 1px;
}

.nav-map__chip-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
}

.nav-map__chip-btn {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	min-height: 58px;
	padding: 10px 10px;
	border: 1px solid rgba(15, 23, 42, .06);
	border-radius: 12px;
	background: #f8fafc;
	text-align: left;
	font: inherit;
}

button.nav-map__chip-btn {
	cursor: pointer;
}

button.nav-map__chip-btn:hover,
button.nav-map__chip-btn.is-action:hover {
	border-color: rgba(33, 125, 255, .28);
	background: #eff6ff;
}

.nav-map__chip-btn.is-alarm {
	border-color: rgba(239, 68, 68, .22);
	background: #fef2f2;
}

.nav-map__chip-btn span {
	color: #94a3b8;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.2;
	text-transform: uppercase;
}

.nav-map__chip-btn strong {
	color: #0f172a;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.nav-map__chip-btn.is-alarm strong {
	color: #dc2626;
}

.nav-map__focus-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding-top: 2px;
	color: #64748b;
	font-size: 12px;
}

.nav-map__focus-meta b {
	color: #0f172a;
	font-weight: 600;
}

.nav-map__focus-grid,
.nav-map__kpis,
.nav-map__facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
}

.nav-map__focus-grid div,
.nav-map__kpis > div,
.nav-map__facts > div {
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
}

.nav-map__focus-grid span,
.nav-map__kpis span,
.nav-map__facts span,
.nav-map__chips > span {
	display: block;
	color: #9ca3af;
	font-size: 10px;
	font-weight: 500;
}

.nav-map__focus-grid strong,
.nav-map__kpis strong,
.nav-map__facts strong {
	display: block;
	overflow: hidden;
	margin-top: 1px;
	color: #111827;
	font-size: 12px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__focus-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
}

.nav-map__focus-actions .nav-map__ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 32px;
	padding: 0 10px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__track-period {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 3px;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #f9fafb;
}

.nav-map__track-period button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 26px;
	padding: 0 7px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: #4b5563;
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
}

.nav-map__track-period button.is-active {
	background: #217dff;
	color: #fff;
}

.nav-map__track-period button:hover:not(.is-active) {
	background: #eff6ff;
	color: #1d4ed8;
}

/* Ползунок просмотра трека — overlay без backdrop-filter (давал «пятно» и мерцание). */
.nav-map__track-scrubber {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 6;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 14px 12px;
	background: transparent;
	border: 0;
	pointer-events: none;
	isolation: isolate;
}

.nav-map__track-scrubber::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -6px;
	bottom: 0;
	z-index: -1;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, .55) 38%,
		rgba(248, 250, 252, .92) 100%
	);
	pointer-events: none;
}

html[data-theme="dark"] .nav-map__track-scrubber::before {
	background: linear-gradient(
		180deg,
		rgba(15, 23, 42, 0) 0%,
		rgba(15, 23, 42, .55) 38%,
		rgba(15, 23, 42, .92) 100%
	);
}

.nav-map__track-scrubber > * {
	pointer-events: auto;
}

.nav-map__track-scrubber[hidden] {
	display: none !important;
}

.nav-map__track-scrubber-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-height: 24px;
}

.nav-map__scrub-chip {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 1px 3px rgba(15, 23, 42, .1);
	color: #374151;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	white-space: nowrap;
}

button.nav-map__scrub-chip {
	cursor: pointer;
	transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.nav-map__scrub-chip--live {
	color: #6b7280;
}

.nav-map__scrub-chip--live.is-active {
	background: #111827;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .28);
	color: #fff;
}

.nav-map__scrub-chip--time {
	color: #1f2937;
	font-variant-numeric: tabular-nums;
}

.nav-map__scrub-chip--state.nav-map__scrub-chip--normal {
	background: rgba(236, 253, 245, .82);
	color: #15803d;
}

.nav-map__scrub-chip--state.nav-map__scrub-chip--violation {
	background: rgba(254, 242, 242, .82);
	color: #b91c1c;
}

.nav-map__scrub-chip--state.nav-map__scrub-chip--offline {
	background: rgba(255, 255, 255, .78);
	color: #9ca3af;
}

.nav-map__track-scrubber-vals {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	min-height: 0;
}

.nav-map__track-scrubber-vals[hidden] {
	display: none !important;
}

.nav-map__scrub-chip--val {
	gap: 5px;
	height: auto;
	min-height: 24px;
	padding: 4px 10px;
}

.nav-map__scrub-chip--val em {
	color: #64748b;
	font-style: normal;
	font-size: 10px;
	font-weight: 600;
	max-width: 88px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__scrub-chip--val strong {
	color: #0f172a;
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.nav-map__scrub-chip--val.is-alarm {
	background: rgba(254, 242, 242, .92);
}

.nav-map__scrub-chip--val.is-alarm em,
.nav-map__scrub-chip--val.is-alarm strong {
	color: #b91c1c;
}

.nav-map__scrub-chip--more {
	background: rgba(255, 255, 255, .72);
	color: #64748b;
	font-size: 10px;
}

.nav-map__scrub-chip--empty {
	background: rgba(255, 255, 255, .72);
	color: #9ca3af;
	font-size: 10px;
	font-weight: 500;
}

.nav-map__track-scrubber-rail {
	position: relative;
	height: 28px;
	display: flex;
	align-items: center;
}

.nav-map__track-scrub-segments {
	position: absolute;
	left: 8px;
	right: 8px;
	top: 50%;
	height: 8px;
	margin: 0;
	transform: translateY(-50%);
	display: block;
	border-radius: 999px;
	overflow: hidden;
	background: #e5e7eb;
	font-size: 0;
	line-height: 0;
	pointer-events: none;
}

html[data-theme="dark"] .nav-map__track-scrub-segments {
	background: #374151;
}

.nav-map__track-scrub-seg-fill {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
}

.nav-map__track-scrub-seg {
	display: none;
}

.nav-map__track-scrub-seg--normal { background: #22c55e; }
.nav-map__track-scrub-seg--violation { background: #ef4444; }
.nav-map__track-scrub-seg--offline { background: #94a3b8; }

.nav-map__track-scrub-range {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 28px;
	margin: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.nav-map__track-scrub-range:focus {
	outline: none;
}

.nav-map__track-scrub-range::-webkit-slider-runnable-track {
	height: 8px;
	background: transparent;
	border: 0;
}

.nav-map__track-scrub-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	margin-top: -4px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #111827;
	box-shadow: 0 1px 4px rgba(15, 23, 42, .28);
	box-sizing: border-box;
}

.nav-map__track-scrub-range::-moz-range-track {
	height: 8px;
	background: transparent;
	border: 0;
}

.nav-map__track-scrub-range::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #111827;
	box-shadow: 0 1px 4px rgba(15, 23, 42, .28);
	box-sizing: border-box;
}

.nav-map__scrub-marker {
	width: 14px;
	height: 14px;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 6px rgba(15, 23, 42, .28);
}

.nav-map__scrub-marker--normal { background: #22c55e; }
.nav-map__scrub-marker--violation { background: #ef4444; }
.nav-map__scrub-marker--offline { background: #d1d5db; }

html:is(.is-obj-nav, .is-zone-nav) .nav-map--embed .nav-map__stage {
	padding-bottom: 0;
}

.nav-map__ghost {
	height: 32px;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	background: #fff;
	color: #374151;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	box-shadow:
		0 1px 2px rgba(15, 23, 42, .05),
		0 4px 14px rgba(15, 23, 42, .08);
}

.nav-map__toolbar > .nav-map__ghost {
	margin-left: auto;
	height: 40px;
	padding: 0 14px;
	font-size: 13px;
}

.nav-map__ghost:hover {
	border-color: transparent;
	background: #f9fafb;
	color: #217dff;
}

.nav-map__hero {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

.nav-map__hero-copy h2 {
	margin: 8px 0 4px;
	color: #111827;
	font-size: 20px;
	font-weight: 600;
}

.nav-map__hero-copy p {
	margin: 0;
	color: #6b7280;
	font-size: 13px;
}

.nav-map__hero-speed {
	text-align: right;
}

.nav-map__hero-speed strong {
	display: block;
	color: #111827;
	font-size: 24px;
	font-weight: 600;
	line-height: 1;
}

.nav-map__hero-speed span {
	color: #6b7280;
	font-size: 12px;
}

.nav-map__summary {
	gap: 0;
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: auto;
	padding: 4px 2px 8px;
	box-sizing: border-box;
	background: transparent;
}

/* —— Dense operator dash (Сводка) —— */

.nav-map__dash {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.nav-map__dash-strip {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.nav-map__dash-strip-meta {
	font-size: 12px;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

.nav-map__dash-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 10px;
	align-items: stretch;
}

.nav-map__dash-speed {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	padding: 14px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #f8fafc;
	min-width: 0;
}

.nav-map__dash-speed > strong {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.1;
	color: #0f172a;
	font-variant-numeric: tabular-nums;
	letter-spacing: -.02em;
}

.nav-map__dash-compass {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #475569;
}

.nav-map__dash-compass svg {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	color: #217dff;
}

.nav-map__dash-compass-label {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.nav-map__dash-sensor {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #fff;
}

.nav-map__dash-sensor.is-alarm {
	border-color: #fecaca;
	background: #fff7f7;
}

.nav-map__dash-sensor.is-off {
	border-color: #e2e8f0;
	background: #f8fafc;
}

.nav-map__dash-sensor > span {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #94a3b8;
}

.nav-map__dash-sensor > strong {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: #0f172a;
	word-break: break-word;
}

.nav-map__dash-sensor > em {
	font-size: 12px;
	font-style: normal;
	color: #64748b;
	line-height: 1.35;
}

.nav-map__dash-coords {
	font-variant-numeric: tabular-nums;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: -.01em;
}

.nav-map__dash-health {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.nav-map__dash-tile {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	padding: 12px 12px 10px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.nav-map__dash-tile > span {
	font-size: 11px;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.nav-map__dash-tile > strong {
	font-size: 16px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.2;
}

.nav-map__dash-tile > strong.is-ok { color: #16a34a; }
.nav-map__dash-tile > strong.is-off { color: #64748b; }
.nav-map__dash-tile > strong.is-alarm { color: #dc2626; }

.nav-map__dash-tile > em {
	font-size: 12px;
	font-style: normal;
	color: #64748b;
	line-height: 1.35;
}

.nav-map__dash-tile .nav-map__ops-meter {
	margin-top: 6px;
}

.nav-map__dash .nav-map__ops-spark {
	margin: 0;
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.nav-map__dash .nav-map__track-period {
	margin: 0;
	justify-content: flex-start;
}

.nav-map__dash-sec-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.nav-map__dash-sec-head strong {
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
}

.nav-map__dash-sec-head span,
.nav-map__dash-muted {
	font-size: 12px;
	color: #94a3b8;
}

.nav-map__dash-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: #fef2f2;
	color: #b91c1c !important;
	font-size: 11px !important;
	font-weight: 700;
}

.nav-map__dash-viol {
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
}

.nav-map__dash-viol.is-ok {
	background: #f0fdf4;
	border-color: #bbf7d0;
}

.nav-map__dash-viol-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nav-map__dash-viol-item {
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #fecaca;
	background: #fff7f7;
}

.nav-map__dash-viol-item--offline {
	border-color: #e2e8f0;
	background: #f8fafc;
}

.nav-map__dash-viol-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.nav-map__dash-viol-top strong {
	font-size: 13px;
	font-weight: 600;
	color: #0f172a;
}

.nav-map__dash-viol-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin-top: 4px;
	font-size: 12px;
	color: #64748b;
}

.nav-map__dash-viol-msg {
	margin: 6px 0 0;
	font-size: 11px;
	line-height: 1.4;
	color: #94a3b8;
}

.nav-map__dash-zones {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 3px;
	border-radius: 12px;
	background: #eef1f5;
	width: fit-content;
	max-width: 100%;
}

.nav-map__dash-zones button {
	appearance: none;
	border: 0;
	margin: 0;
	min-height: 30px;
	padding: 0 12px;
	border-radius: 9px;
	background: transparent;
	color: #64748b;
	font: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.nav-map__dash-zones button.is-active {
	background: var(--ui-primary) !important;
	color: #fff !important;
	box-shadow: 0 1px 3px rgba(27, 109, 255, .28);
}

.nav-map__dash-zones button:not(.is-active):hover {
	background: rgba(255, 255, 255, .7);
	color: #334155;
}

.nav-map__dash-actions {
	margin-top: 2px;
	flex-wrap: wrap;
}

html[data-theme="dark"] .nav-map__dash-speed,
html[data-theme="dark"] .nav-map__dash-sensor,
html[data-theme="dark"] .nav-map__dash-tile,
html[data-theme="dark"] .nav-map__dash-viol,
html[data-theme="dark"] .nav-map__dash .nav-map__ops-spark {
	background: #172033;
	border-color: #334155;
}

html[data-theme="dark"] .nav-map__dash-speed > strong,
html[data-theme="dark"] .nav-map__dash-sensor > strong,
html[data-theme="dark"] .nav-map__dash-tile > strong,
html[data-theme="dark"] .nav-map__dash-viol-top strong,
html[data-theme="dark"] .nav-map__dash-sec-head strong {
	color: #e7edf5;
}

html[data-theme="dark"] .nav-map__dash-zones {
	background: #131c2b;
}

@media (max-width: 720px) {
	.nav-map__dash-hero,
	.nav-map__dash-health {
		grid-template-columns: 1fr;
	}

	.nav-map__dash-speed > strong {
		font-size: 24px;
	}
}

/* —— Cargo monitoring summary —— */

.nav-map__cargo {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	padding: 2px;
}

.nav-map__cargo-strip {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.nav-map__cargo-strip-meta {
	font-size: 12px;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

.nav-map__cargo-strip-hw {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
}

.nav-map__cargo-strip-hw .is-ok { color: #059669; }
.nav-map__cargo-strip-hw .is-off { color: #94a3b8; }

.nav-map__cargo-top {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
}

.nav-map__cargo-hero {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 10px;
	min-width: 0;
}

.nav-map__cargo-hero.is-empty,
.nav-map__cargo-kpi.is-empty,
.nav-map__cargo-charts.is-empty,
.nav-map__cargo-events.is-ok {
	padding: 14px 16px;
}

.nav-map__cargo-card,
.nav-map__cargo-kpi,
.nav-map__cargo-charts,
.nav-map__cargo-trip,
.nav-map__cargo-events,
.nav-map__cargo-equip {
	padding: 12px 14px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	box-sizing: border-box;
}

.nav-map__cargo-card.is-alarm {
	border-color: #fecaca;
	background: #fff7f7;
}

.nav-map__cargo-card.is-off {
	opacity: .78;
}

.nav-map__cargo-card-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.nav-map__cargo-card-top em {
	font-style: normal;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: #94a3b8;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 55%;
}

.nav-map__cargo-card-val {
	display: block;
	margin-top: 4px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.15;
	color: #0f172a;
	font-variant-numeric: tabular-nums;
}

.nav-map__cargo-card.is-alarm .nav-map__cargo-card-val {
	color: #b91c1c;
}

.nav-map__cargo-trend {
	display: inline-block;
	margin-top: 2px;
	font-size: 12px;
	font-style: normal;
	font-weight: 600;
}

.nav-map__cargo-trend.is-up { color: #dc2626; }
.nav-map__cargo-trend.is-down { color: #2563eb; }

.nav-map__cargo-card-meta {
	margin-top: 6px;
	font-size: 11px;
	color: #94a3b8;
}

.nav-map__cargo-gauge {
	margin-top: 10px;
}

.nav-map__cargo-gauge.is-nilimit {
	font-size: 11px;
	color: #94a3b8;
}

.nav-map__cargo-gauge-track {
	position: relative;
	height: 8px;
	border-radius: 999px;
	background: #eef2f7;
	overflow: visible;
}

.nav-map__cargo-gauge-band {
	position: absolute;
	top: 0;
	bottom: 0;
	border-radius: 999px;
	background: rgba(34, 197, 94, .35);
}

.nav-map__cargo-gauge-needle {
	position: absolute;
	top: -3px;
	width: 3px;
	height: 14px;
	margin-left: -1.5px;
	border-radius: 2px;
	background: #0f172a;
	box-shadow: 0 0 0 2px #fff;
}

.nav-map__cargo-gauge-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 4px;
	font-size: 10px;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
}

.nav-map__cargo-sec-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.nav-map__cargo-sec-head strong {
	font-size: 13px;
	font-weight: 650;
	color: #0f172a;
}

.nav-map__cargo-sec-head span {
	font-size: 11px;
	color: #94a3b8;
	text-align: right;
}

.nav-map__cargo-kpi-grid,
.nav-map__cargo-trip-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
	gap: 8px;
}

.nav-map__cargo-kpi-grid > div,
.nav-map__cargo-trip-grid > div {
	padding: 8px 10px;
	border-radius: 10px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}

.nav-map__cargo-kpi-grid span,
.nav-map__cargo-trip-grid span {
	display: block;
	font-size: 10px;
	font-weight: 600;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.nav-map__cargo-kpi-grid strong,
.nav-map__cargo-trip-grid strong {
	display: block;
	margin-top: 2px;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	font-variant-numeric: tabular-nums;
}

.nav-map__cargo-note {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: #64748b;
}

.nav-map__cargo-charts .nav-map__track-period {
	margin-bottom: 10px;
}

.nav-map__cargo-chart-block + .nav-map__cargo-chart-block {
	margin-top: 12px;
}

.nav-map__cargo-chart {
	width: 100%;
	min-height: 220px;
	height: 240px;
}

.nav-map__cargo-speed {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #eef2f7;
}

.nav-map__cargo-speed-strip {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.nav-map__cargo-speed-plot {
	position: relative;
	width: 100%;
}

.nav-map__cargo-speed-svg {
	display: block;
	width: 100%;
	height: 64px;
	border-radius: 10px;
	overflow: hidden;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}

.nav-map__cargo-speed-bg {
	fill: #f1f5f9;
}

.nav-map__cargo-speed-stop {
	fill: rgba(148, 163, 184, .18);
}

.nav-map__cargo-speed-area {
	fill: rgba(33, 125, 255, .18);
}

.nav-map__cargo-speed-line {
	stroke: #217dff;
	stroke-width: 2;
	stroke-linejoin: round;
	stroke-linecap: round;
}

.nav-map__cargo-speed-base {
	stroke: #cbd5e1;
	stroke-width: 1;
}

.nav-map__cargo-speed-scale {
	display: flex;
	justify-content: space-between;
	margin-top: 2px;
	font-size: 10px;
	color: #94a3b8;
	font-variant-numeric: tabular-nums;
}

.nav-map__cargo-speed-legend {
	display: flex;
	gap: 12px;
	font-size: 11px;
	color: #64748b;
}

.nav-map__cargo-speed-legend .is-move::before,
.nav-map__cargo-speed-legend .is-stop::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 5px;
	border-radius: 3px;
	vertical-align: -1px;
}

.nav-map__cargo-speed-legend .is-move::before {
	background: rgba(33, 125, 255, .55);
}

.nav-map__cargo-speed-legend .is-stop::before {
	background: rgba(148, 163, 184, .45);
}

.nav-map__cargo-bottom {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: 12px;
	align-items: start;
}

.nav-map__cargo-side {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.nav-map__cargo-event-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 320px;
	overflow: auto;
}

.nav-map__cargo-event {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr);
	gap: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	background: #f8fafc;
	border: 1px solid #eef2f7;
}

.nav-map__cargo-event--alarm {
	background: #fff7f7;
	border-color: #fecaca;
}

.nav-map__cargo-event--offline {
	background: #f8fafc;
	border-color: #e2e8f0;
}

.nav-map__cargo-event-time {
	font-size: 11px;
	font-weight: 650;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

.nav-map__cargo-event-body strong {
	display: block;
	font-size: 13px;
	color: #0f172a;
}

.nav-map__cargo-event-body span {
	display: block;
	margin-top: 1px;
	font-size: 11px;
	color: #64748b;
}

.nav-map__cargo-equip > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	list-style: none;
}

.nav-map__cargo-equip > summary::-webkit-details-marker {
	display: none;
}

.nav-map__cargo-equip > summary strong {
	font-size: 13px;
	color: #0f172a;
}

.nav-map__cargo-equip-icons {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
}

.nav-map__cargo-equip-icons .is-ok { color: #059669; }
.nav-map__cargo-equip-icons .is-off { color: #94a3b8; }

.nav-map__cargo-equip-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
	padding-top: 10px;
	border-top: 1px solid #eef2f7;
}

.nav-map__cargo-equip-row {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 2px 10px;
	align-items: baseline;
}

.nav-map__cargo-equip-row span {
	grid-row: span 2;
	font-size: 11px;
	font-weight: 600;
	color: #94a3b8;
}

.nav-map__cargo-equip-row strong {
	font-size: 13px;
	color: #0f172a;
}

.nav-map__cargo-equip-row strong.is-ok { color: #059669; }
.nav-map__cargo-equip-row strong.is-off,
.nav-map__cargo-equip-row strong.is-alarm { color: #b91c1c; }

.nav-map__cargo-equip-row em {
	font-style: normal;
	font-size: 11px;
	color: #64748b;
}

.nav-map__cargo-equip-meter {
	margin-top: 2px;
}

.nav-map__cargo-equip .nav-map__dash-zones {
	margin-top: 4px;
}

.nav-map__cargo-actions {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	grid-template-columns: none;
}

.nav-map__cargo-actions .nav-map__ghost {
	flex: 1 1 calc(50% - 8px);
	width: auto;
	min-width: 140px;
	height: 42px;
	padding: 0 14px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	color: #0f172a;
	font-size: 13px;
	font-weight: 600;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
}

.nav-map__cargo-actions .nav-map__ghost:hover {
	border-color: #bfdbfe;
	background: #f8fbff;
	color: #1d4ed8;
}

.nav-map__cargo-actions .nav-map__ghost.is-active {
	border-color: #93c5fd;
	background: #eff6ff;
	color: #1d4ed8;
	box-shadow: inset 0 0 0 1px rgba(33, 125, 255, .12);
}

@media (max-width: 900px) {
	.nav-map__cargo-top,
	.nav-map__cargo-bottom {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.nav-map__cargo-card-val {
		font-size: 24px;
	}

	.nav-map__cargo-chart {
		min-height: 180px;
		height: 200px;
	}

	.nav-map__cargo-strip-hw {
		margin-left: 0;
		width: 100%;
	}

	.nav-map__cargo-event {
		grid-template-columns: 64px minmax(0, 1fr);
	}
}

html[data-theme="dark"] .nav-map__cargo-card,
html[data-theme="dark"] .nav-map__cargo-kpi,
html[data-theme="dark"] .nav-map__cargo-charts,
html[data-theme="dark"] .nav-map__cargo-trip,
html[data-theme="dark"] .nav-map__cargo-events,
html[data-theme="dark"] .nav-map__cargo-equip,
html[data-theme="dark"] .nav-map__cargo-hero.is-empty {
	background: #172033;
	border-color: #334155;
}

html[data-theme="dark"] .nav-map__cargo-card.is-alarm,
html[data-theme="dark"] .nav-map__cargo-event--alarm {
	background: #2a1a22;
	border-color: #5b2a38;
}

html[data-theme="dark"] .nav-map__cargo-card-val,
html[data-theme="dark"] .nav-map__cargo-sec-head strong,
html[data-theme="dark"] .nav-map__cargo-kpi-grid strong,
html[data-theme="dark"] .nav-map__cargo-trip-grid strong,
html[data-theme="dark"] .nav-map__cargo-event-body strong,
html[data-theme="dark"] .nav-map__cargo-equip > summary strong,
html[data-theme="dark"] .nav-map__cargo-equip-row strong {
	color: #e7edf5;
}

html[data-theme="dark"] .nav-map__cargo-kpi-grid > div,
html[data-theme="dark"] .nav-map__cargo-trip-grid > div,
html[data-theme="dark"] .nav-map__cargo-event {
	background: #1a2436;
	border-color: #2a3a52;
}

html[data-theme="dark"] .nav-map__cargo-gauge-track {
	background: #1a2436;
}

html[data-theme="dark"] .nav-map__cargo-gauge-needle {
	background: #e7edf5;
	box-shadow: 0 0 0 2px #172033;
}

html[data-theme="dark"] .nav-map__cargo-equip-body,
html[data-theme="dark"] .nav-map__cargo-speed {
	border-top-color: #2a3a52;
}

html[data-theme="dark"] .nav-map__cargo-speed-svg {
	background: #131c2b;
	border-color: #334155;
}

html[data-theme="dark"] .nav-map__cargo-speed-bg {
	fill: #1a2436;
}

html[data-theme="dark"] .nav-map__cargo-speed-stop {
	fill: rgba(100, 116, 139, .28);
}

html[data-theme="dark"] .nav-map__cargo-speed-area {
	fill: rgba(96, 165, 250, .22);
}

html[data-theme="dark"] .nav-map__cargo-speed-line {
	stroke: #60a5fa;
}

html[data-theme="dark"] .nav-map__cargo-speed-base {
	stroke: #475569;
}

html[data-theme="dark"] .nav-map__cargo-actions .nav-map__ghost {
	background: #172033;
	border-color: #334155;
	color: #e7edf5;
}

html[data-theme="dark"] .nav-map__cargo-actions .nav-map__ghost:hover,
html[data-theme="dark"] .nav-map__cargo-actions .nav-map__ghost.is-active {
	background: #1e293b;
	border-color: #475569;
	color: #93c5fd;
}

.nav-map__chips div {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 6px;
}

.nav-map__chip {
	display: inline-flex;
	align-items: center;
	height: 26px;
	padding: 0 10px;
	border-radius: 8px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__placeholder {
	display: flex;
	box-sizing: border-box;
	height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px 20px 88px;
	color: #6b7280;
	text-align: center;
}

.nav-map__placeholder-icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	background: #fff;
	color: #217dff;
}

.nav-map__placeholder svg,
.nav-map__placeholder-icon svg {
	width: 22px;
	height: 22px;
	stroke-width: 1.6;
	color: inherit;
}

.nav-map__placeholder strong {
	color: #111827;
	font-size: 16px;
	font-weight: 600;
}

.nav-map__placeholder span {
	max-width: 340px;
	font-size: 13px;
	line-height: 1.45;
	color: #6b7280;
}

.nav-map__placeholder.is-quiet {
	opacity: 0;
	pointer-events: none;
}

.nav-map__open-full {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	height: 34px;
	padding: 0 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	color: #111827;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__sheet {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
	display: flex;
	height: 48%;
	max-height: calc(100% - 56px);
	flex-direction: column;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.nav-map.is-collapsed .nav-map__sheet {
	height: 84px;
}

.nav-map__grab {
	display: block;
	width: 36px;
	height: 4px;
	margin: 8px auto 4px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: #d1d5db;
}

.nav-map__peek {
	display: none;
	flex-direction: column;
	gap: 2px;
	padding: 0 16px 10px;
}

.nav-map.is-collapsed .nav-map__peek {
	display: flex;
}

.nav-map.is-collapsed .nav-map__sheet-body {
	display: none;
}

.nav-map__peek strong,
.nav-map__item strong {
	color: #111827;
	font-size: 14px;
	font-weight: 600;
}

.nav-map__peek span {
	color: #6b7280;
	font-size: 12px;
}

.nav-map__sheet-body {
	display: flex;
	min-height: 0;
	flex: 1;
	flex-direction: column;
	padding: 12px;
}

.nav-map__sheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.nav-map__sheet-head strong {
	color: #111827;
	font-size: 14px;
	font-weight: 600;
}

.nav-map__sheet-head .nav-map__result {
	margin-left: auto;
}

.nav-map__tool-btn,
.nav-map__sheet-hide,
.nav-map__sheet-reopen {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: var(--ui-radius-md);
	background: #fff;
	color: #374151;
	cursor: pointer;
}

.nav-map__tool-btn,
.nav-map__sheet-hide {
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	padding: 0;
}

.nav-map__sheet-hide {
	border: 0;
	border-radius: 0;
	background: transparent;
	color: #6b7280;
	box-shadow: none;
}

.nav-map__tool-btn svg,
.nav-map__sheet-hide svg,
.nav-map__controls button svg,
.nav-map__sheet-reopen svg {
	display: block;
	width: 18px;
	height: 18px;
	flex: 0 0 auto;
	overflow: visible;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.nav-map__tool-btn:hover,
.nav-map__sheet-reopen:hover {
	background: #f8fafc;
	color: #217dff;
}

.nav-map__sheet-hide:hover {
	border: 0;
	background: transparent;
	color: #217dff;
}

.nav-map__controls {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 500;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--ui-space-2);
	pointer-events: none;
}

.nav-map__controls-zoom,
.nav-map__controls-btn {
	pointer-events: auto;
	border: 0;
	background: rgba(255, 255, 255, .96);
	box-shadow:
		0 1px 2px rgba(15, 23, 42, .05),
		0 4px 14px rgba(15, 23, 42, .08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #475569;
}

.nav-map__controls-zoom {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	width: 42px;
	border-radius: 12px;
}

.nav-map__controls-zoom button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.nav-map__controls-zoom button + button {
	border-top: 1px solid rgba(15, 23, 42, .06);
}

.nav-map__controls-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border-radius: 12px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, transform .15s ease;
}

.nav-map__controls-zoom button:hover,
.nav-map__controls-btn:hover {
	background: #f8fafc;
	color: #0f172a;
}

.nav-map__controls-zoom button:active,
.nav-map__controls-btn:active {
	background: #f1f5f9;
	color: #0f172a;
	transform: scale(.97);
}

.nav-map__controls-zoom button:focus-visible,
.nav-map__controls-btn:focus-visible {
	outline: 2px solid #217dff;
	outline-offset: 2px;
}

.nav-map__controls button svg {
	width: 20px;
	height: 20px;
	display: block;
}

.nav-map__sheet-reopen {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 500;
	gap: 6px;
	height: 36px;
	padding: 0 12px 0 8px;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__sheet-reopen[hidden] {
	display: none !important;
}

.nav-map.is-table-view .nav-map__controls,
.nav-map.is-table-view .nav-map__sheet-reopen,
.nav-map.is-table-view .nav-map__tool-btn {
	display: none !important;
}

.nav-map-marker-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0 !important;
	background: transparent !important;
	cursor: pointer;
	opacity: 1 !important;
	visibility: visible !important;
	will-change: transform;
}

.maplibregl-marker {
	opacity: 1 !important;
}

.nav-map-marker {
	display: block;
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #217dff;
	box-sizing: border-box;
	pointer-events: none;
	opacity: 1 !important;
}

.nav-map-marker--moving { background: #16a34a; }
.nav-map-marker--stopped { background: #217dff; }
.nav-map-marker--offline { background: #9ca3af; }
.nav-map-marker--nofix { background: #f59e0b; }

.nav-map__ghost.is-active {
	border-color: #217dff;
	background: #eff6ff;
	color: #1d4ed8;
}

.nav-map .maplibregl-map {
	width: 100%;
	height: 100%;
	font: inherit;
}

.nav-map .maplibregl-ctrl-attrib {
	background: rgba(255,255,255,.88);
	color: #6b7280;
	font-size: 10px;
	box-shadow: none;
}

.nav-map .maplibregl-ctrl-attrib a {
	color: #4b5563;
}

.nav-map .maplibregl-canvas:focus {
	outline: none;
}

.nav-map__search {
	display: flex;
	height: 38px;
	align-items: center;
	gap: 8px;
	padding: 0 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

.nav-map__search svg {
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
	stroke-width: 1.8;
	opacity: .55;
}

.nav-map__search input {
	width: 100%;
	height: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	color: #111827;
	font-size: 13px;
}

.nav-map__filters {
	display: flex;
	flex: 0 0 auto;
	align-items: stretch;
	gap: 2px;
	padding: 3px;
	margin-bottom: 10px;
	overflow-x: auto;
	overflow-y: hidden;
	border: 0;
	border-radius: 14px;
	background: #eef1f5;
	scrollbar-width: none;
	box-sizing: border-box;
}

.nav-map__filters::-webkit-scrollbar {
	display: none;
}

.nav-map__filters button {
	display: inline-flex !important;
	height: 38px !important;
	min-height: 38px !important;
	flex: 1 1 0 !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0 12px !important;
	border: 0;
	border-radius: 11px;
	background: transparent;
	color: #64748b !important;
	font-size: 12px !important;
	font-weight: 600;
	line-height: 1.2 !important;
	letter-spacing: -.01em;
	white-space: nowrap;
	cursor: pointer;
	opacity: 1 !important;
	transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}

.nav-map__filters button:hover {
	color: #334155 !important;
	background: rgba(255, 255, 255, .55);
}

.nav-map__filters button.is-active {
	background: #fff !important;
	color: var(--ui-primary) !important;
	box-shadow: none;
}

.nav-map__filters em {
	min-width: 18px;
	padding: 1px 6px;
	border-radius: 999px;
	background: rgba(15, 23, 42, .06);
	color: #64748b;
	font-size: 10px;
	font-style: normal;
	font-weight: 700;
	text-align: center;
}

.nav-map__filters button.is-active em {
	background: rgba(33, 125, 255, .1);
	color: currentColor;
}

.nav-map__result {
	color: #9ca3af;
	font-size: 12px;
	font-weight: 500;
}

.nav-map__list {
	display: flex;
	min-height: 0;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	overflow-y: auto;
	padding-right: 2px;
}

.nav-map__item {
	display: flex;
	width: 100%;
	align-items: stretch;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	color: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .16s ease, background-color .16s ease;
}

.nav-map__item:hover {
	background: #f9fafb;
}

.nav-map__item.is-active {
	border-color: #217dff;
	background: #eff6ff;
}

.nav-map__item-dot {
	flex: 0 0 8px;
	width: 8px;
	border-radius: 999px;
	background: #9ca3af;
}

.nav-map__item > .nav-map__item-dot {
	align-self: stretch;
	margin: 16px 0 16px 12px;
}

.nav-map__focus-top .nav-map__item-dot {
	height: 8px;
}

.nav-map__item-dot--moving { background: #16a34a; }
.nav-map__item-dot--stopped { background: #217dff; }
.nav-map__item-dot--offline { background: #9ca3af; }
.nav-map__item-dot--nofix { background: #f59e0b; }

.nav-map__item-main {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
	gap: 3px;
	padding: 11px 12px 11px 10px;
}

.nav-map__item-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nav-map__item-top strong {
	min-width: 0;
	overflow: hidden;
	color: #111827;
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__badge {
	flex: 0 0 auto;
	padding: 3px 8px;
	border-radius: 8px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
}

.nav-map__badge--moving {
	background: #ecfdf5;
	color: #15803d;
}

.nav-map__badge--stopped {
	background: #eff6ff;
	color: #1d4ed8;
}

.nav-map__badge--offline {
	background: #f3f4f6;
	color: #6b7280;
}

.nav-map__badge--nofix {
	background: #fffbeb;
	color: #b45309;
}

.nav-map__badge--alarm {
	background: #fef2f2;
	color: #b91c1c;
}

.nav-map__td-alarm,
.nav-map__item-alarm {
	color: #b91c1c !important;
	font-weight: 600;
}

.nav-map__item.is-alarm,
.nav-map__table tr.is-alarm td {
	background: #fffafa;
}

.nav-map__violations {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 10px;
	border: 1px solid #fecaca;
	border-radius: 10px;
	background: #fff;
	max-height: 160px;
	overflow: auto;
}

.nav-map__violations.is-ok {
	border-color: #bbf7d0;
	background: #f0fdf4;
	max-height: none;
}

.nav-map__violations.is-ok strong {
	color: #166534;
	font-size: 13px;
}

.nav-map__violations.is-ok span {
	color: #15803d;
	font-size: 12px;
}

.nav-map__violations-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.nav-map__violations-head strong {
	color: #991b1b;
	font-size: 13px;
	font-weight: 600;
}

.nav-map__violations-head span {
	color: #b91c1c;
	font-size: 12px;
}

.nav-map__violation {
	padding: 7px 8px;
	border: 1px solid #fee2e2;
	border-radius: 8px;
	background: #fef2f2;
}

.nav-map__violation-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 4px;
}

.nav-map__violation-top strong {
	color: #111827;
	font-size: 13px;
}

.nav-map__violation-msg {
	color: #7f1d1d;
	font-size: 12px;
	margin-bottom: 6px;
}

.nav-map__violation-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	color: #6b7280;
	font-size: 11px;
}

.nav-map__violation-meta b {
	color: #111827;
	font-weight: 600;
}

.nav-map__hero.is-alarm {
	border-color: #fecaca;
	background: #fff7f7;
}

.nav-map__spotlight {
	max-height: none;
}

.nav-map__item-sub,
.nav-map__item-coords {
	overflow: hidden;
	color: #6b7280;
	font-size: 12px;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nav-map__item-coords {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #4b5563;
	font-variant-numeric: tabular-nums;
}

.nav-map__item-coords em {
	color: #9ca3af;
	font-style: normal;
}

.nav-map__dot,
.nav-map__item-body,
.nav-map__item-meta {
	display: none;
}

.nav-map__list-empty {
	padding: 28px 12px;
	color: #9ca3af;
	font-size: 13px;
	text-align: center;
}

.nav-map__summary-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 100%;
	height: 100%;
	padding: 28px 20px;
}

.nav-map__summary-empty .app-empty {
	width: 100%;
	max-width: 440px;
	min-height: 240px;
}

.nav-map--dash,
.nav-map--embed {
	min-height: 480px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
}

.nav-map--dash .nav-map__stage,
.nav-map--embed .nav-map__stage {
	min-height: 360px;
}

.nav-map--dash,
.nav-map--embed {
	height: auto;
}

.nav-map--embed {
	display: flex;
}

.nav-map--embed .nav-map__focus {
	left: 12px;
	right: auto;
	width: min(300px, calc(100% - 72px));
	max-width: 300px;
	max-height: calc(100% - 68px - var(--nav-scrubber-h, 0px));
}

.nav-map__embed-list,
.nav-map__embed-meta {
	max-height: 280px;
	overflow-y: auto;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.nav-map__meta-card {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 14px;
}

.nav-map__meta-card span {
	display: block;
	color: #6b7280;
	font-size: 11px;
}

.nav-map__meta-card strong {
	color: #111827;
	font-size: 13px;
	font-weight: 600;
}

@media (min-width: 768px) {
	.nav-map {
		min-height: calc(100vh - 148px);
	}

	.nav-map__sheet {
		top: 0;
		right: auto;
		bottom: 0;
		left: 0;
		width: 340px;
		height: auto !important;
		max-height: none;
		border: 0;
		border-right: 1px solid #e5e7eb;
		border-radius: 0;
	}

	.nav-map.is-collapsed .nav-map__sheet {
		height: auto !important;
	}

	.nav-map__grab,
	.nav-map__peek,
	.nav-map.is-collapsed .nav-map__peek {
		display: none;
	}

	.nav-map.is-collapsed .nav-map__sheet-body,
	.nav-map__sheet-body {
		display: flex;
	}

	.nav-map.is-sheet-hidden .nav-map__sheet {
		display: none;
	}

	.nav-map.is-sheet-hidden .nav-map__focus {
		left: 12px;
		right: auto;
		max-width: min(300px, calc(100% - 72px));
	}

	.nav-map:not(.is-sheet-hidden):not(.nav-map--embed) .nav-map__focus {
		max-width: min(300px, calc(100% - 28px));
	}

	.nav-map__placeholder {
		padding-bottom: 24px;
	}

	.nav-map--dash,
	.nav-map--embed {
		min-height: 520px;
	}
}

@media (max-width: 767px) {
	.nav-map__sheet-hide,
	.nav-map__tool-btn[data-nav-sheet-toggle] {
		display: none;
	}

	.nav-map__sheet-reopen {
		display: none !important;
	}

	.nav-map__controls {
		top: auto;
		bottom: calc(48% + 12px);
		right: 10px;
	}

	.nav-map.is-collapsed .nav-map__controls {
		bottom: 108px;
	}
}

@media (max-width: 900px) {
	.nav-map__stats,
	.nav-map__ops-kpis,
	.nav-map__kpis,
	.nav-map__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.nav-map__toolbar {
		flex-wrap: wrap;
	}

	.nav-map__search--toolbar {
		max-width: none;
		width: 100%;
		margin-left: 0;
		order: 2;
	}

	.nav-map__view-switch {
		order: 1;
	}

	.nav-map__ghost {
		margin-left: auto;
	}

	.nav-map__stats {
		grid-template-columns: 1fr 1fr;
	}

	.nav-map__table th:nth-child(5),
	.nav-map__table td:nth-child(5) {
		display: none;
	}

	.nav-map__hero {
		flex-direction: column;
		align-items: flex-start;
	}

	.nav-map__hero-speed {
		text-align: left;
	}

	.nav-map.is-collapsed .nav-map__focus {
		bottom: calc(96px + var(--nav-scrubber-h, 0px));
		max-height: min(440px, calc(100% - 108px - var(--nav-scrubber-h, 0px)));
	}
}

@media (max-width: 767px) {
	#scrolldiv > #page_map.page {
		padding: 0 !important;
		height: 100%;
	}

	.nav-map {
		min-height: calc(100dvh - 72px);
	}

	.nav-map--dash,
	.nav-map--embed {
		min-height: calc(100dvh - 210px);
	}

	.nav-fix-chip {
		max-width: calc(100% - 8px);
	}
}

@media (max-width: 767px) {
	/* Mobile rows-as-cards: force title block to left */
	#obj_list1.dash-view-rows .device-card-summary {
		display: block !important;
		padding-right: 0 !important;
		text-align: left !important;
	}

	#obj_list1.dash-view-rows .dash-cell--zone {
		display: flex !important;
		justify-content: flex-start !important;
		align-items: center !important;
		text-align: left !important;
	}

	#obj_list1.dash-view-rows .dash-cell--zone h3,
	#obj_list1.dash-view-rows .dash-cell--obj {
		margin-left: 0 !important;
		margin-right: 0 !important;
		text-align: left !important;
	}
}

.demo-mode-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 8px 16px;
	background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
	border-bottom: 1px solid #fdba74;
	color: #9a3412;
	font-size: 13px;
	font-weight: 500;
	z-index: 60;
	position: relative;
}

.demo-mode-banner__cta {
	border: 1px solid #fb923c;
	background: #fff;
	color: #c2410c;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
}

.demo-mode-banner__cta:hover {
	background: #fff7ed;
}

.support-impersonate-banner {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	padding: 8px 16px;
	background: linear-gradient(90deg, #eff6ff 0%, #dbeafe 100%);
	border-bottom: 1px solid #93c5fd;
	color: #1e3a8a;
	font-size: 13px;
	font-weight: 500;
	z-index: 60;
	position: relative;
}
.support-impersonate-banner__cta {
	border: 1px solid #60a5fa;
	background: #fff;
	color: #1d4ed8;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
}
.support-impersonate-banner__cta:hover { background: #eff6ff; }

/* Object gateways tab (pado_7) */
.object-gateways-panel {
	margin-top: 0;
}
.object-gateways-card {
	background: var(--ui-surface, #fff);
	border: 1px solid var(--ui-border, #e5e7eb);
	border-radius: var(--ui-radius-lg, 16px);
	padding: var(--ui-space-5, 20px);
}
.object-gateways-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.object-gateways-card__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--ui-text, #111827);
}
.obj-gw-refresh-all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid var(--ui-border, #e5e7eb);
	border-radius: 10px;
	background: var(--ui-surface, #fff);
	color: var(--ui-text, #111827);
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
}
.obj-gw-refresh-all svg {
	width: 16px;
	height: 16px;
}
.obj-gw-refresh-all:hover:not(:disabled) {
	background: #f9fafb;
}
.obj-gw-refresh-all:disabled,
.obj-gw-refresh-all.is-busy {
	opacity: 0.6;
	cursor: wait;
}
.obj-gw-refresh-all.is-busy svg {
	animation: obj-gw-spin 0.9s linear infinite;
}
@keyframes obj-gw-spin {
	to { transform: rotate(360deg); }
}
.object-gateways-card .obj-gateways-empty.app-empty {
	min-height: 220px;
	border: 0;
	background: transparent;
	padding: 28px 12px;
}
.object-gateways-loading {
	padding: 20px;
	color: var(--ui-muted, #6b7280);
	font-size: 0.9rem;
}
.obj-gateways-table-wrap--skel {
	pointer-events: none;
}
.obj-gw-skel {
	display: inline-block;
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg, #eef1f5 0%, #f7f8fa 45%, #eef1f5 90%);
	background-size: 200% 100%;
	animation: obj-gw-skel-shimmer 1.25s ease-in-out infinite;
	vertical-align: middle;
}
.obj-gw-skel--status { width: 64px; }
.obj-gw-skel--sn { width: 96px; height: 14px; }
.obj-gw-skel--seen { width: 118px; }
.obj-gw-skel--phone { width: 72px; }
.obj-gw-skel--bal { width: 56px; }
.obj-gw-skel-row:nth-child(2) .obj-gw-skel--sn { width: 84px; }
.obj-gw-skel-row:nth-child(2) .obj-gw-skel--seen { width: 102px; }
.obj-gw-skel-row:nth-child(3) .obj-gw-skel--sn { width: 108px; }
.obj-gw-skel-row:nth-child(3) .obj-gw-skel--phone { width: 88px; }
@keyframes obj-gw-skel-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
	.obj-gw-skel { animation: none; }
}
.obj-gateways-table-wrap {
	overflow-x: auto;
}
.obj-gateways-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}
.obj-gateways-table th,
.obj-gateways-table td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--ui-border, #e5e7eb);
	vertical-align: middle;
}
.obj-gateways-table th {
	font-weight: 600;
	color: var(--ui-muted, #6b7280);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.obj-gw-muted {
	color: var(--ui-muted, #6b7280);
	font-size: 0.8rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.obj-gw-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--ui-muted, #6b7280);
}
.obj-gw-status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #9ca3af;
}
.obj-gw-status--on {
	color: #047857;
}
.obj-gw-status--on::before {
	background: #10b981;
}
.obj-gw-balance-at {
	color: var(--ui-muted, #6b7280);
	font-size: 0.75rem;
	font-weight: 400;
}
.obj-gw-th-hint {
	display: inline-block;
	margin-left: 4px;
	font-size: 0.65rem;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ui-muted, #9ca3af);
	vertical-align: middle;
}
.obj-gw-seen--live {
	color: #047857;
	font-weight: 500;
}
.obj-gw-actions {
	width: 44px;
	text-align: right;
}
.obj-gw-refresh-one {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--ui-muted, #6b7280);
	cursor: pointer;
}
.obj-gw-refresh-one svg {
	width: 16px;
	height: 16px;
}
.obj-gw-refresh-one:hover {
	background: #f3f4f6;
	color: var(--ui-text, #111827);
	border-color: var(--ui-border, #e5e7eb);
}

/* Legal / cookies UX */
.rc-cookie-bar {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 80;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--ui-border, #e5e7eb);
	background: var(--ui-surface, #fff);
	box-shadow: 0 12px 32px rgba(0,0,0,.12);
	max-width: 720px;
	margin: 0 auto;
}
.rc-cookie-bar__text { flex: 1; font-size: 13px; color: var(--ui-muted, #4b5563); line-height: 1.4; }
.rc-cookie-bar__text a { color: var(--ui-primary, #217dff); }
.rc-cookie-bar__btn {
	flex: 0 0 auto;
	height: 36px;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: var(--ui-primary, #217dff);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.rc-legal-banner {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(15,23,42,.45);
}
.rc-legal-banner__card {
	width: min(480px, 100%);
	padding: 18px;
	border-radius: 14px;
	background: var(--ui-surface, #fff);
	border: 1px solid var(--ui-border, #e5e7eb);
	box-shadow: 0 20px 48px rgba(0,0,0,.2);
}
.rc-legal-banner__card strong { display: block; margin-bottom: 8px; font-size: 16px; }
.rc-legal-banner__card p { margin: 0 0 12px; font-size: 13px; color: var(--ui-muted, #4b5563); }
.rc-legal-banner__check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin-bottom: 14px; }
.rc-legal-banner__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
	.rc-cookie-bar { flex-direction: column; align-items: stretch; }
}

/* === Borderless UI pass (resting borders off) === */
.linec,
.form-control,
.form-control-border,
.report-control,
.log-control,
.notif-native-select,
.entity-form-select,
.notif-settings-card input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.notif-settings-card textarea,
.notif-settings-card select,
.object-period-panel input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.object-period-panel select,
.zone-period-panel input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.zone-period-panel select,
.user-edit-panel input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.user-edit-panel textarea,
.user-edit-panel select,
.profile-card input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]),
.profile-card textarea,
.profile-card select,
.support-composer textarea,
.ticket-composer textarea,
.support-form-field input,
.support-form-field textarea,
.support-chat-composer textarea,
.app-lang__btn,
.reports-toolbar__trigger,
.report-zone-search,
.notification-field__control,
.notification-field > select,
.zone-parameter-action,
.notification-color-button,
.notification-recipient-row input,
.measurement-modal__field input,
.measurement-range input,
.device-filter-chip,
.calendar-select,
.period-picker__presets .hrs,
.profile-lang-select__control,
.notif-chip,
.notif-item__btn,
.notif-inbox-page__icon-btn,
.service-theme-option {
	border: 1px solid transparent !important;
	background-color: var(--ui-control-bg) !important;
	box-shadow: none !important;
}

.notif-chip.is-active,
.notif-panel__filters .notif-chip.is-active,
.notif-item__btn--primary,
.service-theme-option.is-selected {
	border-color: transparent !important;
	background-color: #eef6ff !important;
}

.profile-link,
.profile-companies-list__item {
	border: 1px solid #e5eaf0 !important;
	background-color: #fff !important;
	box-shadow: none !important;
}

.profile-link:hover,
.profile-companies-list__item:hover {
	border-color: #d7dce3 !important;
	background-color: #f8fafc !important;
}

.profile-companies-list__item.is-active {
	border-color: #93c5fd !important;
	background-color: #fff !important;
}

.notif-item__btn--danger {
	border-color: transparent !important;
	background-color: #fef2f2 !important;
}

.notif-item {
	border: 1px solid transparent !important;
	background-color: #fff !important;
	box-shadow: none !important;
}

.notif-item:hover {
	border-color: #cfd8e5 !important;
	background-color: #fff !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}

.notif-item.is-unread {
	border-color: #cfe1ff !important;
	background-color: #fff !important;
}

.notif-item.is-unread:hover {
	border-color: #93c5fd !important;
	background-color: #fff !important;
	box-shadow: 0 1px 2px rgba(33, 125, 255, .08) !important;
}

.linec:hover,
.form-control:hover,
.form-control-border:hover,
.report-control:hover,
.log-control:hover,
.notif-native-select:hover,
.entity-form-select:hover,
.app-lang__btn:hover,
.reports-toolbar__trigger:hover,
.zone-parameter-action:hover:not(:disabled),
.notification-color-button:hover:not(:disabled),
.device-filter-chip:hover,
.period-picker__presets .hrs:hover {
	border-color: transparent !important;
	background-color: var(--ui-control-bg-hover) !important;
}

.linec:focus,
.linec:focus-visible,
.form-control:focus,
.form-control:focus-visible,
.form-control-border:focus,
.form-control-border:focus-visible,
.report-control:focus,
.report-control:focus-visible,
.log-control:focus,
.log-control:focus-visible,
.notif-native-select:focus,
.notif-native-select:focus-visible,
.entity-form-select:focus,
.entity-form-select:focus-visible,
.notif-settings-card input:focus,
.notif-settings-card textarea:focus,
.notif-settings-card select:focus,
.object-period-panel input:focus,
.object-period-panel select:focus,
.zone-period-panel input:focus,
.zone-period-panel select:focus,
.user-edit-panel input:focus,
.user-edit-panel textarea:focus,
.user-edit-panel select:focus,
.profile-card input:focus,
.profile-card textarea:focus,
.profile-card select:focus,
.support-composer textarea:focus,
.ticket-composer textarea:focus,
.support-form-field input:focus,
.support-form-field textarea:focus,
.support-chat-composer textarea:focus,
.notification-field > select:focus,
.notification-field__control:focus-within,
.notification-recipient-row input:focus,
.notification-recipient-row input:focus-visible,
.measurement-modal__field input:focus,
.measurement-range input:focus,
.calendar-select:focus,
.reports-toolbar__trigger:focus-visible,
.reports-toolbar__trigger[aria-expanded="true"],
.report-zone-search:focus-within,
.app-lang.is-open .app-lang__btn,
.profile-lang-select__control:focus {
	border-color: var(--ui-control-border-focus) !important;
	background-color: #fff !important;
	outline: none !important;
	box-shadow: none !important;
}

.notification-add,
.notification-panel .notification-add {
	border: 1px solid transparent !important;
	background-color: var(--ui-control-bg) !important;
	box-shadow: none !important;
}

.notification-add:hover,
.notification-add:focus-visible,
.notification-panel .notification-add:hover,
.notification-panel .notification-add:focus-visible {
	border-color: transparent !important;
	background-color: #eef6ff !important;
}

.notification-remove,
.notification-panel .notification-remove {
	border: 1px solid transparent !important;
	background-color: var(--ui-control-bg) !important;
	box-shadow: none !important;
}

.notification-remove:hover,
.notification-remove:focus-visible,
.notification-panel .notification-remove:hover,
.notification-panel .notification-remove:focus-visible {
	background-color: #fff6f7 !important;
}

.period-picker__presets .hrs.act {
	border-color: transparent !important;
	background: #eef4ff !important;
	color: var(--ui-primary, #217dff) !important;
}

/* Search wrappers: fill on shell, not on inner input */
.log-search .log-control,
.log-search .log-search__input,
.report-zone-search input {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

.log-search {
	border: 0 !important;
	background-color: var(--ui-control-bg) !important;
	box-shadow: none !important;
}

.log-search:hover {
	background-color: var(--ui-control-bg-hover) !important;
}

.log-search:focus-within,
.report-zone-search:focus-within {
	border: 1px solid var(--ui-control-border-focus) !important;
	background-color: #fff !important;
	box-shadow: none !important;
}

.report-zone-search {
	border: 1px solid transparent !important;
	background-color: var(--ui-control-bg) !important;
	box-shadow: none !important;
}

.is-invalid.linec,
.linec.is-invalid,
.form-control.is-invalid,
.form-control-border.is-invalid,
.entity-editor-control.is-invalid,
.app-dialog__input.is-invalid,
[aria-invalid="true"].linec,
[aria-invalid="true"].form-control,
[aria-invalid="true"].form-control-border,
[aria-invalid="true"].entity-editor-control {
	border-color: var(--ui-control-border-error) !important;
}

/* Surfaces / floating layers: no resting frame */
.app-modal,
.form.app-modal,
.entity-editor-modal,
.device-filter-popover,
.app-more-sheet,
.log-filter-sheet,
.zone-period-panel,
.object-period-sheet,
.object-period-panel,
.notif-panel-root .notif-panel,
.notif-settings-card,
.object-summary-card,
.object-settings-card,
.object-section-tabs,
.object-problems__empty,
.user-edit-panel,
.profile-card,
.profile-panel,
.profile-nav,
.profile-meta,
.profile-company__details,
.service-theme-option,
.notification-panel,
.app-lang__menu,
.device-row-menu,
.chart-zone-menu,
.report-time-popover,
.ios-push-guide-sheet,
.push-help-sheet,
.rc-legal-banner__card,
.object-gateways-card,
.nav-map__panel,
.obj-map__sheet {
	border: 0 !important;
}

/* Tailwind utility borders on key product cards/shells */
.border.border-gray-100,
.border.border-gray-200,
.rounded-xl.border.border-gray-100,
.rounded-xl.border.border-gray-200 {
	border-color: transparent !important;
}
