/* DH Workspace — Centres map (php/map, centres.php, js/centres_map.js). Classes are prefixed dhm-. */

:root {
	--dhm-brand: #9cb81f;
	--dhm-brand-dark: #6c8211;
	--dhm-brand-soft: rgba(156, 184, 31, .14);
	--dhm-ink: #23272b;
	--dhm-muted: #5f6368;
	--dhm-border: #e3e6ea;
	--dhm-soft: #f4f6f1;
	--dhm-surface: #ffffff;
	--dhm-radius: 14px;
	--dhm-shadow: 0 1px 2px rgba(60, 64, 67, .15), 0 1px 3px 1px rgba(60, 64, 67, .08);
	--dhm-shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .3), 0 4px 12px rgba(16, 24, 40, .1);
	--dhm-live: #2e7d32;
}

/* ------------------------------------------------------------------ layout */

.dhm-scope {
	padding: 12px 8px 20px;
}

.dhm-app {
	position: relative;
	display: flex;
	height: calc(100vh - 150px);
	min-height: 560px;
	background: var(--dhm-surface);
	border-radius: var(--dhm-radius);
	box-shadow: var(--dhm-shadow);
	overflow: hidden;
	color: var(--dhm-ink);
	font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dhm-app:fullscreen,
.dhm-app.is-pseudo-full {
	height: 100vh !important;
	border-radius: 0;
}

.dhm-app.is-pseudo-full {
	position: fixed;
	inset: 0;
	z-index: 2000;
}

.dhm-panel {
	width: 340px;
	flex: 0 0 340px;
	display: flex;
	flex-direction: column;
	border-right: 1px solid var(--dhm-border);
	background: var(--dhm-surface);
	min-height: 0;
	z-index: 2;
}

.dhm-map-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.dhm-map {
	position: absolute;
	inset: 0;
	background: #e8ecef;
}

/* ------------------------------------------------------------------ panel */

.dhm-panel-head {
	padding: 14px 16px 10px;
	background: linear-gradient(180deg, var(--dhm-brand-soft), rgba(255, 255, 255, 0));
	border-bottom: 1px solid #f0f1ee;
}

.dhm-title-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.dhm-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.25;
	flex: 1;
	min-width: 0;
}

.dhm-live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	font-size: .75rem;
	font-weight: 700;
	color: var(--dhm-live);
	background: #e8f5e9;
	border-radius: 12px;
	padding: 2px 9px;
}

.dhm-live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #43a047;
	display: inline-block;
	animation: dhmBlink 2s ease-in-out infinite;
}

.is-refreshing .dhm-live .dhm-live-dot {
	animation-duration: .5s;
}

@keyframes dhmBlink {
	0%, 100% { box-shadow: 0 0 0 0 rgba(67, 160, 71, .55); }
	50% { box-shadow: 0 0 0 5px rgba(67, 160, 71, 0); }
}

.dhm-admin-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.dhm-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	border: 1px solid #d7dbd2;
	background: #fff;
	color: var(--dhm-ink);
	border-radius: 18px;
	padding: 5px 12px;
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .12s ease, border-color .12s ease;
	white-space: nowrap;
}

.dhm-btn:hover {
	background: var(--dhm-soft);
	color: var(--dhm-ink);
}

.dhm-btn i {
	color: var(--dhm-brand-dark);
}

.dhm-btn-primary,
.dhm-btn-primary:hover {
	background: var(--dhm-brand-dark);
	border-color: var(--dhm-brand-dark);
	color: #fff;
}

.dhm-btn-primary i {
	color: #fff;
}

.dhm-btn-primary:hover {
	filter: brightness(1.06);
}

.dhm-btn:disabled {
	opacity: .6;
	cursor: default;
}

.dhm-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.dhm-stat {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fff;
	border: 1px solid var(--dhm-border);
	border-radius: 10px;
	padding: 2px 9px;
	font-size: .76rem;
	color: var(--dhm-muted);
}

.dhm-stat b {
	color: var(--dhm-ink);
	font-size: .88rem;
}

.dhm-stat.is-live {
	border-color: #a5d6a7;
	background: #f1f8f1;
}

.dhm-stat.is-today {
	border-color: #ffcdd2;
	background: #fff5f5;
}

.dhm-search {
	position: relative;
	margin: 10px 16px 4px;
}

.dhm-search i {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--dhm-muted);
	font-size: .85rem;
}

