.STC_ArkGoogleMap
{
	isolation: isolate;
    box-sizing: border-box;
	background: var(--CONTENT-PANEL-NORMAL-BG-COLOR);
	color: var(--CONTENT-PANEL-NORMAL-FG-COLOR);
	
    margin-left: var(--CONTENT-PANEL-NORMAL-MARGIN-L);
	margin-top: var(--CONTENT-PANEL-NORMAL-MARGIN-T);
	margin-right: var(--CONTENT-PANEL-NORMAL-MARGIN-R);
	margin-bottom: var(--CONTENT-PANEL-NORMAL-MARGIN-B);
	
	border-left: var(--CONTENT-PANEL-NORMAL-BORDER-L);
    border-top: var(--CONTENT-PANEL-NORMAL-BORDER-T);
    border-right: var(--CONTENT-PANEL-NORMAL-BORDER-R);
    border-bottom: var(--CONTENT-PANEL-NORMAL-BORDER-B);
	
	border-top-left-radius: var(--CONTENT-PANEL-NORMAL-BORDER-TL-RADIUS);
	border-top-right-radius: var(--CONTENT-PANEL-NORMAL-BORDER-TR-RADIUS);
	border-bottom-right-radius: var(--CONTENT-PANEL-NORMAL-BORDER-BR-RADIUS);
	border-bottom-left-radius: var(--CONTENT-PANEL-NORMAL-BORDER-BL-RADIUS);
	
	padding-left: var(--CONTENT-PANEL-NORMAL-PADDING-L);
	padding-top: var(--CONTENT-PANEL-NORMAL-PADDING-T);
	padding-right: var(--CONTENT-PANEL-NORMAL-PADDING-R);
	padding-bottom: var(--CONTENT-PANEL-NORMAL-PADDING-B);
}

.map .gm-style-iw {
  background-color: var(--MAP-SURFACE);
  padding: 2% 11%;
}

.map .iw-content p {
  color: var(--MAP-TEXT-MUTED);
}

.map .iw-subTitle {
  color: var(--MAP-TEXT-STRONG);
  font-size: 16px;
  font-weight: 700;
  padding: 5px 0;
}

/* ==========================================================================
   GIS Holographic Sensor Beacon & Tactical Map Styling
   ========================================================================== */

.ark-sensor-beacon-container {
	background: transparent !important;
	border: none !important;
	overflow: visible !important;
	pointer-events: auto;
}

.ark-sensor-beacon-root {
	position: relative;
	width: 140px;
	height: 80px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	user-select: none;
	cursor: pointer;
}

.ark-camera-marker {
	width: 120px;
	height: 120px;
	pointer-events: auto;
}

.ark-camera-marker-svg {
	width: 120px;
	height: 120px;
	overflow: visible;
	pointer-events: auto;
	filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}

.ark-camera-ground-base {
	fill: rgba(255, 176, 32, 0.1);
	stroke: none;
}

.ark-bearing-picker {
	position: absolute;
	left: 10px;
	bottom: 24px;
	z-index: 1000;
	padding: 8px 10px;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG, rgba(16, 24, 32, 0.88)));
	color: #ffd27a;
	font-size: 12px;
	min-width: 190px;
}

/* Higher specificity than the global input[type="range"] rules (Widget.Input.css), which paint a cyan fill with a box-shadow trick. */
input[type="range"].ark-bearing-picker-range {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	overflow: visible;
	width: 100%;
	height: 16px;
	margin: 4px 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
}

input[type="range"].ark-bearing-picker-range:focus {
	outline: none;
}

input[type="range"].ark-bearing-picker-range::-webkit-slider-runnable-track {
	height: 4px;
	margin-top: 0;
	border-radius: 2px;
	background: rgba(255, 210, 122, 0.3);
}

input[type="range"].ark-bearing-picker-range::-moz-range-track {
	height: 4px;
	padding: 0;
	border: none;
	border-radius: 2px;
	background: rgba(255, 210, 122, 0.3);
}

input[type="range"].ark-bearing-picker-range::-moz-range-progress {
	background: transparent;
	border: none;
}

input[type="range"].ark-bearing-picker-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	margin-top: -5px;
	border: 2px solid #101820;
	border-radius: 50%;
	background: #ffd27a;
	box-shadow: none;
	cursor: pointer;
}

input[type="range"].ark-bearing-picker-range::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border: 2px solid #101820;
	border-radius: 50%;
	background: #ffd27a;
	cursor: pointer;
}

input[type="range"].ark-bearing-picker-range:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 2px rgba(255, 210, 122, 0.6);
}

.ark-bearing-picker-cardinals {
	display: flex;
	gap: 4px;
	margin-top: 4px;
}

.ark-bearing-picker-cardinals button {
	flex: 1;
	cursor: pointer;
	border: 1px solid #ffd27a;
	border-radius: 4px;
	background: transparent;
	color: #ffd27a;
}

.ark-camera-view-cone-face {
	fill: rgba(255, 176, 32, 0.12);
	stroke: rgba(255, 197, 91, 0.82);
	stroke-width: 1;
}

.ark-camera-view-cone-outline {
	fill: none;
	stroke: rgba(255, 214, 137, 0.95);
	stroke-width: 1.2;
}

.ark-camera-view-cone-face.is-highlight {
	fill: rgba(255, 205, 112, 0.24);
}

.ark-camera-body {
	fill: #101820;
	stroke: #ffd27a;
	stroke-width: 1.5;
}

.ark-camera-pole-shadow {
	stroke: rgba(0, 0, 0, 0.48);
	stroke-width: 5;
	stroke-linecap: round;
}

.ark-camera-pole {
	stroke: #ffd27a;
	stroke-width: 2;
	stroke-linecap: round;
	filter: drop-shadow(0 0 2px rgba(255, 176, 32, 0.8));
}

.ark-camera-ground-point {
	fill: #101820;
	stroke: #ffd27a;
	stroke-width: 2;
}

.ark-camera-ground-glow {
	fill: rgba(255, 176, 32, 0.18);
	stroke: rgba(255, 197, 91, 0.65);
	stroke-width: 1;
}

.ark-camera-lens-hood {
	fill: #ffb020;
}

.ark-camera-lens {
	fill: #ffb020;
	stroke: #101820;
	stroke-width: 1.5;
}

.ark-camera-marker.is-inactive .ark-camera-view-cone-face,
.ark-camera-marker.is-inactive .ark-camera-body {
	opacity: 0.55;
}

/* Floating top badge/card */
.ark-beacon-floating-card {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: rgba(var(--MAP-SURFACE-RGB), 0.92);
	border: 1.5px solid var(--MAP-ACCENT);
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	padding: 3px 8px 3px 5px;
	box-shadow: 0 0 12px rgba(var(--MAP-ACCENT-RGB), 0.5), inset 0 0 6px rgba(var(--MAP-ACCENT-RGB), 0.25);
	backdrop-filter: blur(6px);
	white-space: nowrap;
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
	z-index: 2;
}

.ark-sensor-beacon-root:hover > .ark-beacon-floating-card {
	transform: translateX(-50%) translateY(-3px) scale(1.06);
	box-shadow: 0 0 18px rgba(var(--MAP-ACCENT-RGB), 0.85), inset 0 0 10px rgba(var(--MAP-ACCENT-RGB), 0.4);
	border-color: var(--MAP-ACCENT-STRONG);
}

/* Camera icon badge */
.ark-beacon-cam-badge {
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(var(--MAP-ACCENT-RGB), 0.15);
	border-radius: 50%;
	border: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.4);
}

.ark-beacon-svg-cam {
	width: 11px;
	height: 11px;
	fill: var(--MAP-ACCENT);
	filter: drop-shadow(0 0 3px var(--MAP-ACCENT));
}

/* Sensor name / HID */
.ark-beacon-name {
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
	font-size: 11px;
	font-weight: 700;
	color: var(--MAP-TEXT-STRONG);
	letter-spacing: 0.3px;
	text-shadow: 0 0 6px rgba(var(--MAP-ACCENT-RGB), 0.8);
	max-width: 90px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Status LED */
.ark-beacon-status-led {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #00ff88;
	box-shadow: 0 0 6px #00ff88, 0 0 10px rgba(0, 255, 136, 0.6);
}

.ark-sensor-beacon-root.is-inactive .ark-beacon-status-led {
	background: #ff4444;
	box-shadow: 0 0 6px #ff4444, 0 0 10px rgba(255, 68, 68, 0.6);
}

.ark-sensor-beacon-root.is-inactive .ark-beacon-floating-card {
	border-color: rgba(255, 68, 68, 0.8);
	box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

/* Vertical light beam / stem */
.ark-beacon-vertical-beam {
	position: absolute;
	top: 24px;
	bottom: 8px;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: linear-gradient(to bottom, rgba(var(--MAP-ACCENT-RGB), 0.9) 0%, rgba(var(--MAP-ACCENT-RGB), 0.25) 70%, rgba(var(--MAP-ACCENT-RGB), 0.95) 100%);
	box-shadow: 0 0 6px var(--MAP-ACCENT), 0 0 12px rgba(var(--MAP-ACCENT-RGB), 0.6);
	z-index: 1;
}

/* Ground target & radar rings */
.ark-beacon-ground-target {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.ark-beacon-ground-dot {
	width: 8px;
	height: 8px;
	background: #ffffff;
	border: 2px solid var(--MAP-ACCENT);
	border-radius: 50%;
	box-shadow: 0 0 8px var(--MAP-ACCENT), 0 0 14px rgba(var(--MAP-ACCENT-RGB), 0.8);
	z-index: 3;
}

.ark-beacon-ring {
	position: absolute;
	border-radius: 50%;
	border: 1.5px solid var(--MAP-ACCENT);
	box-sizing: border-box;
	animation: arkRadarWave 2.4s infinite cubic-bezier(0.1, 0.8, 0.3, 1);
	opacity: 0;
}

.ark-ground-pulse-3d .ark-beacon-ring { display: none; }
.ark-beacon-ring.ring-1 { animation-delay: 0s; }
.ark-beacon-ring.ring-2 { animation-delay: 0.8s; }
.ark-beacon-ring.ring-3 { animation-delay: 1.6s; }

@keyframes arkRadarWave {
	0% {
		width: 6px;
		height: 6px;
		opacity: 0.95;
		border-color: var(--MAP-ACCENT);
		box-shadow: 0 0 6px var(--MAP-ACCENT);
	}
	60% {
		opacity: 0.45;
		border-color: #00ffcc;
	}
	100% {
		width: 52px;
		height: 52px;
		opacity: 0;
		border-color: rgba(0, 255, 204, 0);
		box-shadow: 0 0 14px rgba(0, 255, 204, 0);
	}
}

/* Popup Card */
.ark-sensor-popup-card {
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
	background: rgba(var(--MAP-SURFACE-RGB), 0.96);
	color: var(--MAP-TEXT);
	padding: 12px 14px;
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	min-width: 220px;
	max-width: 280px;
	box-shadow: 0 4px 24px rgba(var(--MAP-SHADOW-RGB), 0.75), 0 0 1px 1px rgba(var(--MAP-ACCENT-RGB), 0.35);
}

.ark-sensor-popup-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.25);
	padding-bottom: 6px;
	margin-bottom: 8px;
}

.ark-sensor-popup-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--MAP-ACCENT);
	letter-spacing: 0.4px;
	text-shadow: 0 0 6px rgba(var(--MAP-ACCENT-RGB), 0.4);
}

.ark-sensor-popup-status {
	font-size: 9px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.ark-sensor-popup-status.status-online {
	background: rgba(0, 255, 136, 0.15);
	color: #00ff88;
	border: 1px solid rgba(0, 255, 136, 0.4);
}

.ark-sensor-popup-status.status-offline {
	background: rgba(255, 68, 68, 0.15);
	color: #ff4444;
	border: 1px solid rgba(255, 68, 68, 0.4);
}

.ark-sensor-popup-body {
	font-size: 11px;
	line-height: 1.5;
	color: var(--MAP-TEXT-SOFT);
}

.ark-sensor-popup-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 3px;
}

.ark-sensor-popup-label {
	color: var(--MAP-TEXT-MUTED);
	font-weight: 600;
}

.ark-sensor-popup-value {
	color: var(--MAP-TEXT-STRONG);
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
	font-size: 10.5px;
}

.ark-sensor-popup-actions {
	margin-top: 10px;
	padding-top: 6px;
	border-top: 1px solid rgba(var(--MAP-TEXT-RGB), 0.08);
	display: flex;
	justify-content: flex-end;
}

.ark-sensor-popup-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 600;
	color: var(--MAP-ACCENT);
	background: rgba(var(--MAP-ACCENT-RGB), 0.1);
	border: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.35);
	padding: 4px 10px;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.ark-sensor-popup-btn:hover {
	background: rgba(var(--MAP-ACCENT-RGB), 0.25);
	border-color: var(--MAP-ACCENT);
	box-shadow: 0 0 8px rgba(var(--MAP-ACCENT-RGB), 0.4);
	color: var(--MAP-TEXT-STRONG);
}

.ark-sensor-popup-btn.is-icon-only {
	justify-content: center;
	width: 32px;
	height: 32px;
	min-width: 32px;
	padding: 0;
	font-size: 14px;
}

