.phcd-dashboard {
	display: flex;
	height: 640px;
	background: #0a0f0d;
	color: #e8ede9;
	font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
	border: 1px solid #1e2b25;
	border-radius: 8px;
	overflow: hidden;
	box-sizing: border-box;
}
.phcd-dashboard * { box-sizing: border-box; }

.phcd-sidebar {
	width: 220px;
	flex: 0 0 auto;
	background: #0f1613;
	border-right: 1px solid #1e2b25;
	padding: 16px;
	overflow-y: auto;
}
.phcd-section-title {
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #8a978f;
	margin-bottom: 10px;
}
.phcd-label {
	display: block;
	font-size: 11px;
	color: #8a978f;
	margin-bottom: 4px;
}
.phcd-sidebar select {
	width: 100%;
	background: #0a100d;
	border: 1px solid #1e2b25;
	color: #e8ede9;
	padding: 8px;
	border-radius: 6px;
	margin-bottom: 14px;
	font-size: 13px;
}

.phcd-map-wrap { flex: 1 1 auto; position: relative; min-width: 0; }
.phcd-map { height: 100%; width: 100%; background: #0a0f0d; }

.phcd-overview {
	width: 260px;
	flex: 0 0 auto;
	background: #0f1613;
	border-left: 1px solid #1e2b25;
	padding: 16px;
	overflow-y: auto;
}
.phcd-overview h2 {
	font-size: 13px;
	letter-spacing: 1.5px;
	color: #8a978f;
	margin: 0 0 14px;
}
.phcd-card {
	background: #0a100d;
	border: 1px solid #1e2b25;
	border-radius: 8px;
	padding: 16px;
	text-align: center;
	margin-bottom: 12px;
}
.phcd-num { color: #2ee6a0; font-size: 26px; font-weight: 700; line-height: 1.1; }
.phcd-cap { font-size: 12px; margin-top: 6px; color: #e8ede9; }

.phcd-cluster-marker {
	border: 2px solid #0a2a1c;
	border-radius: 50%;
	color: #06120c;
	font-weight: 700;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 0 0 4px rgba(22, 168, 112, 0.15);
}

/* Single-facility pin, shown once a cluster is zoomed in far enough that
   only one PHC remains at that spot (classic map-pin/teardrop shape). */
.phcd-pin {
	width: 26px;
	height: 26px;
	border: 2px solid #0a2a1c;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
	cursor: pointer;
}
.phcd-pin-dot {
	width: 8px;
	height: 8px;
	background: #06120c;
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(45deg);
}

/* ---- Search ------------------------------------------------------------ */
.phcd-search {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 900;
	width: 260px;
	max-width: calc(100% - 28px);
}
.phcd-search-box {
	display: flex;
	align-items: center;
	background: #0f1613;
	border: 1px solid #1e2b25;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.phcd-search-input {
	flex: 1 1 auto;
	background: transparent;
	border: none;
	outline: none;
	color: #e8ede9;
	padding: 9px 10px;
	font-size: 13px;
}
.phcd-search-btn {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #16a870;
	border: none;
	color: #06120c;
	cursor: pointer;
}
.phcd-search-results {
	margin-top: 6px;
	max-height: 280px;
	overflow-y: auto;
	background: #0f1613;
	border: 1px solid #1e2b25;
	border-radius: 6px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
	display: none;
}
.phcd-search-results.phcd-search-open { display: block; }
.phcd-search-result {
	padding: 9px 12px;
	font-size: 13px;
	cursor: pointer;
	border-bottom: 1px solid #1e2b25;
}
.phcd-search-result:last-child { border-bottom: none; }
.phcd-search-result:hover { background: #16211b; }
.phcd-search-result .phcd-result-title { color: #e8ede9; display: block; }
.phcd-search-result .phcd-result-sub { color: #8a978f; font-size: 11px; }
.phcd-search-empty { padding: 12px; font-size: 12px; color: #8a978f; }

@media (max-width: 782px) {
	.phcd-dashboard { flex-direction: column; height: auto; }
	.phcd-sidebar, .phcd-overview { width: 100%; border: none; border-bottom: 1px solid #1e2b25; }
	.phcd-map-wrap { height: 420px; }
}

/* ---- Detail modal (opened when a marker is clicked) ------------------ */

.phcd-modal {
	position: absolute;
	inset: 0;
	z-index: 1000;
	display: none;
}
.phcd-modal.phcd-modal-open { display: block; }

.phcd-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.6 );
}

.phcd-modal-panel {
	position: absolute;
	top: 4%;
	left: 50%;
	transform: translateX( -50% );
	width: min( 720px, 92%);
	max-height: 90%;
	overflow-y: auto;
	background: #0f1613;
	border: 1px solid #1e2b25;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.5 );
}

.phcd-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #1e2b25;
}
.phcd-modal-title { margin: 0; font-size: 22px; font-weight: 600; color: #e8ede9; }
.phcd-modal-close {
	background: none;
	border: none;
	color: #8a978f;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.phcd-modal-body { padding: 20px 24px 28px; }
.phcd-modal-loading { color: #8a978f; padding: 30px 0; text-align: center; }

.phcd-crumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 6px;
	margin-bottom: 16px;
}
.phcd-pill {
	flex: 0 0 auto;
	background: #0a100d;
	border: 1px solid #1e2b25;
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
	color: #e8ede9;
	white-space: nowrap;
	text-transform: uppercase;
}

.phcd-info-box {
	border: 1px solid #16a870;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 20px;
}
.phcd-info-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	padding: 8px 0;
}
.phcd-info-cell { display: flex; flex-direction: column; gap: 2px; }
.phcd-info-label { font-size: 11px; font-weight: 700; letter-spacing: 0.3px; color: #e8ede9; }
.phcd-info-value { font-size: 14px; color: #b7c2bb; }

.phcd-gallery-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 130px, 1fr ) );
	gap: 12px;
	margin-bottom: 24px;
}
.phcd-gallery-tile {
	display: block;
	aspect-ratio: 1 / 1;
	background: #1c1c1c;
	border-radius: 4px;
	overflow: hidden;
}
.phcd-gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phcd-gallery-empty { grid-column: 1 / -1; color: #8a978f; font-size: 13px; }

.phcd-checklists {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}
.phcd-checklist-col h3 { font-size: 15px; margin: 0 0 10px; color: #e8ede9; }
.phcd-checklist-header {
	background: #16a870 !important;
	color: #06120c !important;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	padding: 10px 14px;
	border-radius: 6px 6px 0 0;
}
.phcd-checklist {
	border: 1px solid #1e2b25;
	border-top: none;
	border-radius: 0 0 6px 6px;
	max-height: 240px;
	overflow-y: auto;
}
.phcd-checklist-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	font-size: 13px;
	border-bottom: 1px solid #1e2b25;
}
.phcd-checklist-row:last-child { border-bottom: none; }
.phcd-checklist-empty { padding: 14px; font-size: 13px; color: #8a978f; }
.phcd-check { font-weight: 700; }
.phcd-check-yes { color: #2ee6a0 !important; }
.phcd-check-no { color: #e0554f !important; }

@media (max-width: 620px) {
	.phcd-info-row { grid-template-columns: 1fr; }
}
