@font-face {
	font-family: "Noto Sans Hebrew";
	src: url("/map-assets/NotoSansHebrew-VariableFont_wdth,wght.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	color-scheme: dark;
	--ink: #0a0d12;
	--paper: #f4f1ea;
	--panel: rgba(7, 9, 12, 0.84);
	--panel-strong: rgba(10, 13, 18, 1);
	--accent: #00c27a;
	--accent-2: #ffb347;
	--accent-3: #4c7dff;
	--shadow: 0 22px 40px rgba(7, 9, 12, 0.25);
	--border: rgba(248, 250, 252, 0.2);
	--grey-1: #d0d0d0;
	--grey-2: #acacac;
	--grey-3: #969595;
	--navbar-height: 56px;
	--alert: #b91c1c;
	--border-radius: 12px;
	--border-radius-small: 6px;
	--safe-top: env(safe-area-inset-topm, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
	--safe-left: env(safe-area-inset-left, 0px);
	--safe-right: env(safe-area-inset-right, 0px);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Space Grotesk", sans-serif;
	background: var(--paper);
	color: var(--ink);
}

body.he {
	direction: rtl;
	font-family: "Noto Sans Hebrew", "Space Grotesk", sans-serif;
	text-align: right;
}

body.with-navbar {
	padding-top: var(--navbar-height);
}

body.with-navbar #map {
	inset: var(--navbar-height) 0 0 0;
}

body.with-navbar .topbar {
	top: calc(var(--navbar-height) + 16px + var(--safe-top));
}

body.telegram-map {
	--tg-safe-top: max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
	--tg-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
	--tg-safe-left: max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px), var(--tg-content-safe-area-inset-left, 0px));
	--tg-safe-right: max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px));
	--tg-header-offset: 32px;
}

body.telegram-map .topbar {
	top: calc(16px + var(--tg-safe-top) + var(--tg-header-offset));
	left: calc(16px + var(--tg-safe-left));
	right: calc(16px + var(--tg-safe-right));
}

body.telegram-map .bottom-btns-wrap {
	left: calc(16px + var(--tg-safe-left));
	right: calc(16px + var(--tg-safe-right));
	bottom: calc(16px + var(--tg-safe-bottom));
}

body.telegram-map .sheet {
	bottom: calc(12px + var(--tg-safe-bottom));
}

body.telegram-map .sheet.open {
	bottom: calc(72px + var(--tg-safe-bottom));
}

body.telegram-map .toast {
	bottom: calc(120px + var(--tg-safe-bottom));
}

body.telegram-map .hint {
	left: calc(20px + var(--tg-safe-left));
	bottom: calc(92px + var(--tg-safe-bottom));
}

body.telegram-map .status-btn-wrap {
	left: calc(16px + var(--tg-safe-left));
}

body.access-denied {
	background: #0f172a;
	color: #f8fafc;
}

body.access-denied #map,
body.access-denied .topbar,
body.access-denied .bottom-btns-wrap,
body.access-denied .sheet,
body.access-denied .toast {
	display: none;
}

section {
	display: block;
	padding: 64px 0;
	position: relative;
}

.container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 32px;
}

.container.wide {
	max-width: 1920px;
}

.container.full {
	max-width: 100%;
}

.access-denied-panel {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
	background: radial-gradient(circle at top, rgba(248, 250, 252, 0.08), rgba(15, 23, 42, 0.95));
	z-index: 20;
}

.access-denied-panel h2 {
	margin: 0;
	font-size: 24px;
}

.access-denied-panel p {
	margin: 0;
	font-size: 14px;
	opacity: 0.85;
}

.button {
	border: none;
	padding: 10px 14px;
	border-radius: var(--border-radius);
	background: #0f172a;
	color: #f8fafc;
	cursor: pointer;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease;
}

.button.cta {
	display: block;
	background: #2563eb;
	color: #f8fafc;
	padding: 12px 24px;
	font-size: 18px;
}

.setup-grid button.cta {
	width: 100%;
}

.button.cta:hover {
	background: #1e40af;
}

.button.icon {
	border-radius: 100vw;
}