.ark-sensor-popup-btn.ark-btn-live-stream.is-active {
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: color-mix(in srgb, var(--MAP-COLOR-ALERT, #ff3b30) 28%, transparent);
	border-color: var(--MAP-COLOR-ALERT, #ff3b30);
	box-shadow: 0 0 10px color-mix(in srgb, var(--MAP-COLOR-ALERT, #ff3b30) 55%, transparent);
}

.ark-sensor-popup-preview {
	position: relative;
}

.ark-sensor-popup-live-badge {
	position: absolute;
	top: 6px;
	left: 6px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 2px 7px;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 0.05em;
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: color-mix(in srgb, var(--MAP-COLOR-ALERT, #ff3b30) 82%, rgba(0, 0, 0, 0.75));
	border: 1px solid color-mix(in srgb, var(--MAP-COLOR-ALERT, #ff3b30) 95%, #ffffff);
	box-shadow: 0 2px 8px rgba(var(--MAP-SHADOW-RGB, 0, 0, 0), 0.65);
	pointer-events: none;
}

.ark-sensor-popup-live-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--MAP-TEXT-STRONG, #ffffff);
	box-shadow: 0 0 6px var(--MAP-TEXT-STRONG, #ffffff);
}

/* ==========================================================================
   OpenStreetMap (Leaflet) Dark Tactical Mode (100% Free / No Token)
   ========================================================================== */

.ark-map-provider-osm-dark,
.ark-map-provider-osm-dark .leaflet-container {
	background: #090e15 !important;
}

.ark-map-provider-osm-dark .leaflet-tile-pane {
	filter: brightness(0.6) invert(1) contrast(3) hue-rotate(200deg) saturate(0.3) brightness(0.7);
}

.ark-map-provider-osm-dark .leaflet-control-zoom a,
.ark-map-provider-osm-dark .leaflet-control-attribution,
.ark-map-provider-osm-dark .leaflet-control-layers,
.ark-map-provider-osm-dark .leaflet-popup-content-wrapper,
.ark-map-provider-osm-dark .leaflet-popup-tip {
	background: var(--FORM-BG, rgba(10, 18, 28, 0.94)) !important;
	color: var(--DEFAULT-FG-COLOR, #e6e6e6) !important;
	border: 1px solid var(--BRAND-COLOR-1, rgba(var(--MAP-ACCENT-RGB), 0.4)) !important;
	box-shadow: 0 4px 20px rgba(var(--MAP-SHADOW-RGB), 0.6) !important;
}

.ark-map-provider-osm-dark .leaflet-control-zoom a,
.ark-map-provider-osm-dark .leaflet-popup-content-wrapper,
.ark-map-provider-osm-dark .leaflet-control-attribution {
	color: var(--BRAND-COLOR2, var(--MAP-ACCENT)) !important;
}

.ark-map-provider-osm-dark .leaflet-control-attribution a,
.ark-map-provider-osm-dark .leaflet-popup-content a {
	color: var(--BRAND-COLOR5, var(--MAP-ACCENT-STRONG)) !important;
}

.ark-map-provider-osm-dark .leaflet-control-zoom a:hover,
.ark-map-provider-osm-dark .leaflet-control-attribution:hover,
.ark-map-provider-osm-dark .leaflet-control-layers:hover,
.ark-map-provider-osm-dark .leaflet-popup-content-wrapper:hover {
	background: var(--FORM-BG1-COLOR, rgba(14, 25, 38, 0.98)) !important;
}

/* ==========================================================================
   Supresion de Atribuciones y Logos de Proveedores de Mapas (GIS y Conexiones)
   ========================================================================== */
.STC_ArkGoogleMap .leaflet-control-attribution,
.STC_ArkGoogleMap .mapboxgl-ctrl-attrib,
.STC_ArkGoogleMap .mapboxgl-ctrl-logo,
.STC_ArkGoogleMap a.mapboxgl-ctrl-logo,
.STC_ArkGoogleMap .maplibregl-ctrl-attrib,
.STC_ArkGoogleMap .maplibregl-ctrl-logo,
.STC_ArkGoogleMap a.maplibregl-ctrl-logo,
.STC_ArkGoogleMap .gm-style-cc,
.STC_ArkGoogleMap .gmnoprint a,
.STC_ArkGoogleMap a[href^="https://maps.google.com/maps"],
.STC_ArkGoogleMap a[href^="https://www.google.com/maps"],
.STC_ArkGoogleMap .leaflet-bottom.leaflet-right .leaflet-control-attribution {
	display: none !important;
	opacity: 0 !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

/* ==========================================================================
   3D Tactical Map Perspective & HUD Controls
   ========================================================================== */

.ark-map-perspective-wrap {
	perspective: 1100px !important;
	perspective-origin: 50% 55% !important;
	overflow: hidden !important;
	position: relative !important;
}

.ark-map-perspective-wrap .leaflet-map-pane {
	transform-style: preserve-3d !important;
	transform-origin: 50% 50% !important;
	transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.ark-map-perspective-wrap.ark-3d-active .leaflet-map-pane {
	transform-style: preserve-3d !important;
}

.ark-3d-hud-control {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 1000;
	background: rgba(var(--MAP-SURFACE-RGB), 0.92);
	border: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.4);
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	padding: 10px 12px;
	box-shadow: 0 6px 28px rgba(var(--MAP-SHADOW-RGB), 0.75), 0 0 12px rgba(var(--MAP-ACCENT-RGB), 0.25);
	backdrop-filter: blur(8px);
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
	color: var(--MAP-TEXT);
	user-select: none;
	width: 170px;
	pointer-events: auto;
}

.ark-3d-hud-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.2);
	padding-bottom: 6px;
	margin-bottom: 8px;
}

.ark-3d-hud-title {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.8px;
	color: var(--MAP-ACCENT);
	text-shadow: 0 0 6px rgba(var(--MAP-ACCENT-RGB), 0.5);
}

.ark-3d-toggle-btn {
	background: rgba(var(--MAP-ACCENT-RGB), 0.15);
	border: 1px solid var(--MAP-ACCENT);
	color: var(--MAP-ACCENT);
	font-size: 10px;
	font-weight: 800;
	padding: 2px 7px;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	cursor: pointer;
	transition: all 0.2s ease;
}

.ark-3d-toggle-btn.is-active,
.ark-3d-toggle-btn:hover {
	background: var(--MAP-ACCENT);
	color: var(--MAP-SURFACE);
	box-shadow: 0 0 10px var(--MAP-ACCENT);
}

.ark-3d-compass-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 6px 0 8px 0;
	cursor: pointer;
}

.ark-3d-compass-dial {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1.5px solid rgba(var(--MAP-ACCENT-RGB), 0.6);
	background: rgba(var(--MAP-ACCENT-RGB), 0.05);
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
	box-shadow: inset 0 0 8px rgba(var(--MAP-ACCENT-RGB), 0.2);
}

.ark-3d-compass-dial:hover {
	border-color: var(--MAP-ACCENT);
	box-shadow: 0 0 8px rgba(var(--MAP-ACCENT-RGB), 0.5), inset 0 0 8px rgba(var(--MAP-ACCENT-RGB), 0.4);
}

.compass-needle-n {
	position: absolute;
	top: 2px;
	font-size: 8px;
	font-weight: 900;
	color: #ff4444;
	line-height: 1;
}

.compass-arrow {
	width: 2px;
	height: 16px;
	background: linear-gradient(to bottom, #ff4444 50%, var(--MAP-ACCENT) 50%);
	border-radius: 1px;
}

.ark-3d-bearing-val {
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
	font-size: 11px;
	font-weight: 700;
	color: var(--MAP-TEXT-STRONG);
}

.ark-3d-slider-row {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 6px;
}

.ark-3d-slider-lbl {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--MAP-TEXT-MUTED);
	text-transform: uppercase;
}

.ark-3d-btn-group {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
}

.ark-3d-btn {
	background: rgba(var(--MAP-TEXT-RGB), 0.08);
	border: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.3);
	color: var(--MAP-ACCENT);
	font-size: 11px;
	font-weight: 700;
	padding: 3px 7px;
	border-radius: 4px;
	cursor: pointer;
	flex: 1;
	text-align: center;
	transition: all 0.15s ease;
}

.ark-3d-btn:hover {
	background: rgba(var(--MAP-ACCENT-RGB), 0.25);
	border-color: var(--MAP-ACCENT);
	color: var(--MAP-TEXT-STRONG);
	box-shadow: 0 0 6px rgba(var(--MAP-ACCENT-RGB), 0.4);
}

.ark-3d-val-badge {
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
	font-size: 10.5px;
	font-weight: 700;
	color: var(--MAP-TEXT-STRONG);
	min-width: 32px;
	text-align: center;
}

.ark-3d-hud-hint {
	margin-top: 6px;
	padding-top: 5px;
	border-top: 1px dashed rgba(var(--MAP-TEXT-RGB), 0.1);
	font-size: 8.5px;
	color: var(--MAP-TEXT-MUTED);
	text-align: center;
	letter-spacing: 0.3px;
}

.ark-sensor-popup-card.is-stream {
	box-shadow: 0 4px 24px rgba(var(--MAP-SHADOW-RGB), 0.75), 0 0 1px 1px rgba(255, 176, 32, 0.45);
}

.ark-sensor-popup-card.is-stream .ark-sensor-popup-title {
	color: #ffb020;
	text-shadow: 0 0 6px rgba(255, 176, 32, 0.4);
}

/* Connection Layer (inbound IP connection attempts) beacons: dynamic category accent with radar pulse. */
.ark-sensor-beacon-root.ark-connection-marker {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION, #00e5ff);
}

.ark-sensor-beacon-root.ark-connection-marker.is-cat-verified {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION-EXACT, #10b981);
}

.ark-sensor-beacon-root.ark-connection-marker.is-cat-standard {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION, #00e5ff);
}

.ark-sensor-beacon-root.ark-connection-marker.is-cat-mobile {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION-MOBILE, #f59e0b);
}

.ark-sensor-beacon-root.ark-connection-marker.is-cat-risk {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION-RISK, #ef4444);
}

.ark-sensor-beacon-root.ark-connection-marker.is-intent-auth_ok {
	--ark-conn-color: var(--MAP-COLOR-INTENT-AUTH-OK, #10b981);
}

.ark-sensor-beacon-root.ark-connection-marker.is-intent-unauth_route {
	--ark-conn-color: var(--MAP-COLOR-INTENT-UNAUTH-ROUTE, #f59e0b);
}

.ark-sensor-beacon-root.ark-connection-marker.is-intent-bad_credentials {
	--ark-conn-color: var(--MAP-COLOR-INTENT-BAD-AUTH, #f97316);
}

.ark-sensor-beacon-root.ark-connection-marker.is-intent-hack_attempt {
	--ark-conn-color: var(--MAP-COLOR-INTENT-HACK, #ef4444);
	z-index: 25;
}

.ark-sensor-beacon-root.ark-connection-marker.is-intent-hack_attempt .ark-beacon-floating-card {
	border-width: 2px;
	box-shadow: 0 0 18px rgba(239, 68, 68, 0.8), inset 0 0 8px rgba(239, 68, 68, 0.35);
}

.ark-conn-intent-badge {
	display: inline-block;
	padding: 1px 4px;
	font-size: 8.5px;
	font-weight: 800;
	border-radius: 3px;
	letter-spacing: 0.35px;
	color: var(--ark-conn-color, #00e5ff);
	background: color-mix(in srgb, var(--ark-conn-color, #00e5ff) 18%, transparent);
	border: 1px solid color-mix(in srgb, var(--ark-conn-color, #00e5ff) 52%, transparent);
}

.ark-sensor-beacon-root.ark-connection-marker .ark-beacon-floating-card {
	border-color: var(--ark-conn-color, #00e5ff);
	box-shadow: 0 0 12px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 55%, transparent), inset 0 0 6px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 25%, transparent);
}

.ark-sensor-beacon-root.ark-connection-marker:hover .ark-beacon-floating-card {
	border-color: var(--ark-conn-color, #33eeff);
	box-shadow: 0 0 18px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 85%, transparent), inset 0 0 10px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 40%, transparent);
	transform: translateX(-50%) translateY(-3px) scale(1.06);
}

.ark-sensor-beacon-root.ark-connection-marker .ark-beacon-conn-badge {
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--ark-conn-color, #00e5ff) 16%, transparent);
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--ark-conn-color, #00e5ff) 48%, transparent);
}

.ark-sensor-beacon-root.ark-connection-marker .ark-beacon-svg-conn {
	width: 11px;
	height: 11px;
	fill: var(--ark-conn-color, #00e5ff);
	filter: drop-shadow(0 0 3px var(--ark-conn-color, #00e5ff));
}

.ark-conn-country-badge {
	display: inline-block;
	padding: 1px 4px;
	font-size: 9px;
	font-weight: 800;
	color: var(--ark-conn-color, #00e5ff);
	background: color-mix(in srgb, var(--ark-conn-color, #00e5ff) 16%, transparent);
	border: 1px solid color-mix(in srgb, var(--ark-conn-color, #00e5ff) 42%, transparent);
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.ark-conn-precision-dot {
	display: inline-block;
	padding: 0 3px;
	font-size: 8px;
	font-weight: 800;
	color: #10b981;
	background: rgba(16, 185, 129, 0.18);
	border: 1px solid rgba(16, 185, 129, 0.5);
	border-radius: 3px;
	letter-spacing: 0.3px;
}

.ark-sensor-beacon-root.ark-connection-marker .ark-conn-ip-text {
	color: #ffffff;
	text-shadow: 0 0 6px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 80%, transparent);
	max-width: 110px;
}

.ark-sensor-beacon-root.ark-connection-marker .ark-conn-status-led {
	background: var(--ark-conn-color, #00e5ff);
	box-shadow: 0 0 6px var(--ark-conn-color, #00e5ff), 0 0 10px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 70%, transparent);
}

.ark-sensor-beacon-root.ark-connection-marker .ark-conn-beam {
	background: linear-gradient(to bottom, var(--ark-conn-color, #00e5ff) 0%, color-mix(in srgb, var(--ark-conn-color, #00e5ff) 25%, transparent) 70%, var(--ark-conn-color, #00e5ff) 100%);
	box-shadow: 0 0 6px var(--ark-conn-color, #00e5ff), 0 0 12px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 60%, transparent);
}

.ark-sensor-beacon-root.ark-connection-marker .ark-conn-ground-dot {
	background: #ffffff;
	border-color: var(--ark-conn-color, #00e5ff);
	box-shadow: 0 0 6px var(--ark-conn-color, #00e5ff), 0 0 12px var(--ark-conn-color, #00e5ff);
}

.ark-sensor-beacon-root.ark-connection-marker .ark-conn-ring {
	border-color: var(--ark-conn-color, #00e5ff);
	box-shadow: 0 0 6px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 60%, transparent);
}

.ark-sensor-beacon-root.ark-connection-marker.is-inactive .ark-beacon-floating-card {
	border-color: rgba(255, 120, 0, 0.85);
	box-shadow: 0 0 10px rgba(255, 120, 0, 0.4);
}

.ark-sensor-beacon-root.ark-connection-marker.is-inactive .ark-conn-status-led {
	background: #ff7800;
	box-shadow: 0 0 6px #ff7800;
}

/* Connection popup styling */
.ark-connection-popup {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION, #00e5ff);
	min-width: 280px;
	max-width: 340px;
	padding: 12px 14px;
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
}

.ark-conn-popup-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	padding-bottom: 7px;
	border-bottom: 1px solid color-mix(in srgb, var(--ark-conn-color, #00e5ff) 30%, transparent);
}

.ark-conn-popup-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--ark-conn-color, #00e5ff);
	letter-spacing: 0.3px;
	text-shadow: 0 0 6px color-mix(in srgb, var(--ark-conn-color, #00e5ff) 40%, transparent);
}

.ark-conn-popup-flag {
	margin-left: auto;
	padding: 2px 6px;
	font-size: 10px;
	font-weight: 800;
	color: var(--ark-conn-color, #00e5ff);
	background: color-mix(in srgb, var(--ark-conn-color, #00e5ff) 16%, transparent);
	border: 1px solid color-mix(in srgb, var(--ark-conn-color, #00e5ff) 42%, transparent);
	border-radius: 4px;
}

.ark-conn-popup-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 8px;
}

.ark-conn-popup-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 7px;
	font-size: 9.5px;
	font-weight: 700;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: rgba(var(--MAP-ACCENT-RGB, 0, 240, 255), 0.12);
	color: var(--MAP-TEXT-STRONG, #ffffff);
	border: 1px solid rgba(var(--MAP-ACCENT-RGB, 0, 240, 255), 0.35);
}

.ark-conn-popup-pill.is-verified {
	background: rgba(16, 185, 129, 0.16);
	color: #34d399;
	border-color: rgba(16, 185, 129, 0.48);
}

.ark-conn-popup-pill.is-mobile {
	background: rgba(245, 158, 11, 0.16);
	color: #fbbf24;
	border-color: rgba(245, 158, 11, 0.48);
}

.ark-conn-popup-pill.is-risk {
	background: rgba(239, 68, 68, 0.18);
	color: #f87171;
	border-color: rgba(239, 68, 68, 0.52);
}

.ark-conn-popup-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ark-conn-popup-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	gap: 12px;
}

.ark-conn-popup-row .ark-sensor-popup-label {
	color: var(--MAP-TEXT-MUTED);
	white-space: nowrap;
}

.ark-conn-popup-row .ark-sensor-popup-value {
	color: var(--MAP-TEXT-STRONG);
	font-weight: 600;
	text-align: right;
	word-break: break-word;
}

.ark-conn-popup-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
	margin-top: 9px;
	padding-top: 7px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ark-conn-popup-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 9px;
	font-size: 10.5px;
	font-weight: 600;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	cursor: pointer;
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: rgba(var(--MAP-ACCENT-RGB, 0, 240, 255), 0.12);
	border: 1px solid rgba(var(--MAP-ACCENT-RGB, 0, 240, 255), 0.38);
	transition: all 0.18s ease;
}

.ark-conn-popup-btn:hover {
	background: rgba(var(--MAP-ACCENT-RGB, 0, 240, 255), 0.25);
	border-color: var(--MAP-ACCENT, #00e5ff);
}

.ark-conn-popup-btn.is-gps {
	background: rgba(16, 185, 129, 0.16);
	border-color: rgba(16, 185, 129, 0.45);
	color: #34d399;
}

.ark-conn-popup-btn.is-gps:hover {
	background: rgba(16, 185, 129, 0.28);
	border-color: #10b981;
}

.ark-conn-popup-btn.is-pin {
	background: rgba(192, 132, 252, 0.16);
	border-color: rgba(192, 132, 252, 0.48);
	color: #d8b4fe;
}

.ark-conn-popup-btn.is-pin:hover {
	background: rgba(192, 132, 252, 0.28);
	border-color: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
}

/* Central XAORUS Server Hub beacon */
.ark-sensor-beacon-root.ark-connection-hub-marker {
	--ark-conn-color: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
	z-index: 30;
}

.ark-sensor-beacon-root.ark-connection-hub-marker .ark-conn-floating-card {
	border-width: 2px;
	border-color: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
	box-shadow: 0 0 18px color-mix(in srgb, var(--MAP-COLOR-CONNECTION-HUB, #c084fc) 75%, transparent), inset 0 0 10px color-mix(in srgb, var(--MAP-COLOR-CONNECTION-HUB, #c084fc) 35%, transparent);
}

/* Connection Layer LOD (Level-of-Detail) progressive scaling on zoom out */
.ark-connection-marker {
	transition: transform 0.22s ease;
}

.ark-connection-marker .ark-ds-pulse {
	display: none;
	position: absolute;
	left: 50%;
	bottom: 10px;
	width: 0;
	height: 0;
	--ark-ds-tone: var(--ark-conn-color, #00e5ff);
}

.ark-lod-pin .ark-connection-marker:not(.ark-connection-hub-marker) {
	transform: scale(0.86);
	transform-origin: bottom center;
}

.ark-lod-pin .ark-connection-marker .ark-conn-country-badge,
.ark-lod-pin .ark-connection-marker .ark-conn-precision-dot {
	display: none;
}

.ark-lod-compact .ark-connection-marker {
	transform: scale(0.76);
	transform-origin: bottom center;
}

.ark-lod-compact .ark-connection-marker.ark-connection-hub-marker {
	transform: scale(0.86);
}

.ark-lod-compact .ark-connection-marker .ark-conn-ip-text,
.ark-lod-compact .ark-connection-marker .ark-conn-country-badge,
.ark-lod-compact .ark-connection-marker .ark-conn-precision-dot,
.ark-lod-compact .ark-connection-marker .ark-conn-status-led {
	display: none;
}

.ark-lod-compact .ark-connection-marker .ark-beacon-floating-card {
	padding: 3px;
}

.ark-lod-pulse .ark-connection-marker .ark-ds-pulse,
.ark-lod-dot .ark-connection-marker .ark-ds-pulse {
	display: block;
}

.ark-lod-pulse .ark-connection-marker > :not(.ark-ds-pulse),
.ark-lod-dot .ark-connection-marker > :not(.ark-ds-pulse) {
	display: none;
}

.ark-lod-dot .ark-connection-hub-marker .ark-ds-pulse-core {
	width: 10px;
	height: 10px;
	margin: -5px 0 0 -5px;
	box-shadow: 0 0 12px var(--ark-conn-color, #c084fc);
}

.ark-map-pinning-mode,
.ark-map-pinning-mode .maplibregl-canvas-container,
.ark-map-pinning-mode .mapboxgl-canvas-container,
.ark-map-pinning-mode .leaflet-container {
	cursor: crosshair !important;
}

/* Video stream selector inside the AIAServer popup */
.ark-sensor-popup-streams {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 4px;
}

.ark-sensor-popup-select {
	width: 100%;
	background: rgba(var(--MAP-ACCENT-RGB), 0.08);
	color: var(--MAP-TEXT);
	border: 1px solid rgba(var(--MAP-ACCENT-RGB), 0.4);
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	padding: 4px 6px;
	font-size: 11px;
}

.ark-sensor-popup-select option {
	background: var(--MAP-SURFACE);
	color: var(--MAP-TEXT);
}

/* ===== GIS tools panel (region selection + basemap switches) ===== */
[MapTopologyPanel="1"] .ark-map-tools-panel:not(.is-docked),
[MapGisTopologyPanel="1"] .ark-map-tools-panel:not(.is-docked) {
	top: 14px !important;
	transform: none !important;
}

.ark-map-tools-panel {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 8px 6px;
	width: 68px;
	box-sizing: border-box;
	background: var(--MAP-TOOLS-PANEL-BG, rgba(10, 16, 26, 0.92));
	color: var(--MAP-TOOLS-PANEL-FG, #dfe8f2);
	border: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(110, 170, 220, 0.45));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: 0 6px 18px rgba(var(--MAP-SHADOW-RGB), 0.45);
	font-family: var(--FONT-FAMILY, sans-serif);
	user-select: none;
}

.ark-map-tools-title {
	font-size: 9px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	opacity: 0.6;
}

.ark-map-tools-divider {
	height: 1px;
	margin: 4px 2px;
	background: var(--MAP-TOOLS-PANEL-BORDER, rgba(110, 170, 220, 0.45));
	opacity: 0.5;
}

.ark-map-tools-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 5px 2px;
	background: transparent;
	color: inherit;
	border: 1px solid transparent;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	cursor: pointer;
	font-family: inherit;
}

.ark-map-tools-btn:hover:not([disabled]) {
	border-color: var(--MAP-TOOLS-ACCENT, #1fa3d6);
}

.ark-map-tools-btn.is-active {
	background: var(--MAP-TOOLS-ACCENT, #1fa3d6);
	color: var(--MAP-TOOLS-ACCENT-FG, var(--MAP-TEXT-STRONG));
}

.ark-map-tools-btn[disabled] {
	opacity: 0.35;
	cursor: not-allowed;
}

.ark-map-tools-icon {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ark-map-tools-label {
	font-size: 9.5px;
	line-height: 1.1;
}

.ark-map-tools-result {
	position: absolute;
	left: 90px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 6;
	max-width: 240px;
	padding: 10px 12px;
	box-sizing: border-box;
	background: var(--MAP-TOOLS-PANEL-BG, rgba(10, 16, 26, 0.92));
	color: var(--MAP-TOOLS-PANEL-FG, #dfe8f2);
	border: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(110, 170, 220, 0.45));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: 0 6px 18px rgba(var(--MAP-SHADOW-RGB), 0.45);
	font-family: var(--FONT-FAMILY, sans-serif);
	font-size: 12px;
}

.ark-map-tools-result.is-hint {
	opacity: 0.9;
	font-style: italic;
}

.ark-map-tools-result-title {
	margin-bottom: 4px;
}

.ark-map-tools-result ul {
	margin: 0;
	padding-left: 16px;
}

.ark-map-tools-result li.is-more {
	opacity: 0.6;
	list-style: none;
	margin-left: -16px;
}

.ark-map-pending-events {
	color: var(--MAP-TEXT, var(--FORM-FG-COLOR));
	border-left: 3px solid var(--MAP-COLOR-ALERT);
	background: var(--MAP-SURFACE);
	padding: 4px 8px;
	font-weight: 700;
}

/* Provider popups share the map stacking context with the graticule and drawing overlay. */
.STC_ArkGoogleMap > :is(.mapboxgl-popup, .maplibregl-popup) {
	z-index: 5;
}

.ark-map-graticule {
	opacity: 0.67;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
	pointer-events: none;
	overflow: hidden;
}

.ark-map-graticule-line {
	fill: none;
	stroke: var(--MAP-GRID-COLOR, rgba(255, 255, 255, 0.3));
	stroke-width: 1;
}

.ark-map-graticule-line.is-major {
	stroke: var(--MAP-GRID-MAJOR-COLOR, rgba(255, 255, 255, 0.5));
}

.ark-map-graticule-label {
	fill: var(--MAP-GRID-LABEL-COLOR, rgba(255, 255, 255, 0.78));
	stroke: var(--MAP-GRID-LABEL-HALO, rgba(0, 0, 0, 0.6));
	stroke-width: 3;
	paint-order: stroke;
	font-size: 10px;
	font-variant-numeric: tabular-nums;
	user-select: none;
}

.ark-map-tools-overlay {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 4;
	pointer-events: none;
	touch-action: none;
}

.ark-map-tools-overlay.is-drawing {
	pointer-events: auto;
	cursor: crosshair;
	z-index: 999;
}

.ark-map-tools-shape {
	fill: color-mix(in srgb, var(--MAP-TOOLS-ACCENT, #1fa3d6) 22%, transparent);
	stroke: var(--MAP-TOOLS-ACCENT, #1fa3d6);
	stroke-width: 2;
}

.ark-map-tools-draft {
	fill: none;
	stroke: var(--MAP-TOOLS-ACCENT, #1fa3d6);
	stroke-width: 2;
	stroke-dasharray: 6 4;
}

.ark-map-tools-vertex {
	fill: #ffffff;
	stroke: var(--MAP-TOOLS-ACCENT, #1fa3d6);
	stroke-width: 2;
}

.ark-map-tools-radius {
	stroke: var(--MAP-TOOLS-ACCENT, #1fa3d6);
	stroke-width: 1.5;
	stroke-dasharray: 4 3;
}

.ark-map-tools-radius-label {
	fill: #ffffff;
	font-size: 12px;
	font-weight: 600;
	text-anchor: middle;
	paint-order: stroke;
	stroke: rgba(0, 0, 0, 0.7);
	stroke-width: 3px;
}

.ark-sensor-beacon-container.is-dimmed {
	opacity: 0.25;
	filter: grayscale(1);
	transition: opacity 0.2s;
}

.ark-sensor-beacon-container.is-selected {
	filter: drop-shadow(0 0 8px var(--MAP-TOOLS-ACCENT, #1fa3d6));
}

/* ==========================================================================
   GIS Tactical Full-Viewport Map & Floating Glass KPI Cards
   ========================================================================== */

.ark-gis-full-map {
	width: 100%;
	height: 100%;
	min-height: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	flex: 1;
	position: relative;
}

.ark-gis-view-selector {
	position: absolute;
	top: 12px;
	right: 58px;
	z-index: 1001;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	width: min(390px, calc(100% - 75px));
	pointer-events: auto;
}
.ark-gis-view-selector > button[data-gis-view] {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	overflow-wrap: anywhere;
}
.ark-gis-view-selector [data-gis-view][aria-pressed="true"] {
	outline: 2px solid var(--MAP-COLOR-STREAM);
	outline-offset: 1px;
}
.ark-gis-view-status {
	flex-basis: 100%;
	color: var(--MAP-COLOR-ERROR);
}
.ark-gis-view-legend,
.ark-gis-calendar-status {
	position: relative;
	flex: 0 1 auto;
	max-width: 100%;
	box-sizing: border-box;
	padding: 7px 10px;
	margin-top: 5px;
	background: var(--FORM-BG, #101c23);
	color: var(--FORM-FG-COLOR, #fff);
	border: none;
	border-radius: max(8px, var(--FORM-BORDER-RADIUS, 8px));
	box-shadow: var(--FORM-BOX-SHADOW, 0 4px 12px rgba(0,0,0,.35));
	font-size: 11px;
}
.ark-gis-view-legend {
	flex-basis: 100%;
}
.ark-gis-view-selector > button[data-gis-view]:not([data-gis-view="administrator"])[aria-pressed="true"]::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -9px;
	width: 14px;
	height: 7px;
	transform: translateX(-50%);
	background: var(--FORM-BG, #101c23);
	clip-path: polygon(50% 0, 100% 100%, 0 100%);
	pointer-events: none;
}
.ark-gis-view-legend[hidden] { display: none; }
.ark-gis-floating-kpi-container {
	position: absolute;
	bottom: 14px;
	right: 14px;
	width: 28%;
	min-width: 250px;
	max-width: 360px;
	max-height: 70%;
	overflow-y: auto;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 6px;
	pointer-events: auto;
	user-select: none;
}

.ark-floating-panel.ark-gis-floating-kpi-container {
	left: auto;
	background: transparent;
	border: none;
	box-shadow: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	overflow: hidden;
	gap: 0;
	max-height: 70% !important;
}

.ark-gis-floating-kpi-container .ark-floating-panel-header {
	display: none;
	cursor: default;
	touch-action: auto;
}

.ark-gis-floating-kpi-container .ark-floating-panel-body {
	gap: 6px;
	padding: 0;
	overflow-y: auto;
}

@media (min-width: 701px) {
	.ark-floating-panel.ark-gis-floating-kpi-container.is-collapsed {
		width: 28%;
	}

	.ark-floating-panel.ark-gis-floating-kpi-container.is-collapsed .ark-floating-panel-body {
		display: flex !important;
	}
}

@media (max-width: 700px) {
	.ark-floating-panel.ark-gis-floating-kpi-container {
		z-index: 1001;
		width: min(360px, calc(100% - 28px));
		min-width: 0;
		max-height: 65% !important;
	}

	.ark-gis-floating-kpi-container .ark-floating-panel-header {
		display: flex;
		border: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.32));
		border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
		background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG, var(--MAP-SURFACE)));
		padding: 0 8px 0 12px;
	}

	.ark-gis-floating-kpi-container .ark-floating-panel-toggle-btn {
		width: 44px;
		min-width: 44px;
		height: 44px;
	}

	.ark-gis-floating-kpi-container .ark-floating-panel-actions {
		display: none;
	}

	.ark-gis-floating-kpi-container:not([data-gis-panel-ready]) .ark-floating-panel-body {
		display: none;
	}
}

.ark-gis-kpi-card {
	--kpi-accent: var(--MAP-ACCENT, var(--BRAND-COLOR, #06B6D4));
	width: 100%;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 12px;
	min-height: 46px;
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG, var(--FORM-BG1-COLOR)));
	backdrop-filter: blur(12px) saturate(180%);
	-webkit-backdrop-filter: blur(12px) saturate(180%);
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--MAP-TOOLS-PANEL-BORDER, var(--BRAND-COLOR-1, rgba(255, 255, 255, 0.12)));
	border-left: 3px solid var(--kpi-accent, #06B6D4);
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: var(--FORM-BOX-SHADOW, 0 4px 12px rgba(var(--MAP-SHADOW-RGB, 0, 0, 0), 0.35));
	box-sizing: border-box;
}

.ark-gis-kpi-error {
	padding: 6px 10px;
	color: var(--FORM-FG-COLOR);
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG));
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--MAP-COLOR-ALERT);
	font-size: 0.7rem;
}

.ark-gis-calendar-cards {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ark-gis-calendar-card .ark-gis-kpi-title,
.ark-gis-calendar-card .ark-gis-kpi-subtitle {
	white-space: normal;
}

.ark-gis-calendar-status {
	align-self: flex-start;
}

.ark-gis-calendar-status:empty { display: none; }

.ark-gis-calendar-cards > #gis_calendar_refresh {
	align-self: flex-start;
	max-width: 100%;
}

.ark-gis-kpi-card--cyan {
	--kpi-accent: var(--MAP-ACCENT, var(--BRAND-COLOR, #06B6D4));
}

.ark-gis-kpi-card--emerald {
	--kpi-accent: var(--MAP-COLOR-CONNECTION-EXACT, var(--STATE-SUCCESS-COLOR, #10B981));
}

.ark-gis-kpi-card--violet {
	--kpi-accent: var(--MAP-COLOR-CONNECTION-HUB, var(--MAP-ACCENT-STRONG, #A78BFA));
}

.ark-gis-kpi-card--coral {
	--kpi-accent: var(--MAP-COLOR-ALERT, var(--STATE-ERROR-COLOR, #F87171));
}

.ark-gis-kpi-left {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 3px;
	min-width: 0;
	flex: 1;
}

.ark-gis-kpi-title {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--FORM-FG-COLOR, #94A3B8);
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
	white-space: nowrap;
	line-height: 1.1;
}

.ark-gis-kpi-subtitle {
	font-size: 0.64rem;
	color: var(--FORM-FG-COLOR, #64748B);
	opacity: 0.75;
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
	white-space: nowrap;
	line-height: 1.1;
}

.ark-gis-kpi-right {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.ark-gis-kpi-value {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--FORM-FG-COLOR, #F8FAFC);
	font-family: var(--FONT-FAMILY, system-ui, -apple-system, sans-serif);
	white-space: nowrap;
	line-height: 1;
}

.ark-gis-kpi-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--kpi-accent, #06B6D4);
	box-shadow: 0 0 6px var(--kpi-accent, #06B6D4);
	flex-shrink: 0;
}

/* ==========================================================================
   Tactical Connections Radar Panel (ArkMap Connections Layer SOC UI)
   ========================================================================== */

.ark-conn-panel {
	position: absolute;
	bottom: 14px;
	left: 14px;
	top: auto;
	width: 330px;
	max-width: calc(100vw - 28px);
	max-height: calc(100% - 28px);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG, var(--FORM-BG1-COLOR, rgba(10, 16, 26, 0.88))));
	color: var(--FORM-FG-COLOR, #e2e8f0);
	backdrop-filter: var(--FORM-BACKDROP-FILTER, blur(14px) saturate(180%));
	-webkit-backdrop-filter: var(--FORM-BACKDROP-FILTER, blur(14px) saturate(180%));
	border: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.32));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: var(--FORM-BOX-SHADOW, 0 8px 28px rgba(var(--MAP-SHADOW-RGB, 0, 0, 0), 0.55));
	font-family: var(--FONT-FAMILY, 'Segoe UI', system-ui, sans-serif);
	overflow: hidden;
	pointer-events: auto;
	user-select: none;
	transition: max-height 0.25s ease, width 0.25s ease;
}

.ark-conn-panel.is-collapsed .ark-conn-panel-body {
	display: none;
}

.ark-conn-panel.is-collapsed {
	width: 270px;
}

.ark-conn-panel.is-dragged,
.ark-floating-panel.is-dragged {
	bottom: auto !important;
	right: auto !important;
}

[MapTopologyPanel="1"] .ark-map-zoom-readout,
[MapConnectionsPanel="1"] .ark-map-zoom-readout,
[MapGisTopologyPanel="1"] .ark-map-zoom-readout {
	bottom: auto !important;
	top: 14px !important;
	left: 14px !important;
}

.ark-conn-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 12px;
	border-bottom: 1px solid rgba(0, 229, 255, 0.2);
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 8%, var(--MAP-SURFACE, rgba(10, 16, 26, 0.85)));
	cursor: grab;
	user-select: none;
	touch-action: none;
}

.ark-conn-panel-header:active {
	cursor: grabbing;
}

.ark-conn-panel-title-wrap {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.ark-conn-panel-radar-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--MAP-ACCENT, var(--MAP-COLOR-CONNECTION, #00e5ff));
	box-shadow: 0 0 8px var(--MAP-ACCENT, var(--MAP-COLOR-CONNECTION, #00e5ff));
	--unused-radar-dot-shadow:
	box-shadow: 0 0 8px var(--MAP-COLOR-CONNECTION, #00e5ff);
	flex-shrink: 0;
}

.ark-conn-panel-title {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--MAP-TEXT-STRONG, #ffffff);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-conn-panel-count {
	padding: 1px 6px;
	font-size: 10px;
	font-weight: 800;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	background: rgba(0, 229, 255, 0.18);
	color: var(--MAP-COLOR-CONNECTION, #00e5ff);
	border: 1px solid rgba(0, 229, 255, 0.4);
}

.ark-conn-panel-toggle-btn {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--FORM-FG-COLOR, #cbd5e1);
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	transition: all 0.18s ease;
}

.ark-conn-panel-toggle-btn:hover {
	border-color: var(--MAP-ACCENT, var(--BRAND-COLOR, #00e5ff));
	color: var(--MAP-TEXT-STRONG, #ffffff);
}

.ark-conn-panel-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px;
	min-height: 0;
	flex: 1;
	overflow: hidden;
}

.ark-conn-toolbar {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 4px;
}

.ark-conn-tool-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 6px 4px;
	font-size: 9.5px;
	font-weight: 600;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	cursor: pointer;
	color: var(--FORM-FG-COLOR, #cbd5e1);
	background: rgba(255, 255, 255, 0.04);
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(255, 255, 255, 0.12));
	transition: all 0.18s ease;
}

.ark-conn-tool-btn i {
	font-size: 12px;
	color: var(--MAP-COLOR-CONNECTION, #00e5ff);
}

.ark-conn-tool-btn:hover {
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 14%, transparent);
	border-color: var(--MAP-ACCENT, var(--BRAND-COLOR, #00e5ff));
	color: var(--MAP-TEXT-STRONG, #ffffff);
}

.ark-conn-tool-btn.is-active {
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 20%, transparent);
	border-color: var(--MAP-ACCENT, var(--BRAND-COLOR, #00e5ff));
	color: var(--MAP-TEXT-STRONG, #ffffff);
	box-shadow: 0 0 10px color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 25%, transparent);
}

.ark-conn-tool-btn.is-gps i {
	color: var(--MAP-COLOR-CONNECTION-EXACT, #10b981);
}

.ark-conn-tool-btn.is-gps:hover,
.ark-conn-tool-btn.is-gps.is-active {
	background: rgba(16, 185, 129, 0.2);
	border-color: var(--MAP-COLOR-CONNECTION-EXACT, #10b981);
}

.ark-conn-tool-btn.is-hub i {
	color: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
}

.ark-conn-tool-btn.is-hub:hover,
.ark-conn-tool-btn.is-hub.is-active {
	background: rgba(192, 132, 252, 0.22);
	border-color: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
}

.ark-conn-activity-help {
	font-size: 11px;
	color: var(--MAP-TEXT-STRONG);
	overflow-wrap: anywhere;
}

.ark-conn-panel.ark-conn-history-panel {
	width: min(960px, calc(100% - 24px));
	max-width: calc(100% - 24px);
	max-height: calc(100% - 24px);
	top: 12px;
	left: 12px;
	z-index: 1010;
}

.ark-conn-history-panel[hidden] {
	display: none;
}

.ark-conn-history-panel .ark-floating-panel-body {
	min-height: 0;
	overflow: auto;
}

.ark-conn-history-panel .ark-conn-search-wrap {
	flex-wrap: wrap;
}

.ark-conn-history-panel .ark-conn-search-input {
	flex: 1 1 180px;
	width: auto;
}

.ark-conn-history-table-wrap {
	max-height: 50vh;
	overflow: auto;
}

.ark-conn-history-table-wrap table {
	width: 100%;
	border-collapse: collapse;
	font-size: 11px;
	color: var(--MAP-TEXT-STRONG);
}

.ark-conn-history-table-wrap th,
.ark-conn-history-table-wrap td {
	padding: 4px 6px;
	text-align: left;
	border-bottom: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR);
	vertical-align: top;
	overflow-wrap: anywhere;
}

.ark-conn-history-table-wrap th {
	position: sticky;
	top: 0;
	background: var(--FORM-BG1-COLOR, var(--FORM-BG));
}

.ark-conn-search-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
}

.ark-conn-search-input {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding: 6px 10px;
	font-size: 11.5px;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	background: var(--INPUT-BG-COLOR, rgba(15, 23, 42, 0.55));
	color: var(--INPUT-FG-COLOR, #f8fafc);
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(var(--MAP-ACCENT-RGB, 0, 229, 255), 0.28));
	outline: none;
	transition: border-color 0.18s ease;
}

.ark-conn-search-input:focus {
	border-color: var(--MAP-ACCENT, var(--BRAND-COLOR, #00e5ff));
	box-shadow: 0 0 8px color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 25%, transparent);
}

.ark-conn-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ark-conn-filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	font-size: 9.8px;
	font-weight: 700;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	cursor: pointer;
	background: rgba(255, 255, 255, 0.05);
	color: var(--FORM-FG-COLOR, #94a3b8);
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(255, 255, 255, 0.14));
	transition: all 0.18s ease;
	--chip-accent: var(--ark-chip-color, var(--MAP-COLOR-CONNECTION, var(--MAP-ACCENT, #00e5ff)));
}

.ark-conn-filter-chip[data-filter="auth_ok"] {
	--chip-accent: var(--ark-chip-color, var(--MAP-COLOR-INTENT-AUTH-OK, #10b981));
}

.ark-conn-filter-chip[data-filter="unauth_route"] {
	--chip-accent: var(--ark-chip-color, var(--MAP-COLOR-INTENT-UNAUTH-ROUTE, #f59e0b));
}

.ark-conn-filter-chip[data-filter="bad_credentials"] {
	--chip-accent: var(--ark-chip-color, var(--MAP-COLOR-INTENT-BAD-AUTH, #f97316));
}

.ark-conn-filter-chip[data-filter="hack_attempt"] {
	--chip-accent: var(--ark-chip-color, var(--MAP-COLOR-INTENT-HACK, #ef4444));
}

.ark-conn-filter-chip[data-filter="verified"] {
	--chip-accent: var(--ark-chip-color, var(--MAP-COLOR-CONNECTION-EXACT, #10b981));
}

.ark-conn-filter-chip-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--chip-accent);
	box-shadow: 0 0 5px var(--chip-accent);
	flex-shrink: 0;
}

.ark-conn-filter-chip-badge {
	padding: 0 4px;
	font-size: 8.5px;
	font-weight: 800;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	background: rgba(255, 255, 255, 0.1);
	color: var(--MAP-TEXT-STRONG, #ffffff);
}

.ark-conn-filter-chip:hover {
	border-color: var(--chip-accent);
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: color-mix(in srgb, var(--chip-accent) 14%, transparent);
}

.ark-conn-filter-chip.is-active {
	background: color-mix(in srgb, var(--chip-accent) 24%, transparent);
	color: var(--MAP-TEXT-STRONG, #ffffff);
	border-color: var(--chip-accent);
	box-shadow: 0 0 10px color-mix(in srgb, var(--chip-accent) 32%, transparent);
}

.ark-conn-popup-security-box {
	margin: 6px 0 8px 0;
	padding: 7px 9px;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	background: color-mix(in srgb, var(--ark-conn-color, #00e5ff) 11%, transparent);
	border: 1px solid color-mix(in srgb, var(--ark-conn-color, #00e5ff) 38%, transparent);
	border-left: 3px solid var(--ark-conn-color, #00e5ff);
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ark-conn-popup-security-title {
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ark-conn-color, #00e5ff);
}

.ark-conn-popup-security-detail {
	font-size: 10.5px;
	color: var(--MAP-TEXT-STRONG, #ffffff);
	line-height: 1.3;
	word-break: break-word;
}

.ark-conn-status-banner {
	display: none;
	padding: 5px 8px;
	font-size: 10.5px;
	font-weight: 600;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	background: rgba(16, 185, 129, 0.16);
	color: #34d399;
	border: 1px solid rgba(16, 185, 129, 0.45);
}

.ark-conn-status-banner.is-visible {
	display: block;
}

.ark-conn-status-banner.is-error {
	background: rgba(239, 68, 68, 0.16);
	color: #f87171;
	border-color: rgba(239, 68, 68, 0.45);
}

.ark-conn-feed-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
	overflow-y: auto;
	max-height: 310px;
	padding-right: 3px;
}

.ark-conn-feed-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 7px 9px;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	cursor: pointer;
	background: rgba(255, 255, 255, 0.035);
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	border-left: 3px solid var(--ark-item-color, var(--MAP-COLOR-CONNECTION, #00e5ff));
	transition: all 0.18s ease;
}

.ark-conn-feed-item:hover,
.ark-conn-feed-item.is-selected {
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 11%, transparent);
	border-color: var(--ark-item-color, var(--MAP-COLOR-CONNECTION, #00e5ff));
	transform: translateX(2px);
}

/* Impact: the precision/intent chip may hold long labels ("Solicitud protegida sin sesion: rechazada (1)"); the row
   wraps so the chip moves to its own line instead of covering the IP and country flag. */
.ark-conn-feed-row-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	row-gap: 3px;
}

.ark-conn-feed-ip-group {
	display: flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	flex-shrink: 0;
}

.ark-conn-feed-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ark-item-color, #00e5ff);
	box-shadow: 0 0 6px var(--ark-item-color, #00e5ff);
	flex-shrink: 0;
}

.ark-conn-feed-ip {
	font-size: 11.5px;
	font-weight: 700;
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
	color: var(--MAP-TEXT-STRONG, #ffffff);
}

.ark-conn-feed-flag {
	padding: 0 4px;
	font-size: 9px;
	font-weight: 800;
	border-radius: 3px;
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 14%, transparent);
	color: var(--ark-item-color, #00e5ff);
	border: 1px solid color-mix(in srgb, var(--ark-item-color, #00e5ff) 40%, transparent);
}

.ark-conn-feed-precision {
	font-size: 9px;
	font-weight: 700;
	padding: 1px 5px;
	min-width: 0;
	max-width: 100%;
	margin-left: auto;
	white-space: normal;
	text-align: right;
	border-radius: 4px;
	color: var(--ark-item-color, var(--MAP-TEXT-SOFT, #cbd5e1));
	border: 1px solid color-mix(in srgb, var(--ark-item-color, var(--MAP-TEXT-SOFT, #cbd5e1)) 45%, transparent);
	background: color-mix(in srgb, var(--ark-item-color, var(--MAP-TEXT-SOFT, #cbd5e1)) 14%, transparent);
}

.ark-conn-feed-precision.is-exact {
	background: rgba(16, 185, 129, 0.18);
	color: #34d399;
	border: 1px solid rgba(16, 185, 129, 0.45);
}

.ark-conn-feed-row-mid {
	font-size: 10.5px;
	color: var(--FORM-FG-COLOR, #cbd5e1);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-conn-feed-row-bot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 9.5px;
	color: var(--MAP-TEXT-MUTED, #94a3b8);
}

.ark-conn-feed-empty {
	padding: 16px 8px;
	text-align: center;
	font-size: 11px;
	color: var(--MAP-TEXT-MUTED, #94a3b8);
}



/* Segmented Route/Target Selector: Todos vs Solo a Nodos ISP vs Solo a XAORUS
   Impact: wraps into extra rows instead of overflowing the docked panel (3 nowrap labels need ~333px and the
   main area beside the tools rail has ~296px). Do not restore a fixed 3-column grid with nowrap labels. */
.ark-conn-target-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 3px;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	background: var(--INPUT-BG-COLOR, rgba(15, 23, 42, 0.55));
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(148, 163, 184, 0.22));
}

.ark-conn-target-btn {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 5px 4px;
	font-size: 10px;
	font-weight: 800;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	cursor: pointer;
	background: transparent;
	color: var(--FORM-FG-COLOR, #cbd5e1);
	border: 1px solid transparent;
	transition: all 0.16s ease;
	white-space: normal;
	text-align: center;
}

.ark-conn-target-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
}

.ark-conn-target-btn.is-active {
	background: color-mix(in srgb, var(--MAP-TEXT, var(--FORM-FG-COLOR, #e2e8f0)) 22%, transparent);
	border-color: color-mix(in srgb, var(--MAP-TEXT, var(--FORM-FG-COLOR, #e2e8f0)) 45%, transparent);
	color: var(--MAP-TEXT, var(--FORM-FG-COLOR, #e2e8f0));
}

.ark-conn-target-btn.is-active[data-target-mode="isp_nodes"] {
	background: color-mix(in srgb, var(--MAP-COLOR-ISP-NODE, #00d4ff) 24%, transparent);
	border-color: var(--MAP-COLOR-ISP-NODE, #00d4ff);
	color: #ffffff;
	box-shadow: 0 0 10px color-mix(in srgb, var(--MAP-COLOR-ISP-NODE, #00d4ff) 32%, transparent);
}

.ark-conn-target-btn.is-active[data-target-mode="xaorus_hub"] {
	background: color-mix(in srgb, var(--MAP-COLOR-CONNECTION-HUB, #c084fc) 26%, transparent);
	border-color: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
	color: #ffffff;
	box-shadow: 0 0 10px color-mix(in srgb, var(--MAP-COLOR-CONNECTION-HUB, #c084fc) 32%, transparent);
}

.ark-conn-target-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
}

.ark-conn-target-btn[data-target-mode="isp_nodes"] .ark-conn-target-dot {
	background: var(--MAP-COLOR-ISP-NODE, #00d4ff);
	box-shadow: 0 0 6px var(--MAP-COLOR-ISP-NODE, #00d4ff);
}

.ark-conn-target-btn[data-target-mode="xaorus_hub"] .ark-conn-target-dot {
	background: var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
	box-shadow: 0 0 6px var(--MAP-COLOR-CONNECTION-HUB, #c084fc);
}

/* ISP Provider Node Beacon & Filter Chip */
.ark-connection-isp-node-marker {
	--ark-conn-color: var(--MAP-COLOR-ISP-NODE, #00d4ff);
	z-index: 32;
}

.ark-connection-isp-node-marker .ark-conn-floating-card {
	border-width: 1.5px;
	border-style: dashed;
	border-color: var(--MAP-COLOR-ISP-NODE, #00d4ff);
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG, rgba(var(--MAP-SURFACE-RGB, 10, 16, 26), 0.94)));
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 16px color-mix(in srgb, var(--MAP-COLOR-ISP-NODE, #00d4ff) 42%, transparent);
}

.ark-connection-marker.is-intent-isp_node {
	--ark-conn-color: var(--MAP-COLOR-ISP-NODE, #00d4ff);
}

.ark-conn-filter-chip[data-filter="isp_node"] {
	--ark-chip-color: var(--MAP-COLOR-ISP-NODE, #00d4ff); --chip-accent: var(--ark-chip-color, var(--MAP-COLOR-ISP-NODE, #00d4ff));
}

/* ==========================================================================
   Reusable Floating & Draggable Panel (ArkFloatingPanel & ArkMapTopologyPanel)
   Coordinates with XAORUS Theme Tokens (Dark & Light)
   ========================================================================== */
.ark-floating-panel,
.ark-conn-panel {
	position: absolute;
	bottom: 14px;
	left: 14px;
	width: 330px;
	max-width: calc(100vw - 28px);
	max-height: calc(100% - 28px);
	z-index: 1000;
	display: flex;
	flex-direction: column;
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG, var(--MAP-SURFACE)));
	color: var(--MAP-TEXT, var(--FORM-FG-COLOR, #e2e8f0));
	backdrop-filter: var(--FORM-BACKDROP-FILTER, blur(14px) saturate(180%));
	-webkit-backdrop-filter: var(--FORM-BACKDROP-FILTER, blur(14px) saturate(180%));
	border: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.32));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: var(--FORM-BOX-SHADOW, 0 8px 28px rgba(var(--MAP-SHADOW-RGB, 0, 0, 0), 0.55));
	font-family: var(--FONT-FAMILY, 'Segoe UI', system-ui, sans-serif);
	overflow: hidden;
	pointer-events: auto;
	user-select: none;
	transition: max-height 0.22s ease, width 0.22s ease;
}

.ark-floating-panel.is-collapsed,
.ark-conn-panel.is-collapsed {
	width: 270px;
}

.ark-floating-panel.is-collapsed .ark-floating-panel-body,
.ark-conn-panel.is-collapsed .ark-conn-panel-body {
	display: none !important;
}

.ark-floating-panel.is-dragged,
.ark-conn-panel.is-dragged {
	bottom: auto !important;
	right: auto !important;
}

.ark-floating-panel-header,
.ark-conn-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 12px;
	border-bottom: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.2));
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 8%, var(--MAP-SURFACE, rgba(10, 16, 26, 0.85)));
	cursor: grab;
	user-select: none;
	touch-action: none;
}

.ark-floating-panel-header:active,
.ark-conn-panel-header:active {
	cursor: grabbing;
}

body.ark-panel-dragging-active,
body.ark-panel-dragging-active * {
	cursor: grabbing !important;
	user-select: none !important;
}

.ark-floating-panel-title-wrap,
.ark-conn-panel-title-wrap {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	flex: 1;
}

.ark-floating-panel-icon {
	color: var(--MAP-ACCENT, var(--MAP-COLOR-STREAM, #00e5ff));
	font-size: 13px;
	display: inline-flex;
	align-items: center;
}

.ark-floating-panel-title,
.ark-conn-panel-title {
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--MAP-TEXT-STRONG, #ffffff);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-floating-panel-count,
.ark-conn-panel-count {
	padding: 1px 6px;
	font-size: 10px;
	font-weight: 800;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 18%, transparent);
	color: var(--MAP-ACCENT, #00e5ff);
	border: 1px solid color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 40%, transparent);
}

.ark-floating-panel-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ark-floating-action-btn,
.ark-floating-panel-toggle-btn,
.ark-conn-panel-action-btn,
.ark-conn-panel-toggle-btn {
	background: transparent;
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(255, 255, 255, 0.15));
	color: var(--MAP-TEXT-SOFT, var(--FORM-FG-COLOR, #cbd5e1));
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	transition: all 0.18s ease;
}

.ark-floating-action-btn:hover,
.ark-floating-panel-toggle-btn:hover,
.ark-conn-panel-action-btn:hover,
.ark-conn-panel-toggle-btn:hover {
	border-color: var(--MAP-ACCENT, #00e5ff);
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 14%, transparent);
}

.ark-floating-action-btn.is-active,
.ark-floating-panel-toggle-btn.is-active,
.ark-conn-panel-action-btn.is-active,
.ark-conn-panel-toggle-btn.is-active {
	border-color: var(--MAP-ACCENT, #00e5ff);
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 24%, transparent);
}

.ark-floating-panel-body,
.ark-conn-panel-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px;
	min-height: 0;
	flex: 1;
	overflow: hidden;
}

/* ==========================================================================
   Delicate HUD Topology Settings & Refined Controls
   Coordinates strictly with XAORUS Theme Tokens (Dark & Light)
   ========================================================================== */
.ark-conn-settings-view {
	display: none;
	flex-direction: column;
	gap: 7px;
	padding: 8px 10px;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	background: color-mix(in srgb, var(--MAP-SURFACE, #08101a) 88%, black);
	border: 1px solid var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.28));
	box-shadow: inset 0 2px 10px rgba(var(--MAP-SHADOW-RGB, 0, 0, 0), 0.55), 0 6px 18px rgba(0, 0, 0, 0.35);
	max-height: 295px;
	overflow: hidden;
	animation: arkSlideDown 0.18s ease-out;
}

.ark-conn-settings-view.is-open {
	display: flex;
}

.ark-conn-settings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--MAP-ACCENT, #00e5ff);
	border-bottom: 1px solid color-mix(in srgb, var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.25)) 50%, transparent);
	padding-bottom: 5px;
}

.ark-conn-settings-header span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ark-conn-settings-close-btn {
	background: transparent;
	border: none;
	color: var(--MAP-TEXT-MUTED, #94a3b8);
	font-size: 13px;
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.15s ease;
}

.ark-conn-settings-close-btn:hover {
	color: var(--MAP-TEXT-STRONG, #ffffff);
	background: rgba(255, 255, 255, 0.08);
}

.ark-conn-settings-scroll {
	display: flex;
	flex-direction: column;
	gap: 7px;
	overflow-y: auto;
	padding-right: 4px;
	max-height: 220px;
}

.ark-conn-settings-scroll::-webkit-scrollbar {
	width: 4px;
}

.ark-conn-settings-scroll::-webkit-scrollbar-thumb {
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 35%, transparent);
	border-radius: 4px;
}

/* Delicate Glass Section Cards */
.ark-conn-settings-card {
	background: color-mix(in srgb, var(--MAP-SURFACE, #08101a) 65%, rgba(255, 255, 255, 0.02));
	border: 1px solid color-mix(in srgb, var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.2)) 35%, transparent);
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	padding: 6px 8px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.ark-conn-settings-card-title {
	font-size: 8.5px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--MAP-TEXT-MUTED, #94a3b8);
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding-bottom: 2px;
	border-bottom: 1px dashed color-mix(in srgb, var(--MAP-TEXT-MUTED, #94a3b8) 22%, transparent);
}

.ark-conn-settings-card-title i {
	font-size: 8.5px;
	color: var(--MAP-ACCENT, #00e5ff);
}

/* Swatches Grid */
.ark-conn-swatches-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	padding: 3px 0;
}

.ark-conn-swatch-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}

.ark-conn-swatch-dot {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 1.5px solid rgba(255, 255, 255, 0.4);
	position: relative;
	cursor: pointer;
	background: var(--ark-swatch-color, var(--MAP-ACCENT, #00e5ff));
	box-shadow: 0 0 8px var(--ark-swatch-color, var(--MAP-ACCENT, #00e5ff));
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	flex-shrink: 0;
}

.ark-conn-swatch-dot:hover {
	transform: scale(1.18);
	border-color: #ffffff;
}

.ark-conn-swatch-dot-sm {
	width: 16px;
	height: 16px;
}

.ark-conn-target-dot-stream { background: var(--MAP-COLOR-STREAM); }
.ark-conn-target-dot-server { background: var(--MAP-COLOR-AIASERVER); }

.ark-conn-filter-chip-dot.is-stream { background: var(--MAP-COLOR-STREAM); }
.ark-conn-filter-chip-dot.is-aiaserver { background: var(--MAP-COLOR-AIASERVER); }
.ark-conn-filter-chip-dot.is-alert { background: var(--MAP-COLOR-ALERT); }
.ark-conn-filter-chip-dot.is-verified { background: var(--MAP-COLOR-VERIFIED); }
.ark-conn-filter-chip-dot.is-normal { background: var(--MAP-COLOR-STREAM); }

.ark-conn-feed-badge-count {
	margin-right: 4px;
	font-weight: 800;
}

.ark-conn-hidden-color {
	opacity: 0;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	padding: 0;
	margin: 0;
	border: none;
}

.ark-conn-swatch-label {
	font-size: 8.5px;
	font-weight: 600;
	color: var(--MAP-TEXT-SOFT, #cbd5e1);
	text-align: center;
	white-space: nowrap;
}

.ark-conn-swatch-inline {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Slider Rows */
.ark-conn-settings-row {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 9px;
}

.ark-conn-settings-label {
	width: 82px;
	flex-shrink: 0;
	color: var(--MAP-TEXT-SOFT, #cbd5e1);
	font-weight: 600;
	white-space: nowrap;
}

/* Delicate Custom Range Slider */
.ark-conn-settings-slider {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	background: transparent;
	height: 16px;
	cursor: pointer;
	margin: 0;
}

.ark-conn-settings-slider:focus {
	outline: none;
}

.ark-conn-settings-slider::-webkit-slider-runnable-track {
	height: 3px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 25%, rgba(255, 255, 255, 0.12));
	transition: background 0.18s ease;
}

.ark-conn-settings-slider::-moz-range-track {
	height: 3px;
	border-radius: 3px;
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 25%, rgba(255, 255, 255, 0.12));
	border: none;
}

.ark-conn-settings-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 11px;
	height: 11px;
	margin-top: -4px;
	border-radius: 50%;
	background: var(--MAP-ACCENT, #00e5ff);
	border: 1.5px solid var(--MAP-SURFACE, #08101a);
	box-shadow: 0 0 5px var(--MAP-ACCENT, #00e5ff);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	cursor: grab;
}

.ark-conn-settings-slider:active::-webkit-slider-thumb {
	cursor: grabbing;
	transform: scale(1.3);
	box-shadow: 0 0 9px var(--MAP-ACCENT, #00e5ff);
}

.ark-conn-settings-slider::-moz-range-thumb {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--MAP-ACCENT, #00e5ff);
	border: 1.5px solid var(--MAP-SURFACE, #08101a);
	box-shadow: 0 0 5px var(--MAP-ACCENT, #00e5ff);
	cursor: grab;
}

/* Numerical Readout Value Pill */
.ark-conn-settings-val {
	width: 44px;
	text-align: center;
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
	font-size: 8.5px;
	font-weight: 700;
	color: var(--MAP-ACCENT, #00e5ff);
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 30%, transparent);
	padding: 1px 4px;
	border-radius: 4px;
	flex-shrink: 0;
}

/* Footer & Reset Button */
.ark-conn-settings-footer {
	display: flex;
	justify-content: flex-end;
	padding-top: 3px;
	border-top: 1px solid color-mix(in srgb, var(--MAP-TEXT-MUTED, #94a3b8) 18%, transparent);
}

.ark-conn-settings-btn-reset {
	background: color-mix(in srgb, var(--MAP-COLOR-INTENT-HACK, #ef4444) 14%, transparent);
	border: 1px solid color-mix(in srgb, var(--MAP-COLOR-INTENT-HACK, #ef4444) 35%, transparent);
	color: var(--MAP-COLOR-INTENT-HACK, #fca5a5);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.02em;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	padding: 3px 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: all 0.18s ease;
}

.ark-conn-settings-btn-reset:hover {
	background: color-mix(in srgb, var(--MAP-COLOR-INTENT-HACK, #ef4444) 28%, transparent);
	color: #ffffff;
	border-color: var(--MAP-COLOR-INTENT-HACK, #ef4444);
}

/* ==========================================================================
   Docked GIS Tools Rail in Floating Panel
   ========================================================================== */
.ark-conn-panel-workspace {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0;
	min-height: 0;
	flex: 1;
	width: 100%;
}

.ark-conn-panel-tools-rail {
	display: none;
	flex-direction: column;
	width: 68px;
	flex-shrink: 0;
	border-right: 1px solid color-mix(in srgb, var(--MAP-TOOLS-PANEL-BORDER, rgba(0, 229, 255, 0.28)) 50%, transparent);
	padding-right: 6px;
	margin-right: 8px;
	overflow-y: auto;
	max-height: 480px;
}

.ark-conn-panel-tools-rail::-webkit-scrollbar {
	width: 3px;
}

.ark-conn-panel-tools-rail::-webkit-scrollbar-thumb {
	background: color-mix(in srgb, var(--MAP-ACCENT, #00e5ff) 30%, transparent);
	border-radius: 3px;
}

.ark-gis-topology-panel.has-tools-rail .ark-conn-panel-tools-rail,
.ark-conn-panel.has-tools-rail .ark-conn-panel-tools-rail,
.ark-connections-panel.has-tools-rail .ark-conn-panel-tools-rail {
	display: flex;
}

/* Impact: with the panel expanded the rail must span the full height of the main area and scroll inside it.
   contain:size removes its intrinsic height so the stretched row height comes from the main area; a fixed
   max-height left the rail shorter than the panel. Rail-only mode has no main area and keeps natural height. */
.ark-gis-topology-panel.has-tools-rail:not(.is-rail-only) .ark-conn-panel-tools-rail,
.ark-conn-panel.has-tools-rail:not(.is-rail-only) .ark-conn-panel-tools-rail,
.ark-connections-panel.has-tools-rail:not(.is-rail-only) .ark-conn-panel-tools-rail {
	max-height: none;
	contain: size;
}

.ark-gis-topology-panel.has-tools-rail,
.ark-conn-panel.has-tools-rail,
.ark-connections-panel.has-tools-rail {
	width: 398px;
}

.ark-gis-topology-panel.has-tools-rail.is-collapsed,
.ark-conn-panel.has-tools-rail.is-collapsed,
.ark-connections-panel.has-tools-rail.is-collapsed {
	width: 270px;
}

.ark-conn-panel-main-area {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 0;
}

.ark-map-tools-panel.is-docked {
	position: static !important;
	left: auto !important;
	top: auto !important;
	transform: none !important;
	width: 100% !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	z-index: auto !important;
}

.ark-gis-topology-panel .ark-map-tools-result.is-docked,
.ark-conn-panel .ark-map-tools-result.is-docked,
.ark-connections-panel .ark-map-tools-result.is-docked {
	position: absolute;
	left: calc(100% + 10px);
	top: 14px;
	transform: none;
	z-index: 25;
	max-width: 260px;
	animation: arkSlideDown 0.15s ease-out;
}

/* ==========================================================================
   Horizontal Collapse to Left Tools Rail Only (GIS Topology & Connections)
   ========================================================================== */
#ark-gis-btn-collapse-side,
#ark-conn-btn-collapse-side {
	display: none;
}

.ark-gis-topology-panel.has-tools-rail #ark-gis-btn-collapse-side,
.ark-conn-panel.has-tools-rail #ark-conn-btn-collapse-side,
.ark-connections-panel.has-tools-rail #ark-conn-btn-collapse-side {
	display: inline-flex;
}

.ark-gis-topology-panel,
.ark-conn-panel,
.ark-connections-panel {
	transition: width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ark-gis-topology-panel.is-rail-only,
.ark-conn-panel.is-rail-only,
.ark-connections-panel.is-rail-only {
	width: 80px !important;
}

.ark-gis-topology-panel.is-rail-only .ark-conn-panel-title-wrap,
.ark-conn-panel.is-rail-only .ark-conn-panel-title-wrap,
.ark-connections-panel.is-rail-only .ark-conn-panel-title-wrap {
	display: none !important;
}

.ark-gis-topology-panel.is-rail-only .ark-conn-panel-header,
.ark-conn-panel.is-rail-only .ark-conn-panel-header,
.ark-connections-panel.is-rail-only .ark-conn-panel-header {
	padding: 6px 8px !important;
	justify-content: center !important;
}

.ark-gis-topology-panel.is-rail-only .ark-floating-panel-actions,
.ark-conn-panel.is-rail-only .ark-floating-panel-actions,
.ark-connections-panel.is-rail-only .ark-floating-panel-actions {
	width: 100% !important;
	justify-content: center !important;
}

.ark-gis-topology-panel.is-rail-only .ark-conn-panel-main-area,
.ark-conn-panel.is-rail-only .ark-conn-panel-main-area,
.ark-connections-panel.is-rail-only .ark-conn-panel-main-area {
	display: none !important;
}

.ark-gis-topology-panel.is-rail-only .ark-conn-panel-tools-rail,
.ark-conn-panel.is-rail-only .ark-conn-panel-tools-rail,
.ark-connections-panel.is-rail-only .ark-conn-panel-tools-rail {
	max-height: none;
	border-right: none !important;
	padding-right: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
}

.ark-gis-topology-panel.is-rail-only #ark-gis-btn-settings,
.ark-gis-topology-panel.is-rail-only #ark-gis-btn-reset-pos,
.ark-gis-topology-panel.is-rail-only #ark-gis-panel-toggle,
.ark-conn-panel.is-rail-only #ark-gis-btn-settings,
.ark-conn-panel.is-rail-only #ark-conn-btn-settings,
.ark-conn-panel.is-rail-only #ark-conn-btn-reset-pos,
.ark-conn-panel.is-rail-only #ark-conn-panel-toggle {
	display: none !important;
}

.ark-gis-topology-panel.is-rail-only #ark-gis-btn-collapse-side,
.ark-conn-panel.is-rail-only #ark-conn-btn-collapse-side {
	display: inline-flex !important;
	width: 100% !important;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px)) !important;
}


/* -------------------------------------------------------------
 * REGION EVENTS FLOATING INSPECTOR PANEL (GIS AREA SELECTION)
 * ------------------------------------------------------------- */

.ark-region-events-panel {
	width: 960px;
	height: 580px;
	min-width: 620px;
	min-height: 420px;
	max-width: 95vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG));
	border: 1px solid var(--FORM-BORDER-COLOR, var(--MAP-BORDER-COLOR, rgba(255, 255, 255, 0.12)));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: var(--FORM-BOX-SHADOW, 0 16px 40px rgba(0, 0, 0, 0.45));
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	z-index: 1000;
	font-family: var(--FONT-FAMILY, var(--APPLICATION-DEFAULT-FONT-FAMILY-REGULAR));
	overflow: hidden;
}

.ark-region-events-panel .ark-floating-panel-body {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	flex: 1 1 auto;
	height: calc(100% - 40px);
}

/* 1L2R Split Layout (Modeled after EventsReport.Filtering.Management.View_v2.php) */
.ark-region-split-layout {
	display: flex;
	flex-direction: row;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.ark-region-split-left {
	flex: 1 1 58%;
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.1));
	overflow: hidden;
	min-width: 320px;
	background: rgba(0, 0, 0, 0.05);
}

.ark-region-finder-wrap {
	display: flex;
	align-items: center;
	position: relative;
	gap: 8px;
	padding: 6px 10px;
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	background: rgba(0, 0, 0, 0.12);
}

.ark-region-split-right {
	flex: 0 0 380px;
	width: 380px;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	background: rgba(0, 0, 0, 0.08);
}

.ark-floating-panel.ark-region-events-panel.is-collapsed {
	min-width: 0;
	max-width: min(270px, 95vw);
}

.ark-region-events-panel.is-collapsed .ark-floating-panel-body {
	display: flex !important;
}

.ark-region-events-panel.is-collapsed .ark-region-split-left {
	min-width: 0;
	border-right: 0;
}

.ark-region-events-panel.is-collapsed .ark-region-split-right,
.ark-region-events-panel.is-collapsed .ark-floating-panel-resize-handle {
	display: none;
}

.ark-region-events-panel.is-collapsed .STC_DataGrid_PaginationFooter {
	flex-wrap: wrap;
	gap: 4px;
}

.ark-region-split-right::-webkit-scrollbar {
	width: 5px;
}
.ark-region-split-right::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 3px;
}

.ark-region-filter-pane {
	padding: 8px 10px;
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.1));
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ark-region-pane-header {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	color: var(--FORM-LABEL-COLOR, #fff);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 4px;
}

.ark-region-field-row {
	display: grid;
	grid-template-columns: 85px 1fr;
	align-items: center;
	gap: 6px;
	margin-bottom: 4px;
}

.ark-region-field-label {
	font-size: 10.5px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.7));
	text-align: right;
}

.ark-region-field-select,
.ark-region-field-input {
	width: 100%;
	padding: 4px 6px;
	font-size: 11px;
	font-family: inherit;
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.15));
	background: var(--FORM-FIELD-BG, rgba(0, 0, 0, 0.25));
	color: var(--FORM-FIELD-COLOR, #fff);
	outline: none;
	box-sizing: border-box;
}

.ark-region-filter-actions {
	display: flex;
	justify-content: flex-end;
	gap: 6px;
	margin-top: 4px;
}

.ark-region-attention-pane {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 8px 10px;
	gap: 6px;
}

.ark-region-frame-canvas-wrap {
	position: relative;
	width: 100%;
	height: 155px;
	background: #000;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.15));
}

.ark-region-frame-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ark-region-frame-regions-svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ark-region-frame-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
	padding: 2px 0;
}

.ark-region-frame-toolbar .Button.STC_EventReportAction {
	font-size: 10.5px;
	padding: 3px 8px;
	height: auto;
	line-height: normal;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ark-region-frame-toolbar .ark-frame-cmd-verify-pos.is-verified {
	background: var(--MAP-COLOR-VERIFIED, #34d399) !important;
	color: #0b1016 !important;
	border-color: var(--MAP-COLOR-VERIFIED, #34d399) !important;
}

.ark-region-frame-toolbar .ark-frame-cmd-verify-neg.is-discarded {
	background: var(--MAP-COLOR-ALERT, #f87171) !important;
	color: #fff !important;
	border-color: var(--MAP-COLOR-ALERT, #f87171) !important;
}

.ark-region-frame-toolbar .ark-frame-cmd-approve-pos.is-approved {
	background: var(--MAP-COLOR-VERIFIED, #34d399) !important;
	color: #0b1016 !important;
	border-color: var(--MAP-COLOR-VERIFIED, #34d399) !important;
}

.ark-region-frame-toolbar .ark-frame-cmd-approve-neg.is-rejected {
	background: var(--MAP-COLOR-ALERT, #f87171) !important;
	color: #fff !important;
	border-color: var(--MAP-COLOR-ALERT, #f87171) !important;
}

.ark-region-frame-toolbar .ark-frame-cmd-delete:hover {
	background: var(--MAP-COLOR-ALERT, #f87171) !important;
	color: #fff !important;
	border-color: var(--MAP-COLOR-ALERT, #f87171) !important;
}

.ark-region-frame-toolbar .ark-frame-cmd-delete.is-deleting {
	background: var(--MAP-COLOR-ALERT, #f87171) !important;
	color: #fff !important;
	border-color: var(--MAP-COLOR-ALERT, #f87171) !important;
}

.ark-region-event-details-card {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	padding: 6px 8px;
	font-size: 11px;
}

/* Dashboard-style Mini KPI Metrics Row */
.ark-region-kpi-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.18);
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
}

.ark-region-kpi-card {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 8px;
	background: var(--DASHBOARD-SURFACE-BG, rgba(255, 255, 255, 0.03));
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	transition: background 0.15s, border-color 0.15s;
}

.ark-region-kpi-card.is-interactive {
	cursor: pointer;
}

.ark-region-kpi-card.is-interactive:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: var(--MAP-ACCENT, #3fff97);
}

.ark-region-kpi-icon {
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 4px);
	background: color-mix(in srgb, var(--MAP-ACCENT, #3fff97) 16%, transparent);
	color: var(--MAP-ACCENT, #3fff97);
	font-size: 11px;
	flex-shrink: 0;
}

.ark-region-kpi-data {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ark-region-kpi-val {
	font-size: 13px;
	font-weight: 700;
	color: var(--FORM-LABEL-COLOR, #fff);
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
	line-height: 1.1;
}

.ark-region-kpi-lbl {
	font-size: 9.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.6));
}

.ark-region-selection-bar {
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ark-region-selection-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.ark-region-selection-badge {
	font-size: 11px;
	color: var(--FORM-LABEL-COLOR, var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.75)));
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ark-region-stream-chips-scroll {
	display: flex;
	align-items: center;
	gap: 6px;
	overflow-x: auto;
	padding-bottom: 2px;
}

.ark-region-stream-chips-scroll::-webkit-scrollbar {
	height: 4px;
}

.ark-region-stream-chips-scroll::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
}

.ark-region-stream-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	white-space: nowrap;
	padding: 3px 8px;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.14));
	background: var(--MAP-BUTTON-BG, rgba(255, 255, 255, 0.06));
	color: var(--BUTTON-COLOR, var(--MAP-TEXT-COLOR, #fff));
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ark-region-stream-chip:hover {
	background: rgba(255, 255, 255, 0.12);
	border-color: var(--MAP-ACCENT, #3fff97);
}

.ark-region-stream-chip.is-active {
	background: var(--MAP-ACCENT, #3fff97);
	border-color: var(--MAP-ACCENT, #3fff97);
	color: #0b1016;
	font-weight: 700;
}

.ark-region-toolbar {
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
}

.ark-region-search-wrap {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.ark-region-search-icon {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.5));
	pointer-events: none;
}

.ark-region-finder-wrap .ark-region-search-input {
	width: 100%;
	min-width: 0;
	padding: 7px 30px 7px 10px;
	font-size: 12px;
	font-family: inherit;
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	border: var(--DEFAULT-BORDER-WIDTH, 1px) solid var(--DEFAULT-BORDER-COLOR, rgba(255, 255, 255, 0.15));
	background: var(--FORM-FIELD-BG, rgba(0, 0, 0, 0.25));
	color: var(--FORM-FIELD-COLOR, #fff);
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.ark-region-finder-wrap .ark-region-search-input:focus {
	border-color: var(--MAP-ACCENT, #3fff97);
	box-shadow: 0 0 0 1px var(--MAP-ACCENT, #3fff97);
}

.ark-region-search-clear {
	position: absolute;
	right: 14px;
	background: none;
	border: none;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.5));
	cursor: pointer;
	font-size: 12px;
	padding: 4px;
}

.ark-region-search-clear:hover {
	color: #fff;
}

.ark-region-severity-chips {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ark-region-status-bar {
	padding: 6px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11px;
	color: var(--FORM-LABEL-COLOR, var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.6)));
	background: rgba(0, 0, 0, 0.12);
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.06));
}

.ark-region-btn-quick-gallery {
	background: color-mix(in srgb, var(--MAP-ACCENT, #3fff97) 18%, transparent);
	border: 1px solid var(--MAP-ACCENT, #3fff97);
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	color: var(--MAP-ACCENT, #3fff97);
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	transition: background 0.15s, color 0.15s;
}

.ark-region-btn-quick-gallery:hover {
	background: var(--MAP-ACCENT, #3fff97);
	color: #0b1016;
}

.ark-region-events-feed {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 180px;
}

.ark-region-events-feed::-webkit-scrollbar {
	width: 6px;
}

.ark-region-events-feed::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
}

/* Event Card in Filter Panel (Modern Dashboard Lineament) */
.ark-region-event-card {
	display: flex;
	align-items: stretch;
	gap: 10px;
	padding: 8px 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	border-left: 3px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.2));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.ark-region-event-card:hover {
	background: rgba(255, 255, 255, 0.07);
	border-color: var(--MAP-ACCENT, #3fff97);
}

.ark-region-event-card.is-selected {
	background: color-mix(in srgb, var(--MAP-ACCENT, #3fff97) 12%, transparent);
	border-color: var(--MAP-ACCENT, #3fff97);
	border-left-color: var(--MAP-ACCENT, #3fff97);
	box-shadow: 0 0 0 1px var(--MAP-ACCENT, #3fff97);
}

.ark-region-card-thumb-wrap {
	position: relative;
	width: 60px;
	height: 48px;
	border-radius: var(--DEFAULT-BORDER-RADIUS, 2px);
	overflow: hidden;
	background: #000;
	flex-shrink: 0;
	cursor: pointer;
}

.ark-region-card-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.ark-region-card-thumb-wrap:hover .ark-region-card-thumb {
	transform: scale(1.08);
}

.ark-region-badge-has-photo {
	position: absolute;
	right: 2px;
	bottom: 2px;
	background: rgba(0, 0, 0, 0.75);
	color: var(--MAP-ACCENT, #3fff97);
	font-size: 9px;
	padding: 1px 3px;
	border-radius: 2px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ark-region-card-main {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.ark-region-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.ark-region-card-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--FORM-LABEL-COLOR, var(--MAP-TEXT-COLOR, #fff));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-region-chip-severity {
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	text-transform: uppercase;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

.ark-region-chip-severity.ark-severity--high {
	background: var(--MAP-COLOR-ALERT, #f87171);
	color: #fff;
}

.ark-region-chip-severity.ark-severity--med {
	background: var(--MAP-COLOR-VERIFIED, #fb923c);
	color: #fff;
}

.ark-region-chip-severity.ark-severity--low {
	background: var(--MAP-COLOR-CONNECTION-HUB, #38bdf8);
	color: #0b1016;
}

.ark-region-card-meta-line {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 10.5px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.6));
}

.ark-region-card-stream {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60%;
}

.ark-region-card-desc {
	font-size: 10.5px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.75));
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-region-card-tools {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
}

.ark-region-tool-btn {
	background: var(--MAP-BUTTON-BG, rgba(255, 255, 255, 0.06));
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.12));
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	color: var(--BUTTON-COLOR, #fff);
	font-size: 10.5px;
	font-family: inherit;
	padding: 2px 7px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ark-region-tool-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: var(--MAP-ACCENT, #3fff97);
	color: var(--MAP-ACCENT, #3fff97);
}

.ark-region-btn-open-gallery {
	color: var(--MAP-ACCENT, #3fff97);
	border-color: color-mix(in srgb, var(--MAP-ACCENT, #3fff97) 35%, transparent);
}

/* ==========================================================================
   2. INDEPENDENT FLOATING GALLERY & PHOTO VIEWER WINDOW
   ========================================================================== */

.ark-events-gallery-panel {
	width: 520px;
	max-width: 95vw;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	background: var(--MAP-TOOLS-PANEL-BG, var(--FORM-BG));
	border: 1px solid var(--FORM-BORDER-COLOR, var(--MAP-BORDER-COLOR, rgba(255, 255, 255, 0.12)));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	box-shadow: var(--FORM-BOX-SHADOW, 0 20px 48px rgba(0, 0, 0, 0.55));
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	z-index: 1010;
	font-family: var(--FONT-FAMILY, var(--APPLICATION-DEFAULT-FONT-FAMILY-REGULAR));
	overflow: hidden;
}

.ark-events-gallery-panel .ark-floating-panel-body {
	display: flex;
	flex-direction: column;
	padding: 0;
	overflow: hidden;
	flex: 1 1 auto;
	max-height: calc(88vh - 54px);
}

.ark-gallery-action-btn.is-active {
	background: var(--MAP-ACCENT, #3fff97) !important;
	color: #0b1016 !important;
}

.ark-gallery-info-bar {
	padding: 6px 12px;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: space-between;
	background: rgba(0, 0, 0, 0.2);
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	font-size: 11px;
}

.ark-gallery-info-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ark-gallery-info-badge {
	color: var(--MAP-ACCENT, #3fff97);
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.ark-gallery-counter-label {
	color: var(--FORM-LABEL-COLOR, #fff);
	font-weight: 600;
}

.ark-gallery-tip {
	font-size: 10px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.5));
}

/* Gallery Grid Mode */
.ark-gallery-grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	grid-auto-rows: max-content;
	align-content: start;
	flex: 1 1 auto;
	min-height: 0;
	gap: 10px;
	padding: 12px;
	overflow-y: auto;
}

.ark-gallery-grid-container::-webkit-scrollbar {
	width: 6px;
}

.ark-gallery-grid-container::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
}

.ark-gallery-card {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ark-gallery-card:hover {
	transform: translateY(-2px);
	border-color: var(--MAP-ACCENT, #3fff97);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.ark-gallery-card.is-active {
	border-color: var(--MAP-ACCENT, #3fff97);
	box-shadow: 0 0 0 2px var(--MAP-ACCENT, #3fff97);
}

.ark-gallery-card-thumb-wrap {
	position: relative;
	width: 100%;
	height: 125px;
	background: #000;
	overflow: hidden;
}

.ark-gallery-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.ark-gallery-card:hover .ark-gallery-card-img {
	transform: scale(1.05);
}

.ark-gallery-card-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ark-gallery-card:hover .ark-gallery-card-overlay {
	opacity: 1;
}

.ark-gallery-zoom-badge {
	background: var(--MAP-ACCENT, #3fff97);
	color: #0b1016;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.ark-gallery-card-badges {
	position: absolute;
	top: 6px;
	right: 6px;
	pointer-events: none;
}

.ark-gallery-card-meta {
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ark-gallery-card-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--FORM-LABEL-COLOR, #fff);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-gallery-card-stream {
	font-size: 10.5px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.7));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-gallery-card-time {
	font-size: 10px;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.5));
}

.ark-gallery-empty {
	grid-column: 1 / -1;
	padding: 40px 20px;
	text-align: center;
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.6));
}

.ark-gallery-empty i {
	font-size: 36px;
	margin-bottom: 12px;
	opacity: 0.6;
}

.ark-gallery-empty h4 {
	font-size: 14px;
	margin: 0 0 6px 0;
	color: #fff;
}

.ark-gallery-empty p {
	font-size: 12px;
	max-width: 320px;
	margin: 0 auto;
	line-height: 1.4;
}

/* Single Photo Inspector View */
.ark-gallery-single-container {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
}

.ark-gallery-inspector {
	display: flex;
	flex-direction: column;
	flex: 1 0 auto;
	gap: 0;
}

.ark-gallery-viewer-frame {
	position: relative;
	width: 100%;
	flex: 1 0 280px;
	min-height: 280px;
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.ark-gallery-viewer-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ark-gallery-viewer-controls {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.ark-gallery-tool-btn {
	width: 30px;
	height: 30px;
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	background: rgba(0, 0, 0, 0.7);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	text-decoration: none;
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	transition: background 0.15s, color 0.15s;
}

.ark-gallery-tool-btn:hover {
	background: var(--MAP-ACCENT, #3fff97);
	color: #0b1016;
}

.ark-gallery-nav-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: rgba(0, 0, 0, 0.3);
	border-bottom: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
}

.ark-gallery-nav-btn {
	background: var(--MAP-BUTTON-BG, rgba(255, 255, 255, 0.08));
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.15));
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	color: var(--BUTTON-COLOR, #fff);
	font-size: 11px;
	font-weight: 600;
	padding: 5px 12px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s;
}

.ark-gallery-nav-btn:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.18);
	border-color: var(--MAP-ACCENT, #3fff97);
}

.ark-gallery-nav-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ark-gallery-nav-pos {
	font-size: 12px;
	color: var(--FORM-LABEL-COLOR, #fff);
	font-family: var(--UI-DATA-FONT-FAMILY, var(--FONT-FAMILY, monospace));
}

.ark-gallery-details-card {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--DASHBOARD-SURFACE-BG, rgba(255, 255, 255, 0.02));
}

.ark-gallery-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.ark-gallery-title-group {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.ark-gallery-event-title {
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	margin: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ark-gallery-btn-back-grid {
	background: var(--MAP-BUTTON-BG, rgba(255, 255, 255, 0.06));
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.12));
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	color: var(--BUTTON-COLOR, #fff);
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.15s, border-color 0.15s;
}

.ark-gallery-btn-back-grid:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: var(--MAP-ACCENT, #3fff97);
}

.ark-gallery-meta-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 8px;
	padding: 10px;
	background: rgba(0, 0, 0, 0.15);
	border: 1px solid var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.06));
	border-radius: var(--FORM-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
}

.ark-gallery-meta-cell {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 11px;
}

.ark-gallery-meta-cell.is-fullwidth {
	grid-column: 1 / -1;
	padding-top: 6px;
	border-top: 1px dashed var(--FORM-BORDER-COLOR, rgba(255, 255, 255, 0.08));
}

.ark-gallery-meta-key {
	color: var(--MAP-TEXT-MUTED, rgba(255, 255, 255, 0.6));
	font-size: 10.5px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.ark-gallery-meta-val {
	color: var(--FORM-LABEL-COLOR, #fff);
	word-break: break-word;
}

.ark-gallery-actions-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

.ark-gallery-btn-focus-map {
	font-size: 11px !important;
	padding: 6px 12px !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.ark-gallery-btn-clip {
	font-size: 11px !important;
	padding: 6px 12px !important;
	text-decoration: none !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.ark-map-tools-view-events-btn {
	margin-top: 8px;
	width: 100%;
	padding: 6px 10px;
	font-size: 11px;
	font-weight: 600;
	font-family: inherit;
	border-radius: var(--BUTTON-BORDER-RADIUS, var(--DEFAULT-BORDER-RADIUS, 4px));
	border: 1px solid var(--MAP-ACCENT, #3fff97);
	background: var(--MAP-ACCENT, #3fff97);
	color: #0b1016;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: background 0.15s, transform 0.1s;
}

.ark-map-tools-view-events-btn:hover {
	filter: brightness(1.1);
}

/* =====================================================================
 * ArkFloatingPanel - Resizable Panel Interactions & Handle
 * ===================================================================== */
.ark-floating-panel.is-resizable {
	min-width: 320px;
	min-height: 220px;
}

.ark-floating-panel-resize-handle {
	position: absolute;
	right: 2px;
	bottom: 2px;
	width: 14px;
	height: 14px;
	cursor: nwse-resize;
	user-select: none;
	-webkit-user-select: none;
	touch-action: none;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 1px;
	opacity: 0.6;
	transition: opacity 0.15s ease, transform 0.15s ease;
	z-index: 10;
}

.ark-floating-panel-resize-handle:hover {
	opacity: 1;
	transform: scale(1.15);
}

.ark-floating-panel.is-resizing {
	user-select: none !important;
	-webkit-user-select: none !important;
	transition: none;
}

/* =====================================================================
 * ArkMapRegionEventsPanel - View Tabs Bar (Cards, Events Grid, Streams Grid)
 * ===================================================================== */
.ark-region-tabs-bar {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	background: var(--TAB-BAR-BG, rgba(0, 0, 0, 0.18));
	border-bottom: 1px solid var(--MAP-SURFACE-BORDER, rgba(255, 255, 255, 0.08));
}

.ark-region-tab-btn {
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--BUTTON-BORDER-RADIUS, 4px);
	color: var(--MAP-TEXT-MUTED, #94a3b8);
	font-size: 11px;
	font-weight: 500;
	font-family: inherit;
	padding: 3px 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: all 0.15s ease;
}

.ark-region-tab-btn:hover {
	color: var(--MAP-TEXT-MAIN, #f8fafc);
	background: var(--MAP-SURFACE-HOVER, rgba(255, 255, 255, 0.06));
}

.ark-region-tab-btn.is-active {
	color: var(--MAP-ACCENT, #3fff97);
	background: var(--MAP-SURFACE-ELEVATED, rgba(255, 255, 255, 0.1));
	border-color: var(--MAP-SURFACE-BORDER, rgba(255, 255, 255, 0.15));
	font-weight: 600;
}

/* =====================================================================
 * ArkMapRegionEventsPanel - Embedded DataGridView (STC_DataGrid Integration)
 * ===================================================================== */
.ark-region-grid-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	position: relative;
	display: flex;
	flex-direction: column;
}

.ark-region-grid-wrap .STC_DataGrid.is-embedded-grid {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	border: none;
	background: transparent;
}

.ark-region-grid-wrap .STC_DataGrid_Containner {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
}

.ark-region-grid-wrap .STC_DataGrid_Table {
	width: 100%;
	border-collapse: collapse;
	font-size: 11px;
	text-align: left;
}

.ark-region-grid-wrap .STC_DataGrid_THead_TH {
	position: sticky;
	top: 0;
	background: var(--GRID-HEADER-BG, var(--MAP-SURFACE-ELEVATED, #1e293b));
	color: var(--MAP-TEXT-MAIN, #f8fafc);
	font-weight: 600;
	padding: 6px 8px;
	border-bottom: 1px solid var(--MAP-SURFACE-BORDER, rgba(255, 255, 255, 0.12));
	white-space: nowrap;
	z-index: 2;
}

.ark-region-grid-wrap .STC_DataGrid_TR {
	border-bottom: 1px solid var(--MAP-SURFACE-BORDER, rgba(255, 255, 255, 0.05));
	cursor: pointer;
	transition: background 0.1s ease;
}

.ark-region-grid-wrap .STC_DataGrid_TR:hover {
	background: var(--MAP-SURFACE-HOVER, rgba(255, 255, 255, 0.07)) !important;
}

.ark-region-grid-wrap .STC_DataGrid_TR.is-highlighted {
	background: rgba(63, 255, 151, 0.15) !important;
	outline: 1px solid var(--MAP-ACCENT, #3fff97);
}

.ark-region-grid-wrap .STC_DataGrid_TD {
	padding: 5px 8px;
	vertical-align: middle;
	color: var(--MAP-TEXT-MAIN, #e2e8f0);
}

.ark-region-grid-wrap .STC_DataGrid.is-embedded-grid .STC_DataGrid_TR > .STC_DataGrid_TD {
	font-size: 11px;
	font-weight: normal;
}

.ark-region-grid-wrap .STC_DataGrid.is-embedded-grid .STC_DataGrid_TR > .STC_DataGrid_TD:not(:first-child) {
	padding: 5px 8px;
}

.ark-region-grid-wrap .STC_DataGrid_TD_ID {
	color: var(--MAP-TEXT-MUTED, #94a3b8);
}

.ark-region-grid-wrap .STC_DataGrid.is-embedded-grid .STC_DataGrid_TR > .STC_DataGrid_TD_ID {
	font-family: monospace;
	font-size: 10px;
}

.ark-region-grid-wrap .STC_DataGrid_TD_Photo {
	text-align: center;
}

.ark-region-grid-wrap .STC_DataGrid_TD_Actions {
	white-space: nowrap;
}

.ark-region-grid-wrap .STC_DataGrid_FooterCount {
	padding: 6px 12px;
	font-size: 11px;
	color: var(--MAP-TEXT-MUTED, #94a3b8);
	background: var(--TAB-BAR-BG, rgba(0, 0, 0, 0.15));
	border-top: 1px solid var(--MAP-SURFACE-BORDER, rgba(255, 255, 255, 0.08));
	flex-shrink: 0;
}