.dhm-search input {
	width: 100%;
	border: 1px solid transparent;
	background: #f1f3f4;
	border-radius: 20px;
	padding: 8px 14px 8px 34px;
	font-size: .9rem;
	outline: none;
	transition: all .12s ease;
}

.dhm-search input:focus {
	background: #fff;
	border-color: var(--dhm-brand);
	box-shadow: 0 0 0 3px var(--dhm-brand-soft);
}

.dhm-filters {
	padding: 6px 16px 8px;
	border-bottom: 1px solid #f0f1ee;
}

.dhm-seg {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 6px;
}

.dhm-seg:empty {
	display: none;
}

.dhm-seg-btn,
.dhm-chip {
	border: 1px solid var(--dhm-border);
	background: #fff;
	color: var(--dhm-ink);
	border-radius: 14px;
	padding: 2px 10px;
	font-size: .76rem;
	line-height: 1.6;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.dhm-seg-btn small,
.dhm-chip small {
	color: var(--dhm-muted);
	font-weight: 600;
}

.dhm-seg-btn.active,
.dhm-chip.active {
	background: var(--dhm-brand-soft);
	border-color: var(--dhm-brand);
	color: #43520a;
	font-weight: 700;
}

.dhm-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.dhm-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--c, #546e7a);
	display: inline-block;
	flex-shrink: 0;
}

.dhm-check {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: .78rem;
	color: var(--dhm-muted);
	margin: 6px 0 0;
	font-weight: 500;
	cursor: pointer;
}

.dhm-near {
	margin: 8px 12px 4px;
	padding: 8px 10px;
	border-radius: 12px;
	background: #eef5ff;
	border: 1px solid #d2e3fc;
}

.dhm-near-head {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: .76rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #174ea6;
	margin-bottom: 4px;
}

.dhm-near-head .dhm-link-btn {
	margin-left: auto;
}

.dhm-near-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 3px 0;
	font-size: .85rem;
}

.dhm-near-name {
	flex: 1;
	min-width: 0;
	border: 0;
	background: none;
	padding: 0;
	text-align: left;
	font-weight: 600;
	color: var(--dhm-ink);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	cursor: pointer;
}

.dhm-near-km {
	font-weight: 700;
	color: #174ea6;
	font-size: .8rem;
}

.dhm-link-btn {
	border: 0;
	background: none;
	color: #1a73e8;
	font-size: .78rem;
	font-weight: 600;
	padding: 2px 4px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
}

.dhm-link-btn:hover {
	text-decoration: underline !important;
}

.dhm-list {
	flex: 1;
	overflow-y: auto;
	padding: 4px 8px 12px;
	scrollbar-width: thin;
}

.dhm-group-title {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 7px;
	background: rgba(255, 255, 255, .96);
	padding: 8px 8px 4px;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--dhm-muted);
}

.dhm-group-title small {
	margin-left: auto;
	font-weight: 700;
}

.dhm-item {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 0;
	background: none;
	text-align: left;
	padding: 8px;
	border-radius: 10px;
	cursor: pointer;
	color: var(--dhm-ink);
	transition: background .12s ease;
}

.dhm-item:hover,
.dhm-item:focus-visible {
	background: var(--dhm-soft);
	outline: none;
}

.dhm-item.is-selected {
	background: var(--dhm-brand-soft);
	box-shadow: inset 3px 0 0 var(--dhm-brand-dark);
}

.dhm-item.is-unplaced {
	cursor: default;
	opacity: .9;
}

.dhm-item-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--c, #546e7a);
	flex-shrink: 0;
	box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(0, 0, 0, .08);
}

.dhm-item-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}

.dhm-item-name {
	font-weight: 700;
	font-size: .9rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
}