.map-icon-button {
	width: 40px;
	height: 40px;
	padding: 0;
	border: 2px solid #fff;
	color: rgba(15, 23, 42, 0.92);
	background-color: #e5e5e5;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 24px;
}

.button.secondary {
	background: #fff;
	color: #111827;
	border: 1px solid rgba(15, 23, 42, 0.1);
	box-shadow: none;
	padding: 4px 8px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	font-weight: 700;
}

h1 {
	font-size: 50px;
	line-height: 60px;
	margin-bottom: 16px;
}

p {
	margin: 0;
}

.site-navbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--navbar-height);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 18px;
	background: rgba(10, 13, 18, 0.92);
	color: #f8fafc;
	box-shadow: 0 12px 24px rgba(7, 9, 12, 0.2);
	backdrop-filter: blur(10px);
	z-index: 30;
	direction: rtl;
	text-align: right;
	font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.nav-left,
.nav-right {
	width: 200px;
}

.site-navbar .nav-left {
	display: flex;
	align-items: start;
	gap: 10px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.site-navbar .nav-logo {
	width: 100px;
	height: 26px;
	display: block;
}

.site-navbar .nav-title {
	font-size: 14px;
	text-transform: uppercase;
}

.site-navbar .nav-links {
	display: flex;
	align-items: center;
	gap: 14px;
	overflow-x: auto;
}

.site-navbar .nav-links a {
	padding: 12px 24px;
	color: inherit;
	text-decoration: none;
	font-size: 16px;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.site-navbar .nav-links a:hover,
.site-navbar .nav-links a.active {
	color: var(--accent);
}

.site-navbar .nav-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

.site-navbar .nav-user {
	font-size: 12px;
	opacity: 0.8;
}

.site-navbar .nav-user.is-hidden {
	display: none;
}

.site-navbar .nav-admin.is-hidden {
	display: none;
}

.site-navbar .nav-links a.is-hidden {
	display: none;
}

.site-navbar .nav-logout {
	margin: 0;
}

.site-navbar .nav-logout-button {
	padding: 6px 12px;
}

#map {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 1;
}

.topbar {
	position: fixed;
	top: calc(16px + var(--safe-top));
	left: calc(16px + var(--safe-left));
	right: calc(16px + var(--safe-right));
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-radius: var(--border-radius);
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 246, 234, 0.65));
	box-shadow: var(--shadow);
	backdrop-filter: blur(12px);
	z-index: 5;
}

.title {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.title strong {
	font-size: 16px;
	letter-spacing: 0.02em;
}

.title span {
	font-size: 12px;
	opacity: 0.7;
}

.global-actions-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 100%;
}

.global-actions-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.8;
	white-space: nowrap;
}

.global-actions-list {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	max-width: 100%;
	padding-bottom: 2px;
}

.global-action-button {
	font-size: 12px;
	padding: 6px 10px;
	white-space: nowrap;
}

.bottom-btns-wrap {
	position: fixed;
	bottom: 16px;
	right: 16px;
	left: 16px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: start;
	gap: 8px;
	z-index: 10;
}

.status-wrap {
	padding: 4px 8px 4px 4px;
	border-radius: var(--border-radius);
	background: rgba(15, 23, 42, 0.85);
	box-shadow: var(--shadow);
	color: #f9fbf9;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 1ch;
	margin-right: auto;
}

.status {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px 6px;
	border-radius: var(--border-radius);
}

.layers-button {
	display: flex;
	align-items: center;
	justify-content: center;
	background-image: url("/map-assets/map_road.png");
	background-size: cover;
}

.layers-button.roads {
	background-image: url("/map-assets/map_sat.png");
}

.recenter-button {
	background-image: url("/map-assets/center.svg");
}

.locate-button {
	background-image: url("/map-assets/my_location.svg");
}

.cameras-button {
	background-image: url("/map-assets/camera.svg");
	background-size: 22px;
}

.cameras-button.active {
	background-color: var(--accent);
}

.actions-bar {
	display: flex;
	gap: 8px;
	align-items: center;
}

.sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 12px;
	width: calc(100% - 32px);
	max-width: 700px;
	margin: 0 auto;
	transform: translateY(110%);
	transition:
		transform 0.28s ease cubic-bezier(0.22, 1, 0.36, 1),
		bottom 0.28s ease cubic-bezier(0.22, 1, 0.36, 1);
	background: var(--panel);
	color: #f8fafc;
	border-radius: var(--border-radius);
	padding: 18px;
	box-shadow: var(--shadow);
	z-index: 6;
}

.sheet.open {
	transform: translateY(0);
	bottom: 72px;
}

.sheet-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.sheet-title {
	font-size: 18px;
	font-weight: 600;
}

.sheet-subtitle {
	font-size: 16px;
}

.action-list {
	display: grid;
	gap: 10px;
}

.action-card {
	display: flex;
	font-size: 14px;
	font-weight: 600;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: var(--border-radius);
	border: 1px solid rgba(248, 250, 252, 0.2);
	background: var(--panel-strong);
	cursor: pointer;
	transition:
		transform 0.2s ease,
		border-color 0.2s ease;
}

.action-card.no-actions {
	cursor: default;
	background: rgba(0, 0, 0, 0);
	border: 1px solid transparent;
	padding: 12px 0;
	color: var(--alert);
}

.action-card.no-actions:hover {
	transform: none;
	border-color: transparent;
}

.action-card:hover {
	border-color: rgba(248, 250, 252, 0.5);
	transform: translateY(-1px);
}

.action-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.action-note {
	display: none; /* Note disabled for now */
	font-size: 12px;
	opacity: 0.7;
}

.tag {
	font-size: 10px;
	padding: 2px 4px;
	border-radius: var(--border-radius);
	background: rgba(255, 255, 255, 0.12);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 120px;
	transform: translateX(-50%) translateY(40px);
	opacity: 0;
	padding: 10px 16px;
	border-radius: var(--border-radius);
	background: #0f172a;
	color: #f8fafc;
	font-size: 13px;
	transition:
		opacity 0.2s ease,
		transform 0.2s ease;
	z-index: 7;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.stream-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 13, 18, 0.7);
	backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 12;
}

.stream-panel {
	width: min(720px, 100%);
	background: rgba(15, 23, 42, 0.96);
	border-radius: var(--border-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	box-shadow: var(--shadow);
}

.stream-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	color: #f8fafc;
}

.stream-title {
	font-size: 16px;
	font-weight: 600;
}

.stream-status {
	font-size: 12px;
	opacity: 0.7;
	margin-left: auto;
}

.stream-video {
	width: 100%;
	border-radius: var(--border-radius);
	background: #000;
	aspect-ratio: 16 / 9;
}

.hint {
	position: fixed;
	left: 20px;
	bottom: 92px;
	padding: 8px 12px;
	border-radius: var(--border-radius);
	background: rgba(255, 255, 255, 0.85);
	font-size: 12px;
	box-shadow: var(--shadow);
	z-index: 4;
}

.area-label {
	padding: 2px 4px;
	border-radius: var(--border-radius);
	background: rgba(255, 255, 255, 1);
	font-size: 10px;
	font-weight: 500;
	color: #111827;
	text-align: center;
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.75);
	pointer-events: none;
	max-width: 22ch;
}

.title-status-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	font-size: 24px;
	line-height: 28px;
	margin: 0;
}

.location-marker {
	position: relative;
	width: 32px;
	height: 32px;
}

.location-pulse {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 32px;
	height: 32px;
	border-radius: var(--border-radius);
	background: rgba(37, 99, 235, 0.75);
	transform: translate(-50%, -50%);
	animation: locationPulse 2s ease-out infinite;
}

.location-dot {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 12px;
	border-radius: var(--border-radius);
	background: #2563eb;
	border: 2px solid #ffffff;
	transform: translate(-50%, -50%);
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
}

/* Show cameras toggle */
.show-cam-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

@keyframes locationPulse {
	0% {
		transform: translate(-50%, -50%) scale(0.6);
		opacity: 0.7;
	}
	100% {
		transform: translate(-50%, -50%) scale(1.5);
		opacity: 0;
	}
}

.login-card {
	width: min(420px, 100%);
	background: var(--panel);
	color: var(--paper);
	border: 1px solid var(--border);
	border-radius: var(--border-radius);
	margin-top: 40px;
	padding: 28px;
	box-shadow: var(--shadow);
}