.dhm-item-sub {
	font-size: .76rem;
	color: var(--dhm-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dhm-item-lead {
	font-size: .76rem;
	color: #43520a;
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dhm-item-lead i {
	margin-right: 4px;
	color: var(--dhm-brand-dark);
}

.dhm-item-lead.is-empty {
	color: var(--dh-muted);
	font-style: italic;
}

.dhm-item-meta {
	text-align: center;
	line-height: 1.05;
	flex-shrink: 0;
	min-width: 46px;
}

.dhm-item-meta b {
	display: block;
	font-size: .95rem;
}

.dhm-item-meta small {
	font-size: .75rem;
	color: var(--dhm-muted);
	text-transform: uppercase;
	letter-spacing: .03em;
}

.dhm-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 10px;
	padding: 0 7px;
	font-size: .75rem;
	font-weight: 700;
	line-height: 1.7;
	background: #eceff1;
	color: #455a64;
	white-space: nowrap;
}

.dhm-badge.is-live {
	background: #e8f5e9;
	color: var(--dhm-live);
}

.dhm-badge.is-today {
	background: #ffebee;
	color: #c62828;
}

.dhm-badge.is-approx {
	background: #fff8e1;
	color: #8d6e00;
}

.dhm-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 30px 10px;
	color: var(--dhm-muted);
	font-size: .88rem;
}

.dhm-empty i {
	font-size: 1.6rem;
	color: #b0bec5;
}

.dhm-panel-foot {
	border-top: 1px solid #f0f1ee;
	padding: 8px 16px;
	font-size: .76rem;
	color: var(--dhm-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
}

.dhm-panel-foot:empty {
	display: none;
}

.dhm-panel-foot a {
	color: #1a73e8;
	font-weight: 600;
}

.dhm-visibility i {
	margin-right: 5px;
}

.dhm-visibility.is-private i {
	color: #c62828;
}

.dhm-visibility.is-public i,
.dhm-visibility.is-both i {
	color: var(--dhm-live);
}

/* ------------------------------------------------------------------ markers */

.dhm-marker {
	background: none;
	border: 0;
}

.dhm-pin {
	position: absolute;
	left: 1px;
	top: 1px;
	width: 34px;
	height: 34px;
	border-radius: 50% 50% 50% 0;
	background: var(--c, #2e7d32);
	transform: rotate(-45deg);
	border: 2.5px solid #fff;
	box-shadow: -1px 3px 8px rgba(0, 0, 0, .35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}

.dhm-pin span {
	transform: rotate(45deg);
	color: #fff;
	font: 800 11px/1 "Source Sans Pro", sans-serif;
	letter-spacing: .02em;
}

.dhm-marker:hover .dhm-pin,
.dhm-pin.is-selected {
	transform: rotate(-45deg) scale(1.16);
}

.dhm-pin.is-selected {
	box-shadow: -1px 3px 10px rgba(0, 0, 0, .45), 0 0 0 4px rgba(255, 255, 255, .7);
}

.dhm-pin.is-approx {
	border-style: dashed;
}

.dhm-pin.is-inactive span {
	opacity: .8;
}

.dhm-pin.is-dragging {
	cursor: grab;
	box-shadow: -2px 8px 16px rgba(0, 0, 0, .45), 0 0 0 4px rgba(255, 255, 255, .8);
}

.dhm-pin.is-live::after {
	content: "";
	position: absolute;
	inset: -7px;
	border-radius: 50% 50% 50% 0;
	border: 3px solid var(--c, #2e7d32);
	animation: dhmPulse 1.6s ease-out infinite;
}

@keyframes dhmPulse {
	0% { opacity: .9; transform: scale(.85); }
	100% { opacity: 0; transform: scale(1.6); }
}

.dhm-pin-badge {
	position: absolute;
	top: -5px;
	right: -7px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: #e53935;
	color: #fff;
	font: 700 10px/13px "Source Sans Pro", sans-serif;
	text-align: center;
	border: 2px solid #fff;
	z-index: 2;
}

.dhm-cluster-wrap {
	background: none;
	border: 0;
}

.dhm-cluster {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(156, 184, 31, .28);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .12s ease;
}

.dhm-cluster:hover {
	transform: scale(1.08);
}

.dhm-cluster span {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--dhm-brand-dark);
	color: #fff;
	font: 700 14px/34px "Source Sans Pro", sans-serif;
	text-align: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
	border: 2px solid #fff;
}

.dhm-cluster.is-live {
	animation: dhmClusterPulse 1.8s ease-out infinite;
}

@keyframes dhmClusterPulse {
	0% { box-shadow: 0 0 0 0 rgba(67, 160, 71, .55); }
	100% { box-shadow: 0 0 0 14px rgba(67, 160, 71, 0); }
}

.dhm-approx-ring {
	stroke: #78909c;
	stroke-width: 2;
	stroke-dasharray: 6 6;
	stroke-opacity: .7;
	fill: #78909c;
	fill-opacity: .07;
}

.dhm-hide-rings .dhm-approx-ring {
	display: none;
}

.dhm-user-wrap {
	background: none;
	border: 0;
}

.dhm-user {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1a73e8;
	border: 3px solid #fff;
	box-shadow: 0 0 0 2px rgba(26, 115, 232, .35), 0 2px 6px rgba(0, 0, 0, .3);
}

.dhm-user-accuracy {
	fill: #1a73e8;
	fill-opacity: .1;
	stroke: #1a73e8;
	stroke-opacity: .35;
	stroke-width: 1;
}

.leaflet-container.is-picking,
.leaflet-container.is-picking .leaflet-interactive {
	cursor: crosshair !important;
}

/* ------------------------------------------------------------------ Leaflet chrome */

.dhm-map.leaflet-container {
	font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dhm-tools a {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 34px !important;
	height: 34px !important;
	line-height: 34px !important;
	color: #3c4043 !important;
	font-size: 14px;
}

.dhm-tools a:hover {
	background: #f4f4f4;
}

.is-locating .js-dhm-locate i {
	animation: dhmSpin 1s linear infinite;
	color: #1a73e8;
}

@keyframes dhmSpin {
	to { transform: rotate(360deg); }
}

.dhm-tip.leaflet-tooltip {
	background: var(--dhm-ink);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 5px 10px;
	font-size: .8rem;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
	white-space: nowrap;
}

.leaflet-tooltip-top.dhm-tip::before {
	border-top-color: var(--dhm-ink);
}

.dhm-popup .leaflet-popup-content-wrapper {
	border-radius: 16px;
	padding: 0;
	overflow: hidden;
	box-shadow: var(--dhm-shadow-lg);
}

.dhm-popup .leaflet-popup-content {
	margin: 0;
	font-size: .86rem;
	line-height: 1.4;
	max-height: min(660px, calc(100vh - 130px));
	overflow-y: auto;
}

.dhm-popup .leaflet-popup-content p {
	margin: 0;
}

.dhm-popup .leaflet-popup-tip {
	box-shadow: none;
}

.dhm-popup a.leaflet-popup-close-button {
	top: 10px;
	right: 10px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font: 18px/24px Tahoma, Verdana, sans-serif;
	color: #5f6368;
	background: rgba(255, 255, 255, .85);
	z-index: 3;
}

.dhm-popup a.leaflet-popup-close-button:hover {
	background: #f1f3f4;
	color: #202124;
}

/* ------------------------------------------------------------------ popup card */

.dhm-pop-head {
	padding: 14px 42px 14px 20px;
	border-top: 6px solid var(--c, #2e7d32);
	background: linear-gradient(180deg, color-mix(in srgb, var(--c, #2e7d32) 12%, #fff), #fff);
}

.dhm-pop-country {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 24px;
	font-size: .76rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--c, #2e7d32);
	text-align: center;
}

.dhm-pop-region {
	margin: -1px 0 10px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-align: center;
	color: var(--dhm-muted);
}

.dhm-pop-identity {
	display: flex;
	align-items: center;
	gap: 14px;
}

.dhm-pop-heading {
	flex: 1;
	min-width: 0;
}

.dhm-pop-title {
	font-size: 1.32rem;
	font-weight: 700;
	margin: 0 0 3px;
	color: var(--dhm-ink);
	line-height: 1.25;
}

.dhm-pop-where {
	font-size: .8rem;
	color: var(--dhm-muted);
}

.dhm-pop-where i {
	margin-right: 5px;
	color: var(--c, #2e7d32);
}

.dhm-pop-primary-leader {
	margin-top: 5px;
	font-size: .76rem;
	font-weight: 700;
	color: var(--dhm-ink);
}

.dhm-pop-primary-leader span {
	font-weight: 500;
	color: var(--dhm-muted);
}

.dhm-pop-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 7px;
}

.dhm-pop-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
	border-top: 1px solid #f0f1ee;
	border-bottom: 1px solid #f0f1ee;
}

.dhm-pop-stats div {
	text-align: center;
	padding: 8px 4px;
	line-height: 1.1;
}

.dhm-pop-stats div + div {
	border-left: 1px solid #f0f1ee;
}

.dhm-pop-stats b {
	display: block;
	font-size: 1.1rem;
	color: var(--dhm-ink);
}

.dhm-pop-stats b i {
	margin-right: 5px;
	font-size: .9rem;
	color: var(--c, #2e7d32);
}

.dhm-pop-stats .is-male b i {
	color: #2878b5;
}

.dhm-pop-stats .is-female b i {
	color: #c13f72;
}

.dhm-pop-stats .is-unrecorded b i {
	color: #7b8087;
}

.dhm-pop-stats small {
	font-size: .75rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--dhm-muted);
}

.dhm-pop-section {
	padding: 10px 16px 0;
}

.dhm-pop-label {
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--dhm-muted);
	margin-bottom: 5px;
}

.dhm-leaders,
.dhm-events {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dhm-leaders li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 3px 0;
}

.dhm-avatar {
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: 50%;
	background: #9cb81f center / cover no-repeat;
	color: #fff;
	font-size: .76rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, .2);
}

.dhm-avatar.is-sm {
	width: 24px;
	height: 24px;
	flex-basis: 24px;
	font-size: .62rem;
}

.dhm-avatar.is-hero,
.dhm-centre-symbol {
	width: 76px;
	height: 76px;
	flex: 0 0 76px;
	border-radius: 20px;
	font-size: 1.15rem;
	box-shadow: 0 0 0 3px #fff, 0 7px 18px rgba(32, 33, 36, .2);
}

.dhm-centre-symbol {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--c, #2e7d32) 16%, #fff);
	color: var(--c, #2e7d32);
}

.dhm-leader-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.dhm-leader-text b {
	font-size: .9rem;
}

.dhm-leader-text small {
	color: var(--dhm-muted);
	font-size: .76rem;
}

.dhm-leader-contacts {
	display: inline-flex;
	gap: 4px;
}

.dhm-leader-contacts a {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--dhm-soft);
	color: var(--dhm-brand-dark);
}

.dhm-leader-contacts a:hover {
	background: var(--dhm-brand-soft);
}

.dhm-events li {
	display: flex;
	gap: 10px;
	padding: 4px 0 4px 8px;
	border-left: 3px solid var(--e, #9cb81f);
	margin-bottom: 4px;
}

.dhm-event-when {
	flex: 0 0 92px;
	font-weight: 700;
	font-size: .78rem;
	color: var(--dhm-ink);
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.dhm-event-title {
	font-size: .84rem;
	line-height: 1.25;
	min-width: 0;
}

.dhm-event-title small {
	display: block;
	color: var(--dhm-muted);
	font-size: .75rem;
}

.dhm-event-title i {
	font-size: .66rem;
	color: var(--dhm-muted);
}

.dhm-pop-line {
	display: flex;
	gap: 8px;
	font-size: .84rem;
	margin-bottom: 4px;
}

.dhm-pop-line i {
	color: var(--dhm-brand-dark);
	margin-top: 3px;
}

.dhm-pop-desc {
	font-size: .84rem;
	color: #3c4043;
	background: var(--dhm-soft);
	border-radius: 10px;
	padding: 8px 10px;
	max-height: 7.5em;
	overflow-y: auto;
}

.dhm-pop-contacts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	padding: 10px 16px 0;
	font-size: .82rem;
}

.dhm-pop-contacts a {
	color: #1a73e8;
	font-weight: 600;
}

.dhm-pop-contacts i {
	margin-right: 5px;
}

.dhm-pop-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 16px 14px;
}

.dhm-pop-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--dhm-border);
	background: #fff;
	color: var(--dhm-ink) !important;
	border-radius: 16px;
	padding: 4px 11px;
	font-size: .78rem;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
}

.dhm-pop-btn:hover {
	background: var(--dhm-soft);
}

.dhm-pop-btn.is-primary {
	background: var(--dhm-brand-dark);
	border-color: var(--dhm-brand-dark);
	color: #fff !important;
}

.dhm-pop-btn.is-primary:hover {
	filter: brightness(1.07);
}

.dhm-muted {
	color: var(--dhm-muted);
	font-size: .84rem;
}

/* ------------------------------------------------------------------ banner, toast, mobile toggle */

.dhm-banner {
	position: absolute;
	top: 12px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100% - 140px);
	background: var(--dhm-ink);
	color: #fff;
	border-radius: 12px;
	padding: 8px 8px 8px 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
	font-size: .86rem;
}

.dhm-banner[hidden] {
	display: none;
}

.dhm-banner > i {
	color: #c5e1a5;
}

.dhm-banner .dhm-btn {
	padding: 4px 11px;
}

.dhm-toast {
	position: absolute;
	left: 50%;
	bottom: 24px;
	transform: translate(-50%, 16px);
	opacity: 0;
	pointer-events: none;
	z-index: 1100;
	max-width: calc(100% - 32px);
	background: var(--dhm-ink);
	color: #fff;
	border-radius: 10px;
	padding: 9px 14px;
	font-size: .86rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
	transition: all .2s ease;
}

.dhm-toast.is-open {
	opacity: 1;
	transform: translate(-50%, 0);
}

.dhm-list-toggle {
	display: none;
}

/* ------------------------------------------------------------------ modals (dashboard) */

.dhm-modal .modal-content {
	border: 0;
	border-radius: 16px;
	box-shadow: var(--dhm-shadow-lg);
}

.dhm-modal .modal-header,
.dhm-modal .modal-footer {
	border-color: #f1f3f4;
}

.dhm-label {
	font-size: .76rem;
	font-weight: 700;
	color: var(--dhm-muted);
	margin-bottom: 4px;
	display: block;
}

.dhm-mono {
	font-family: SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: .8rem;
}

.dhm-note {
	font-size: .78rem;
	color: var(--dhm-muted);
}

.dhm-note.is-ok {
	color: #2e7d32;
}

.dhm-note.is-bad {
	color: #c62828;
}

.dhm-form-msg:not(:empty) {
	margin-top: 10px;
	padding: 8px 12px;
	border-radius: 8px;
	background: #fce8e6;
	color: #a50e0e;
	font-size: .85rem;
}

.dhm-vis {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin-bottom: 14px;
}

.dhm-vis-card {
	margin: 0;
	cursor: pointer;
}

.dhm-vis-card input {
	position: absolute;
	opacity: 0;
}

.dhm-vis-card span {
	display: flex;
	flex-direction: column;
	gap: 3px;
	height: 100%;
	border: 1px solid var(--dhm-border);
	border-radius: 12px;
	padding: 10px 12px;
	font-weight: 400;
	transition: all .12s ease;
}

.dhm-vis-card span i {
	font-size: 1.15rem;
	color: var(--dhm-muted);
}

.dhm-vis-card span b {
	font-size: .95rem;
}

.dhm-vis-card span small {
	font-size: .76rem;
	color: var(--dhm-muted);
	line-height: 1.3;
}

.dhm-vis-card input:checked + span {
	border-color: var(--dhm-brand-dark);
	background: var(--dhm-brand-soft);
	box-shadow: 0 0 0 1px var(--dhm-brand-dark) inset;
}

.dhm-vis-card input:checked + span i {
	color: var(--dhm-brand-dark);
}

.dhm-vis-card input:focus-visible + span {
	outline: 2px solid var(--dhm-brand-dark);
	outline-offset: 2px;
}

.dhm-fieldset,
.dhm-share {
	border: 1px solid var(--dhm-border);
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 14px;
	transition: opacity .12s ease;
}

.dhm-fieldset.is-disabled,
.dhm-share.is-disabled {
	opacity: .5;
}

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

.dhm-fieldset .form-check-label,
.dhm-modal .form-check .form-check-label {
	font-weight: 500;
	font-size: .86rem;
}

.dhm-section {
	padding: 10px 0 6px;
}

.dhm-section + .dhm-section {
	border-top: 1px solid #f1f3f4;
}

.dhm-section-head {
	font-weight: 700;
	font-size: .9rem;
	margin-bottom: 8px;
}

.dhm-section-head i {
	color: var(--dhm-brand-dark);
	margin-right: 8px;
}

.dhm-leaders-edit {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
}

.dhm-leaders-edit li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 4px;
	border-radius: 10px;
}

.dhm-leaders-edit li:hover {
	background: #f8f9fa;
}

.dhm-leaders-edit input {
	width: 170px;
	flex-shrink: 0;
}

.dhm-icon-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 0;
	background: transparent;
	color: var(--dhm-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.dhm-icon-btn:hover:not(:disabled) {
	background: #f1f3f4;
	color: var(--dhm-ink);
}

.dhm-icon-btn:disabled {
	opacity: .35;
}

.dhm-s2 {
	display: flex;
	align-items: center;
	gap: 8px;
}

.dhm-s2 small {
	display: block;
	font-size: .75rem;
	color: var(--dhm-muted);
	line-height: 1.1;
}

/* ------------------------------------------------------------------ public page */

.dhm-page {
	margin: 0;
	height: 100vh;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #eef1ea;
	font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--dhm-ink);
}

.dhm-page *,
.dhm-page *::before,
.dhm-page *::after {
	box-sizing: border-box;
}

.dhm-header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 10px 20px;
	background: #fff;
	border-bottom: 1px solid var(--dhm-border);
	flex-shrink: 0;
}

.dhm-logo img {
	height: 38px;
	display: block;
}

.dhm-header-text {
	flex: 1;
	min-width: 0;
}

.dhm-header-text h1 {
	font-size: 1.2rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
}

.dhm-header-text p {
	margin: 2px 0 0;
	font-size: .86rem;
	color: var(--dhm-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dhm-header-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.dhm-page-main {
	flex: 1;
	min-height: 0;
	padding: 12px;
}

.dhm-page .dhm-app {
	height: 100%;
	min-height: 0;
}

.dhm-page.is-embed .dhm-page-main {
	padding: 0;
}

.dhm-page.is-embed .dhm-app {
	border-radius: 0;
	box-shadow: none;
}

.dhm-page .dhm-panel-head .dhm-title-row .dhm-title {
	font-size: 1rem;
}

.dhm-page:not(.is-embed) .dhm-panel-head .dhm-title {
	display: none;
}

.dhm-page:not(.is-embed) .dhm-title-row {
	justify-content: flex-end;
}

.dhm-page-locked {
	align-items: center;
	justify-content: center;
}

.dhm-locked {
	background: #fff;
	border-radius: 18px;
	box-shadow: var(--dhm-shadow-lg);
	padding: 32px 30px 28px;
	max-width: 420px;
	margin: 20px;
	text-align: center;
}

.dhm-locked-logo {
	height: 40px;
	margin-bottom: 18px;
}

.dhm-locked-icon {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: var(--dhm-brand-soft);
	color: var(--dhm-brand-dark);
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 12px;
}

.dhm-locked h1 {
	font-size: 1.3rem;
	margin: 0 0 6px;
}

.dhm-locked p {
	color: var(--dhm-muted);
	margin: 0 0 18px;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 991.98px) {
	.dhm-app {
		height: calc(100vh - 120px);
	}

	.dhm-panel {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		height: 66%;
		border-right: 0;
		border-radius: 18px 18px 0 0;
		box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
		transform: translateY(105%);
		transition: transform .25s ease;
		z-index: 1001;
	}

	.dhm-app.is-sheet-open .dhm-panel {
		transform: none;
	}

	.dhm-list-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		position: absolute;
		left: 50%;
		bottom: 22px;
		transform: translateX(-50%);
		z-index: 1000;
		border: 0;
		border-radius: 22px;
		padding: 10px 18px;
		background: var(--dhm-ink);
		color: #fff;
		font-weight: 700;
		font-size: .9rem;
		box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
	}

	.dhm-app.is-sheet-open .dhm-list-toggle {
		display: none;
	}

	.dhm-banner {
		max-width: calc(100% - 24px);
		top: auto;
		bottom: 80px;
		flex-wrap: wrap;
	}

	.dhm-vis {
		grid-template-columns: 1fr;
	}

	.dhm-field-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 575.98px) {
	.dhm-popup .leaflet-popup-content {
		max-height: calc(100vh - 110px);
	}

	.dhm-pop-head {
		padding: 12px 38px 12px 14px;
	}

	.dhm-pop-identity {
		gap: 10px;
	}

	.dhm-avatar.is-hero,
	.dhm-centre-symbol {
		width: 62px;
		height: 62px;
		flex-basis: 62px;
		border-radius: 16px;
	}

	.dhm-pop-title {
		font-size: 1.12rem;
	}

	.dhm-pop-stats {
		grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
	}

	.dhm-header {
		padding: 8px 12px;
		gap: 10px;
	}

	.dhm-logo img {
		height: 30px;
	}

	.dhm-header-text h1 {
		font-size: 1rem;
	}

	.dhm-header-text p {
		display: none;
	}

	.dhm-header-actions .dhm-btn span {
		display: none;
	}

	.dhm-page-main {
		padding: 0;
	}

	.dhm-page .dhm-app {
		border-radius: 0;
	}

	.dhm-scope {
		padding: 6px 0 12px;
	}

	.dhm-leaders-edit input {
		width: 120px;
	}
}

/* ===== Dark layer (2026-10-31): the light-only design above, in the dark colour mode. Started from a generated
   map (light surfaces -> --dh-surface-*, dark text -> --dh-ink / --dh-muted, light borders -> --dh-line, tinted panels
   and brand text mixed for dark) and checked by eye; edit by hand from here on. Scope: #centres_map_module (Centers Map). ===== */
[data-bs-theme=dark] { --dhm-ink: var(--dh-ink); --dhm-muted: var(--dh-muted); --dhm-border: var(--dh-line); --dhm-soft: var(--dh-surface-sunken); --dhm-surface: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-map { background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-panel-head { border-bottom-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-live { background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-btn { border-color: var(--dh-line); background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-stat { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-stat.is-live { border-color: var(--dh-line); background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-stat.is-today { border-color: var(--dh-line); background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-search input { background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-search input:focus { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-filters { border-bottom-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-seg-btn,
[data-bs-theme=dark] .dhm-chip { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-seg-btn.active,
[data-bs-theme=dark] .dhm-chip.active { color: color-mix(in srgb, #43520a 45%, #ffffff); }
[data-bs-theme=dark] .dhm-near { background-color: color-mix(in srgb, #eef5ff 16%, var(--dh-surface-raised)); border-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-near-head { color: color-mix(in srgb, #174ea6 45%, #ffffff); }
[data-bs-theme=dark] .dhm-near-km { color: color-mix(in srgb, #174ea6 45%, #ffffff); }
[data-bs-theme=dark] .dhm-link-btn { color: color-mix(in srgb, #1a73e8 45%, #ffffff); }
[data-bs-theme=dark] .dhm-group-title { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-item-lead { color: color-mix(in srgb, #43520a 45%, #ffffff); }
[data-bs-theme=dark] .dhm-badge { background-color: var(--dh-surface-sunken); color: color-mix(in srgb, #455a64 45%, #ffffff); }
[data-bs-theme=dark] .dhm-badge.is-live { background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-badge.is-today { background-color: color-mix(in srgb, #ffebee 16%, var(--dh-surface-raised)); color: color-mix(in srgb, #c62828 45%, #ffffff); }
[data-bs-theme=dark] .dhm-badge.is-approx { background-color: color-mix(in srgb, #fff8e1 16%, var(--dh-surface-raised)); color: color-mix(in srgb, #8d6e00 45%, #ffffff); }
[data-bs-theme=dark] .dhm-panel-foot { border-top-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-panel-foot a { color: color-mix(in srgb, #1a73e8 45%, #ffffff); }
[data-bs-theme=dark] .dhm-visibility.is-private i { color: color-mix(in srgb, #c62828 45%, #ffffff); }
[data-bs-theme=dark] .dhm-cluster span { box-shadow: var(--dh-shadow-1); border-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-user { border-color: var(--dh-line); }
[data-bs-theme=dark] .is-locating .js-dhm-locate i { color: color-mix(in srgb, #1a73e8 45%, #ffffff); }
[data-bs-theme=dark] .dhm-pop-stats { border-top-color: var(--dh-line); border-bottom-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-pop-stats div + div { border-left-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-pop-stats .is-male b i { color: color-mix(in srgb, #2878b5 45%, #ffffff); }
[data-bs-theme=dark] .dhm-pop-stats .is-female b i { color: color-mix(in srgb, #c13f72 45%, #ffffff); }
[data-bs-theme=dark] .dhm-pop-stats .is-unrecorded b i { color: var(--dh-muted); }
[data-bs-theme=dark] .dhm-pop-desc { color: var(--dh-ink); }
[data-bs-theme=dark] .dhm-pop-contacts a { color: color-mix(in srgb, #1a73e8 45%, #ffffff); }
[data-bs-theme=dark] .dhm-pop-btn { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-banner { box-shadow: var(--dh-shadow-1); }
[data-bs-theme=dark] .dhm-toast { box-shadow: var(--dh-shadow-1); }
[data-bs-theme=dark] .dhm-modal .modal-header,
[data-bs-theme=dark] .dhm-modal .modal-footer { border-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-note.is-ok { color: color-mix(in srgb, #2e7d32 45%, #ffffff); }
[data-bs-theme=dark] .dhm-note.is-bad { color: color-mix(in srgb, #c62828 45%, #ffffff); }
[data-bs-theme=dark] .dhm-form-msg:not(:empty) { background-color: color-mix(in srgb, #fce8e6 16%, var(--dh-surface-raised)); color: color-mix(in srgb, #a50e0e 45%, #ffffff); }
[data-bs-theme=dark] .dhm-section + .dhm-section { border-top-color: var(--dh-line); }
[data-bs-theme=dark] .dhm-leaders-edit li:hover { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-icon-btn:hover:not(:disabled) { background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-page { background-color: var(--dh-surface-sunken); }
[data-bs-theme=dark] .dhm-header { background-color: var(--dh-surface-raised); }
[data-bs-theme=dark] .dhm-locked { background-color: var(--dh-surface-raised); }
@media (max-width: 991.98px) {
	[data-bs-theme=dark] .dhm-panel { box-shadow: var(--dh-shadow-1); }
	[data-bs-theme=dark] .dhm-list-toggle { box-shadow: var(--dh-shadow-1); }
}
/* Map controls float on the (light) map tiles, so they keep their light look in dark mode. */