.login-card .field {
	margin-bottom: 16px;
}

.login-card .button.cta {
	margin-right: auto;
}

.detect-layout {
	width: min(960px, 100%);
	margin: 0 auto 40px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 0 16px;
}

.detect-card {
	color: #f8fafc;
	width: 100%;
	max-width: 420px;
}

.report-card {
	margin-top: 32px;
	color: #f8fafc;
	width: 100%;
}

.login-card h1 {
	margin: 0 0 6px 0;
	font-size: 24px;
}

.field {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.field label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
	margin-bottom: 2px;
}

.field .field-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
	margin-bottom: 2px;
}

.field input {
	padding: 12px 14px;
	border-radius: var(--border-radius);
	border: 1px solid var(--border);
	font-size: 14px;
	font-family: inherit;
	direction: ltr;
	text-align: left;
}

.field textarea {
	padding: 12px 14px;
	border-radius: var(--border-radius);
	border: 1px solid var(--border);
	font-size: 14px;
	font-family: inherit;
	min-height: 120px;
	resize: vertical;
}

.field select {
	padding: 12px 14px;
	border-radius: var(--border-radius);
	border: 1px solid var(--border);
	font-size: 14px;
	font-family: inherit;
}

.field:last-child {
	margin-bottom: 16px;
}

.password-toggle {
	align-items: flex-start;
}

.password-toggle-button {
	width: 24px;
	height: 24px;
	position: absolute;
	right: 10px;
	top: 34px;
	background: url("/map-assets/visibility_off.svg");
	background-position: center;
	background-size: 16px;
	background-repeat: no-repeat;
	border: none;
}

.password-toggle-button.is-visible {
	background-image: url("/map-assets/visibility.svg");
}

.muted {
	font-size: 12px;
	opacity: 0.7;
}

.admin-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
	width: 100%;
}

.admin-actions {
	width: 100%;
	display: flex;
	justify-content: center;
	margin: 16px 0 24px;
}

.action-editor-card {
	width: min(1440px, 100%);
}

.org-select-field {
	margin-bottom: 16px;
}

.action-editor-grid {
	display: grid;
	grid-template-columns: minmax(220px, 320px) minmax(280px, 1fr);
	gap: 24px;
}

.action-editor-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.action-editor-panel input {
	direction: rtl;
	text-align: right;
}

.action-editor-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.admin-action-card {
	border: 1px dashed rgba(148, 163, 184, 0.4);
	border-radius: var(--border-radius-small);
	padding: 12px;
	background: rgba(15, 23, 42, 0.4);
}

.admin-action-card.main-card {
	background: var(--grey-3);
	color: var(--ink);
}

.new-action-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.8;
}

.admin-card-fields {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.area-actions-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.area-action-pill {
	border-radius: 999px;
	padding: 6px 12px;
	border: 1px solid rgba(148, 163, 184, 0.3);
	background: rgba(15, 23, 42, 0.6);
	color: #e2e8f0;
	font-size: 12px;
	cursor: pointer;
}

.area-action-pill.active {
	background: #38bdf8;
	color: #0f172a;
	border-color: rgba(56, 189, 248, 0.9);
}

.camera-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px;
	border-radius: var(--border-radius);
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(15, 23, 42, 0.65);
	overflow: auto;
	max-height: 800px;
}

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

.camera-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
}

.camera-name-input {
	flex: 1;
	min-width: 0;
	padding: 6px 8px;
	border-radius: 8px;
	border: 1px solid rgba(148, 163, 184, 0.4);
	background: rgba(15, 23, 42, 0.4);
	color: #e2e8f0;
	font-size: 12px;
}

.camera-id {
	opacity: 0.7;
}

.action-editor-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

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

.user-admin-card {
	width: min(640px, 100%);
}

.permissions-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.perm-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
}

.perm-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
}

.perm-options {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

.perm-option {
	display: flex;
	align-items: center;
	gap: 2px;
	font-size: 10px;
}

.perm-option input {
	width: 14px;
	height: 14px;
}

.perm-option.perm-inline {
	align-self: flex-start;
	margin-bottom: 4px;
}

.perm-dropdown {
	position: relative;
	width: 100%;
}

.perm-dropdown-toggle {
	display: flex;
	align-items: center;
	width: 100%;
	text-align: left;
	justify-content: flex-start;
	background: rgba(15, 23, 42, 0.7);
	color: #f8fafc;
	border: 1px solid rgba(248, 250, 252, 0.2);
	box-shadow: none;
}

.perm-dropdown-panel {
	position: absolute;
	width: 300px;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 5;
	background: rgba(15, 23, 42, 0.95);
	border: 1px solid rgba(248, 250, 252, 0.2);
	border-radius: var(--border-radius);
	padding: 10px;
	max-height: 600px;
	overflow: auto;
	display: none;
}

.perm-dropdown.is-open .perm-dropdown-panel {
	display: block;
}

.camera-token-input {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	padding: 6px;
	border-radius: var(--border-radius);
	border: 1px solid rgba(248, 250, 252, 0.2);
	background: rgba(15, 23, 42, 0.45);
	min-height: 40px;
}

.camera-token-input.is-disabled {
	opacity: 0.6;
}

.camera-token-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.camera-token {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	background: rgba(37, 99, 235, 0.2);
	border: 1px solid rgba(37, 99, 235, 0.4);
	border-radius: 999px;
	font-size: 11px;
}

.mapboxgl-popup.camera-popup .mapboxgl-popup-content {
	background: rgba(15, 23, 42, 0.95);
	color: #f8fafc;
	border-radius: 12px;
	padding: 10px 12px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.mapboxgl-popup.camera-popup .mapboxgl-popup-tip {
	border-top-color: rgba(15, 23, 42, 0.95);
}

.camera-popup-body {
	min-width: 120px;
}

.camera-popup-title {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 8px;
}

.camera-popup-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.camera-popup-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 240px;
	overflow: auto;
}

.camera-popup-list-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 6px 8px;
	border-radius: var(--border-radius-small);
	border: 1px solid rgba(248, 250, 252, 0.2);
	background: rgba(15, 23, 42, 0.7);
	color: #f8fafc;
	cursor: pointer;
	appearance: none;
	font-family: inherit;
	font-size: 12px;
	text-align: start;
}

.camera-popup-list-item:hover {
	border-color: rgba(248, 250, 252, 0.45);
}

.camera-popup-list-meta {
	font-size: 11px;
	opacity: 0.75;
	white-space: nowrap;
}

.camera-popup-button {
	padding: 6px 10px;
	font-size: 12px;
	justify-content: center;
}

.token-remove {
	border: none;
	background: none;
	color: #f8fafc;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	padding: 0;
}

.camera-token-field {
	flex: 1;
	min-width: 160px;
	border: none;
	background: transparent;
	color: #f8fafc;
	font-size: 12px;
	font-family: inherit;
	padding: 4px;
	direction: ltr;
	text-align: left;
}

.camera-token-field:focus {
	outline: none;
}

.modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 60;
}

.modal.is-open {
	display: flex;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, 0.7);
}

.modal-dialog {
	position: relative;
	z-index: 1;
	width: min(720px, 100%);
	max-height: 90vh;
	overflow: auto;
}

.modal-dialog .login-card {
	margin-top: 0;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.modal-close {
	padding: 6px 10px;
	font-size: 12px;
}

body.modal-open {
	overflow: hidden;
}

.error {
	position: absolute;
	bottom: 8px;
	left: 28px;
	right: 28px;
	min-height: 18px;
	font-size: 12px;
	color: #b91c1c;
}

input::placeholder {
	color: #bbbbbb;
}

::-ms-input-placeholder {
	color: #bbbbbb;
}

.result-box {
	margin: 0;
	background: rgba(15, 23, 42, 0.45);
	border-radius: var(--border-radius);
	border: 1px solid rgba(248, 250, 252, 0.2);
	padding: 12px;
	font-size: 12px;
	line-height: 1.4;
	max-height: 360px;
	overflow: auto;
	white-space: pre-wrap;
}

.table-wrap {
	width: 100%;
	margin-bottom: 12px;
	overflow-x: auto;
	overflow-y: visible;
	position: relative;
	grid-column: 1 / -1;
}

.result-table {
	direction: ltr;
	text-align: left;
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
	font-size: 14px;
}

.result-table th,
.result-table td {
	border-bottom: 1px solid rgba(248, 250, 252, 0.15);
	padding: 6px 5px;
	text-align: left;
	white-space: nowrap;
}

.result-table th {
	font-weight: 600;
	color: white;
	font-size: 12px;
}

.user-table {
	direction: ltr;
	text-align: left;
}

.user-table .table-input {
	width: 100%;
	min-width: 90px;
	background: rgba(15, 23, 42, 0.45);
	border: 1px solid rgba(248, 250, 252, 0.2);
	color: #f8fafc;
	border-radius: var(--border-radius-small);
	font-size: 12px;
	padding: 6px 12px;
	font-family: inherit;
}

.user-table .col-web-username,
.user-table .col-telegram-id {
	width: 100px;
	max-width: 100px;
}

.user-table .col-permissions {
	min-width: 160px;
}

.user-table .col-features {
	min-width: 110px;
	width: 110px;
}

.col-user-id {
	font-size: 12px;
}

.col-roles {
	width: 100px;
}

.user-table .col-groups {
	min-width: 160px;
}

.grid-3-col {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: auto;
	gap: 16px;
}

.group-card {
	background: rgba(15, 23, 42, 0.5);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: var(--border-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.group-card-header {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.group-card-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 160px;
}

.group-card-field label {
	font-size: 12px;
	color: rgba(148, 163, 184, 0.9);
}

.group-card-permissions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.group-card-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.user-activity {
	color: rgb(22, 163, 74);
}

.user-table .web-username-input,
.user-table .telegram-id-input {
	width: auto;
	max-width: 100%;
}

.user-table td {
	vertical-align: top;
	position: relative;
}

.user-table textarea.table-input {
	min-height: 80px;
	resize: vertical;
}

.table-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 120px;
}

.button.table-save {
	padding: 4px 8px;
	background: #32a85d;
}
.button.table-save:hover {
	background: #48d37b;
}
.button.table-events {
	padding: 4px 8px;
	background: #acc2f1;
	color: #000;
}
.button.table-events:hover {
	background: #ceddff;
}
.button.table-delete {
	padding: 0;
	color: #b91c1c;
	background: none;
}

.util-wrap {
	width: 100%;
	min-height: 100vh;
}

.ltr {
	direction: ltr;
	text-align: left;
}

.flex {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 24px;
}

.flex-vert {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.images-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 16px;
}

.images-wrap img {
	width: calc(50% - 8px);
}

@media (max-width: 640px) {
	.topbar {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.actions-bar {
		width: 100%;
		justify-content: space-between;
	}

	.global-actions-wrap {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
	}

	.global-actions-list {
		width: 100%;
	}
}

/* Hide bundled controls on bottom */
.gmnoprint.gm-bundled-control.gm-bundled-control-on-bottom {
	display: none !important;
}

.status-button {
	background-image: url("/map-assets/status.svg");
	background-color: var(--paper);
}
.status-btn-wrap {
	position: absolute;
	left: 16px;
}
.tooltip {
	position: absolute;
	z-index: 999;
	bottom: 50px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--ink);
	color: #fff;
	padding: 4px 8px;
	border-radius: var(--border-radius-small);
	font-size: 10px;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease;
}
.tooltip.show {
	opacity: 1;
	visibility: visible;
}

.setup-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(3, auto);
	gap: 16px;
	width: 100%;
	margin-top: 32px;
}

.admin-block {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	background: var(--panel);
	color: #f8fafc;
	border: 1px solid var(--border);
	border-radius: var(--border-radius);
	padding: 12px;
	box-shadow: var(--shadow);
}

.admin-block.wide-block {
	grid-column: 1 / span 3;
}

.admin-block:nth-child(1) {
	grid-column: 1 / span 1;
	grid-row: 1 / span 1;
}

.admin-block:nth-child(2) {
	grid-column: 2 / span 1;
	grid-row: 1 / span 1;
}

.admin-block:nth-child(3) {
	grid-column: 3 / span 1;
	grid-row: 1 / span 1;
}

.logo-wrap {
	max-width: 200px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.logo-wrap .login-logo {
	width: 100%;
	height: auto;
	display: block;
}
