/*
 * vn-admin-data front-end views (/tinh-thanh-cu/, /34-tinh-thanh/, /tinh-thanh/{slug}/).
 * Own palette and components, everything scoped under .vnp / vnp-* so the active theme's
 * element resets (a, button, input, table, img, h1–h4) cannot restyle them, and nothing here
 * leaks into the theme's header/footer. Font family is inherited from the theme.
 */

body.vnp-page {
	background: #f3f7fd;
}

.vnp {
	--vnp-primary: #2563eb;
	--vnp-primary-2: #4f46e5;
	--vnp-primary-soft: #e8f0fe;
	--vnp-ink: #0f172a;
	--vnp-text: #334155;
	--vnp-muted: #64748b;
	--vnp-line: #e2e8f0;
	--vnp-surface: #ffffff;
	--vnp-soft: #f8fafc;
	--vnp-radius: 16px;
	--vnp-radius-sm: 10px;
	--vnp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.05);
	--vnp-shadow-hover: 0 10px 30px rgba(37, 99, 235, 0.14);
	--vnp-gap: clamp(0.875rem, 2vw, 1.25rem);
	box-sizing: border-box;
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
	padding: 1.25rem clamp(1rem, 3vw, 1.5rem) 4rem;
	color: var(--vnp-text);
	font-size: 1rem;
	line-height: 1.6;
}
.vnp *,
.vnp *::before,
.vnp *::after {
	box-sizing: inherit;
}
.vnp :where(h1, h2, h3, h4) {
	margin: 0;
	color: var(--vnp-ink);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.25;
}
.vnp h2 {
	margin: 0 0 0.75rem;
	font-size: 1.35rem;
}
.vnp :where(p) {
	margin: 0 0 0.75rem;
}
.vnp a {
	color: var(--vnp-primary);
	text-decoration: none;
}
.vnp a:hover {
	text-decoration: underline;
}
.vnp :where(dl, dd, ul, ol) {
	margin: 0;
}
.vnp svg {
	display: inline-block;
	max-width: none;
}
.vnp-icon {
	width: 1.15em;
	height: 1.15em;
	flex: none;
	vertical-align: -0.2em;
}
.vnp-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.vnp-muted {
	color: var(--vnp-muted);
}
.vnp :focus-visible {
	outline: 2px solid var(--vnp-primary);
	outline-offset: 2px;
}

/* Breadcrumb ------------------------------------------------------------------------------- */
.vnp-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
	font-size: 0.85rem;
	color: var(--vnp-muted);
}
.vnp-breadcrumb li:not(:last-child)::after {
	content: "›";
	margin-left: 0.35rem;
}
.vnp-breadcrumb a {
	color: inherit;
}

/* Hero ------------------------------------------------------------------------------------- */
.vnp-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 5vw, 3.5rem);
	border-radius: 24px;
	background:
		radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18), transparent 40%),
		linear-gradient(135deg, #1d4ed8 0%, #4f46e5 55%, #7c3aed 100%);
	color: #e0e7ff;
	text-align: center;
	box-shadow: 0 18px 40px rgba(79, 70, 229, 0.25);
}
.vnp-hero::before {
	/* faint grid texture */
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
	background-size: 28px 28px;
	pointer-events: none;
}
.vnp-hero > * {
	position: relative;
}
.vnp-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 1rem;
	padding: 0.3rem 0.85rem;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
}
.vnp .vnp-hero__title {
	margin: 0 auto 0.75rem;
	max-width: 22ch;
	color: #fff;
	font-size: clamp(1.75rem, 4.5vw, 2.75rem);
	font-weight: 800;
	line-height: 1.15;
}
.vnp-hero__lead {
	max-width: 62ch;
	margin: 0 auto;
	font-size: 1.05rem;
}
.vnp-hero__lead strong {
	color: #fff;
}
.vnp-hero__origin {
	justify-content: center;
}
.vnp .vnp-hero .vnp-label {
	color: rgba(255, 255, 255, 0.75);
}
.vnp-hero .vnp-badge {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}
.vnp-hero__facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	max-width: 860px;
	margin: 1.5rem auto 0;
}
.vnp-hero__facts > div {
	padding: 0.85rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(4px);
}
.vnp-hero__facts dt {
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.75);
}
.vnp-hero__facts dd {
	color: #fff;
	font-size: 1.3rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
}
.vnp-hero__facts small {
	font-size: 0.75rem;
	font-weight: 500;
	opacity: 0.8;
}
.vnp-hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin: 1.5rem 0 0;
}
.vnp-hero--single {
	text-align: left;
}
.vnp-hero--single .vnp-hero__title {
	margin-left: 0;
	max-width: none;
}
.vnp-hero--single .vnp-hero__origin,
.vnp-hero--single .vnp-hero__actions {
	justify-content: flex-start;
}
.vnp-hero--single .vnp-hero__facts {
	margin-left: 0;
}
.vnp-hero--compact {
	text-align: left;
}
.vnp-hero--compact .vnp-hero__title,
.vnp-hero--compact .vnp-hero__lead {
	margin-left: 0;
}

/* Lookup box inside the hero ---------------------------------------------------------------- */
.vnp-hero .vnp-lookup {
	max-width: 820px;
	margin: 1.75rem auto 0;
	padding: 0.6rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.14);
	color: #e0e7ff;
	text-align: left;
}
.vnp-hero .vnp-lookup__title {
	margin: 0.25rem 0.5rem 0.6rem;
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
}
.vnp-hero .vnp-lookup__field input {
	min-height: 3.1rem;
	border: 0;
	border-radius: 12px;
	background-color: #fff;
	color: var(--vnp-ink);
	font-size: 1rem;
}
.vnp-hero .vnp-lookup__submit {
	min-height: 3.1rem;
	padding-inline: 1.6rem;
	border-radius: 12px;
	background: #0f172a;
	color: #fff;
	font-weight: 600;
}
.vnp-hero .vnp-lookup__submit:hover {
	background: #1e293b;
}
.vnp-hero .vnp-lookup__hint,
.vnp-hero .vnp-lookup__status {
	margin-inline: 0.5rem;
	color: rgba(255, 255, 255, 0.78);
}
.vnp-hero .vnp-lookup__results:not(:empty) {
	margin-top: 0.6rem;
	padding: 0.25rem 1rem 1rem;
	border-radius: 12px;
	background: #fff;
	color: var(--vnp-text);
}
.vnp-hero .vnp-lookup__group {
	color: var(--vnp-ink);
}

/* Buttons ------------------------------------------------------------------------------------ */
.vnp .vnp-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.65rem 1.1rem;
	border: 1px solid transparent;
	border-radius: 12px;
	background: #fff;
	color: var(--vnp-primary-2);
	font-size: 0.92rem;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}
.vnp .vnp-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
	text-decoration: none;
}
.vnp .vnp-btn--light {
	border-color: rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}
.vnp .vnp-btn--ghost {
	border-color: var(--vnp-line);
	background: var(--vnp-surface);
	color: var(--vnp-ink);
}

/* Stat tiles --------------------------------------------------------------------------------- */
.vnp-stats {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--vnp-gap);
	margin-top: 1.5rem;
}
.vnp-stat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius);
	background: var(--vnp-surface);
	box-shadow: var(--vnp-shadow);
}
.vnp .vnp-stat__label {
	margin: 0 0 0.2rem;
	color: var(--vnp-muted);
	font-size: 0.82rem;
	font-weight: 500;
}
.vnp .vnp-stat__value {
	margin: 0;
	color: var(--vnp-ink);
	font-size: 1.6rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
}
.vnp-stat__value small {
	color: var(--vnp-muted);
	font-size: 0.75rem;
	font-weight: 500;
}
.vnp-stat__icon {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	flex: none;
	border-radius: 12px;
	--c: var(--vnp-primary);
	background: color-mix(in srgb, var(--c) 12%, #fff);
	color: var(--c);
}
.vnp-stat__icon .vnp-icon {
	width: 1.35rem;
	height: 1.35rem;
}
.vnp-stat--rose .vnp-stat__icon { --c: #e11d48; }
.vnp-stat--green .vnp-stat__icon { --c: #059669; }
.vnp-stat--amber .vnp-stat__icon { --c: #d97706; }

/* Listing head + toolbar --------------------------------------------------------------------- */
.vnp-listing {
	margin-top: 2.25rem;
}
.vnp-listing__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--vnp-line);
}
.vnp .vnp-listing__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-size: 1.35rem;
}
.vnp-listing__title .vnp-icon {
	color: var(--vnp-primary);
}
.vnp-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 0.75rem;
	margin: 1rem 0;
}
.vnp-js-only {
	display: none;
}
.vnp-js .vnp-js-only {
	display: flex;
}
.vnp-search {
	flex: 1 1 260px;
	max-width: 480px;
}
.vnp .vnp-search input,
.vnp .vnp-select select,
.vnp .vnp-size select {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.55rem 0.85rem;
	border: 1px solid var(--vnp-line);
	border-radius: 12px;
	background-color: var(--vnp-surface);
	color: var(--vnp-ink);
	font: inherit;
	font-size: 0.95rem;
	box-shadow: none;
}
.vnp .vnp-search input {
	padding-left: 2.4rem;
	background: var(--vnp-surface) no-repeat 0.85rem center / 1rem
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.vnp .vnp-search input:focus,
.vnp .vnp-select select:focus {
	border-color: var(--vnp-primary);
	outline: 3px solid color-mix(in srgb, var(--vnp-primary) 18%, transparent);
	outline-offset: 0;
}
.vnp-select {
	flex: 0 1 220px;
}
.vnp-size {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	white-space: nowrap;
}
.vnp .vnp-size select {
	width: auto;
}
.vnp .vnp-status {
	margin: 0;
	color: var(--vnp-muted);
	font-size: 0.85rem;
}
.vnp-status strong {
	color: var(--vnp-primary);
}

/* Region heading ----------------------------------------------------------------------------- */
.vnp-region {
	margin-top: 2rem;
	scroll-margin-top: 1rem;
}
.vnp-region__head {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-bottom: 1rem;
}
.vnp .vnp-region__title {
	margin: 0;
	padding: 0.35rem 1rem;
	border: 1px solid #fcd34d;
	border-radius: 999px;
	background: #fef3c7;
	color: #b45309;
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}
.vnp-region--mien-trung .vnp-region__title {
	border-color: #6ee7b7;
	background: #d1fae5;
	color: #047857;
}
.vnp-region--mien-nam .vnp-region__title {
	border-color: #fda4af;
	background: #ffe4e6;
	color: #be123c;
}
.vnp-region__line {
	flex: 1;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, #fcd34d, transparent);
}
.vnp-region--mien-trung .vnp-region__line { background: linear-gradient(90deg, #6ee7b7, transparent); }
.vnp-region--mien-nam .vnp-region__line { background: linear-gradient(90deg, #fda4af, transparent); }
.vnp-region__count {
	color: var(--vnp-muted);
	font-size: 0.82rem;
	white-space: nowrap;
}

/* Province cards ----------------------------------------------------------------------------- */
.vnp-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: var(--vnp-gap);
}
.vnp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius);
	background: var(--vnp-surface);
	box-shadow: var(--vnp-shadow);
	transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.vnp-card:hover {
	transform: translateY(-3px);
	border-color: color-mix(in srgb, var(--vnp-primary) 35%, var(--vnp-line));
	box-shadow: var(--vnp-shadow-hover);
}
.vnp-card[hidden] {
	display: none;
}
.vnp-card__cover {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	--c1: #dbeafe;
	--c2: #e0e7ff;
	--ink: #3b5bdb;
	background:
		radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 45%),
		linear-gradient(135deg, var(--c1), var(--c2));
}
.vnp-region--mien-bac .vnp-card__cover { --c1: #fef3c7; --c2: #fde68a; --ink: #b45309; }
.vnp-region--mien-trung .vnp-card__cover { --c1: #d1fae5; --c2: #a7f3d0; --ink: #047857; }
.vnp-region--mien-nam .vnp-card__cover { --c1: #ffe4e6; --c2: #fecdd3; --ink: #be123c; }
.vnp-card__cover::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1px);
	background-size: 22px 22px;
}
.vnp-card__cover.has-image {
	aspect-ratio: 4 / 3; /* = MapCrop::SIZES['vnp-card'] (800×600) */
	background: #fff;
}
.vnp-card__cover.has-image::before {
	display: none;
}
.vnp .vnp-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover; /* the vnp-card crop already has the frame's 4:3 ratio */
	transition: transform 0.25s;
}
.vnp-card:hover .vnp-card__img {
	transform: scale(1.04);
}
.vnp-card__shape {
	position: relative;
	width: 78%;
	height: 82%;
}
.vnp-card__shape path {
	fill: color-mix(in srgb, var(--ink) 22%, transparent);
	stroke: var(--ink);
	stroke-width: 1.2;
	stroke-linejoin: round;
}
.vnp-card__mono {
	position: relative;
	padding: 0 1rem;
	color: color-mix(in srgb, var(--ink) 30%, transparent);
	font-size: clamp(1.6rem, 3.2vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.05;
	text-align: center;
	text-transform: uppercase;
}
.vnp-card__pin {
	position: absolute;
	left: 50%;
	bottom: 12%;
	transform: translateX(-50%);
	color: var(--ink);
}
.vnp-card__pin .vnp-icon {
	width: 1.6rem;
	height: 1.6rem;
}
.vnp-card__code {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	padding: 0.2rem 0.6rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--vnp-ink);
	font-size: 1rem;
	font-weight: 800;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}
.vnp-card__tag {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	background: var(--vnp-primary);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
}
.vnp-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1rem 1.15rem 1.1rem;
}
.vnp .vnp-card__title {
	margin: 0;
	font-size: 1.15rem;
}
.vnp .vnp-card__title a {
	color: var(--vnp-ink);
	text-decoration: none;
}
.vnp-card__title a::after {
	/* the whole card is the link */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}
.vnp-card:hover .vnp-card__title a {
	color: var(--vnp-primary);
}
.vnp-card__origin {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}
.vnp .vnp-label {
	margin-right: 0.15rem;
	color: var(--vnp-muted);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}
.vnp-badge {
	padding: 0.1rem 0.6rem;
	border-radius: 999px;
	background: var(--vnp-primary-soft);
	color: #1e40af;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
}
.vnp-badge--same {
	background: #f1f5f9;
	color: var(--vnp-muted);
	font-weight: 500;
}
.vnp-card__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem 1rem;
	margin-top: auto;
	padding-top: 0.8rem;
	border-top: 1px dashed var(--vnp-line);
}
.vnp-card__stats dt {
	color: var(--vnp-muted);
	font-size: 0.72rem;
}
.vnp-card__stats dd {
	color: var(--vnp-ink);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.35;
}
.vnp-card__more {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--vnp-primary);
	font-size: 0.85rem;
	font-weight: 600;
}
.vnp-card__more .vnp-icon {
	transition: transform 0.15s;
}
.vnp-card:hover .vnp-card__more .vnp-icon {
	transform: translateX(3px);
}
.vnp-nowrap {
	white-space: nowrap;
}

/* Chips -------------------------------------------------------------------------------------- */
.vnp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.vnp .vnp-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.85rem;
	border: 1px solid var(--vnp-line);
	border-radius: 999px;
	background: var(--vnp-soft);
	color: var(--vnp-ink);
	font-size: 0.88rem;
	text-decoration: none;
}
.vnp a.vnp-chip:hover {
	border-color: var(--vnp-primary);
	background: var(--vnp-primary-soft);
	color: var(--vnp-primary);
}
.vnp-chip--ghost {
	background: transparent;
}
.vnp .vnp-chip--warn {
	border-color: #fecaca;
	background: #fef2f2;
	color: #b91c1c;
}

/* Panels (single province) ------------------------------------------------------------------- */
.vnp-section {
	margin-top: 1.5rem;
}
.vnp-panel {
	margin-top: var(--vnp-gap);
	padding: clamp(1.1rem, 2.5vw, 1.6rem);
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius);
	background: var(--vnp-surface);
	box-shadow: var(--vnp-shadow);
}
.vnp .vnp-panel__title {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 1rem;
	font-size: 1.2rem;
}
.vnp-panel__title .vnp-icon {
	padding: 0.35rem;
	width: 2rem;
	height: 2rem;
	border-radius: 10px;
	background: var(--vnp-primary-soft);
	color: var(--vnp-primary);
}
.vnp-split {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: var(--vnp-gap);
	align-items: start;
}
.vnp-split--even {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.vnp-split > .vnp-panel {
	margin-top: var(--vnp-gap);
}
.vnp-overview > p {
	line-height: 1.7;
}

/* Spec tiles --------------------------------------------------------------------------------- */
.vnp-specs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	gap: var(--vnp-gap);
}
.vnp-spec {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius);
	background: var(--vnp-surface);
	box-shadow: var(--vnp-shadow);
}
.vnp-spec__icon {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	flex: none;
	border-radius: 12px;
	--c: var(--vnp-primary);
	background: color-mix(in srgb, var(--c) 12%, #fff);
	color: var(--c);
}
.vnp-spec--people .vnp-spec__icon,
.vnp-spec--density .vnp-spec__icon { --c: #e11d48; }
.vnp-spec--area .vnp-spec__icon,
.vnp-spec--region .vnp-spec__icon { --c: #059669; }
.vnp-spec--units .vnp-spec__icon,
.vnp-spec--center .vnp-spec__icon { --c: #4f46e5; }
.vnp-spec--plate .vnp-spec__icon,
.vnp-spec--phone .vnp-spec__icon,
.vnp-spec--postal .vnp-spec__icon { --c: #d97706; }
.vnp-spec--border .vnp-spec__icon { --c: #dc2626; }
.vnp-spec dt {
	margin-bottom: 0.1rem;
	color: var(--vnp-muted);
	font-size: 0.8rem;
}
.vnp-spec dd {
	color: var(--vnp-ink);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.35;
	overflow-wrap: anywhere;
}
.vnp-spec small {
	display: block;
	margin-top: 0.15rem;
	color: var(--vnp-muted);
	font-size: 0.8rem;
	font-weight: 400;
}

/* Overview facts ------------------------------------------------------------------------------ */
.vnp-facts {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0 1.5rem;
	margin-top: 1rem;
}
.vnp-facts div {
	padding: 0.55rem 0;
	border-bottom: 1px dashed var(--vnp-line);
}
.vnp-facts dt {
	color: var(--vnp-muted);
	font-size: 0.8rem;
}
.vnp-facts dd {
	color: var(--vnp-ink);
	font-weight: 600;
}
.vnp-olds {
	display: grid;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.vnp-olds li {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	padding: 0.65rem 0.9rem;
	border-radius: var(--vnp-radius-sm);
	background: var(--vnp-soft);
}
.vnp-olds strong {
	color: var(--vnp-ink);
}
.vnp-olds span {
	color: var(--vnp-muted);
	font-size: 0.88rem;
}
.vnp-list {
	padding-left: 1.2em;
	line-height: 1.8;
}

/* Ward table ---------------------------------------------------------------------------------- */
.vnp-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius-sm);
}
.vnp .vnp-table {
	width: 100%;
	min-width: 760px;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	font-size: 0.9rem;
}
.vnp .vnp-table th,
.vnp .vnp-table td {
	padding: 0.65rem 0.85rem;
	border: 0;
	border-bottom: 1px solid var(--vnp-line);
	text-align: left;
	vertical-align: top;
}
.vnp .vnp-table thead th {
	position: sticky;
	top: 0;
	background: #eef4ff;
	color: #1e3a8a;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}
.vnp-table tbody tr:nth-child(even) {
	background: var(--vnp-soft);
}
.vnp-table tbody tr:hover {
	background: #f1f6ff;
}
.vnp-table tbody tr:target,
.vnp-table tbody tr.vnp-hit {
	background: #fef9c3;
}
.vnp-table td strong {
	color: var(--vnp-ink);
}
.vnp-table td:nth-child(2) {
	min-width: 12em;
}
.vnp-num {
	text-align: right !important;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.vnp-code {
	display: block;
	color: var(--vnp-muted);
	font-size: 0.78rem;
}
.vnp-from {
	min-width: 18em;
	line-height: 1.5;
}
.vnp .vnp-empty {
	margin: 0;
	padding: 1.25rem;
	text-align: center;
	color: var(--vnp-muted);
}

/* Pager --------------------------------------------------------------------------------------- */
.vnp-pager {
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem;
	margin-top: 1rem;
}
.vnp .vnp-pager button {
	min-width: 2.4rem;
	padding: 0.4rem 0.7rem;
	border: 1px solid var(--vnp-line);
	border-radius: 10px;
	background: var(--vnp-surface);
	color: var(--vnp-ink);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}
.vnp .vnp-pager button:hover:not([disabled]) {
	border-color: var(--vnp-primary);
	color: var(--vnp-primary);
}
.vnp .vnp-pager button[aria-current="page"] {
	border-color: var(--vnp-primary);
	background: var(--vnp-primary);
	color: #fff;
}
.vnp-pager button[disabled] {
	opacity: 0.4;
	cursor: default;
}
.vnp-pager__gap {
	align-self: center;
	padding: 0 0.25rem;
	color: var(--vnp-muted);
}

/* Old provinces tree (<details>/<summary>) ------------------------------------------------- */
.vnp-tree {
	display: grid;
	gap: 0.5rem;
}
.vnp-tree details > summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.25rem 0.75rem;
	padding: 0.8rem 1rem 0.8rem 2.4rem;
	position: relative;
	cursor: pointer;
	list-style: none;
}
.vnp-tree details > summary::-webkit-details-marker {
	display: none;
}
.vnp-tree details > summary::before {
	content: "";
	position: absolute;
	left: 1rem;
	top: 1.15rem;
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}
.vnp-tree details[open] > summary::before {
	transform: rotate(45deg);
}
.vnp-tree__prov {
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius-sm);
}
.vnp-tree__prov[open] {
	background: var(--vnp-soft);
}
.vnp-tree__name {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium, 1.05rem);
}
.vnp-tree__meta,
.vnp-tree__now {
	font-size: var(--wp--preset--font-size--small, 0.85rem);
	color: var(--vnp-muted);
}
.vnp-tree__now {
	flex-basis: 100%;
}
.vnp-tree__body {
	padding: 0 1rem 1rem 2.4rem;
}
.vnp-tree__body:empty {
	display: none;
}
.vnp-tree__links {
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--small, 0.9rem);
}
.vnp-districts {
	display: grid;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.vnp-district {
	border: 1px solid var(--vnp-line);
	border-radius: 8px;
	background: var(--vnp-surface);
}
.vnp-district > summary {
	padding-block: 0.55rem;
}
.vnp-district > summary::before {
	top: 0.85rem;
}
.vnp-district .vnp-tree__body {
	padding-top: 0.25rem;
}
.vnp-wards-list {
	columns: 2 280px;
	column-gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small, 0.9rem);
}
.vnp-wards-list li {
	break-inside: avoid;
	padding: 0.3rem 0;
	border-bottom: 1px dashed var(--vnp-line);
}
.vnp-wards-list small {
	display: block;
	color: var(--vnp-muted);
}
.vnp-loading {
	color: var(--vnp-muted);
	font-size: var(--wp--preset--font-size--small, 0.9rem);
}
.vnp-loading button {
	margin-left: 0.5rem;
	font: inherit;
}
.vnp-tree mark {
	background: color-mix(in srgb, var(--vnp-primary) 22%, transparent);
	color: inherit;
	border-radius: 2px;
}
.vnp-tree__prov > summary.has-thumb {
	padding-right: 5.75rem;
}
.vnp-tree__thumb {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	width: 4.4rem;
	height: 3.3rem; /* 4:3, the vnp-card-sm crop */
	overflow: hidden;
	border: 1px solid var(--vnp-line);
	border-radius: 8px;
	background: #fff;
}
.vnp .vnp-tree__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* Image credits (CC BY / BY-SA attribution) ---------------------------------------------------- */
.vnp-credits {
	margin-top: 2.5rem;
	padding: 0.85rem 1.1rem;
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius-sm);
	background: var(--vnp-surface);
	font-size: 0.8rem;
	color: var(--vnp-muted);
}
.vnp-credits > summary {
	color: var(--vnp-ink);
	font-weight: 600;
	cursor: pointer;
}
.vnp-credits ul {
	columns: 2 320px;
	column-gap: 2rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}
.vnp-credits li {
	break-inside: avoid;
	padding: 0.2rem 0;
}
.vnp-credits a {
	color: inherit;
	text-decoration: underline;
}

/* Hero with a map image (single province) ------------------------------------------------------ */
.vnp-hero--media {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: center;
}
.vnp-hero--media .vnp-hero__facts {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.vnp-hero__media {
	margin: 0;
}
.vnp-hero__media > a {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3; /* same frame as the vnp-card crop */
	overflow: hidden;
	border: 6px solid #fff;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}
.vnp .vnp-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.3s;
}
.vnp-hero__media > a:hover .vnp-hero__img {
	transform: scale(1.03);
}
.vnp .vnp-hero__media.is-detailed .vnp-hero__img {
	padding: 0.5rem;
	object-fit: contain; /* a detailed map is shown whole */
}
.vnp-hero__media figcaption {
	margin-top: 0.5rem;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.72rem;
	text-align: right;
}
.vnp .vnp-hero__media figcaption a {
	color: inherit;
	text-decoration: underline;
}
@media (max-width: 1024px) {
	.vnp-hero--media {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Map ------------------------------------------------------------------------------------------ */
.vnp-map {
	position: relative;
}
.vnp-map__canvas,
.vnp-map__placeholder {
	height: clamp(300px, 46vh, 440px);
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius-sm);
	overflow: hidden;
}
.vnp-map__canvas {
	z-index: 0; /* keep Leaflet panes under sticky theme headers */
	background: #eaf1fb;
}
.vnp-map__canvas img {
	max-width: none !important; /* themes set img{max-width:100%}, which breaks Leaflet tiles */
	box-shadow: none !important;
}
.vnp-map__placeholder {
	display: none;
	place-items: center;
	background:
		linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px) 0 0 / 24px 24px,
		linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px) 0 0 / 24px 24px,
		#eef4ff;
	color: var(--vnp-muted);
	font-size: 0.9rem;
}
.vnp-js .vnp-map:not(.is-ready):not(.is-failed) .vnp-map__placeholder {
	display: grid;
}
.vnp-map.is-ready .vnp-map__placeholder {
	display: none;
}
.vnp-map.is-notiles .vnp-map__canvas::after {
	content: "Không tải được nền bản đồ — vẫn hiển thị vị trí và ranh giới";
	position: absolute;
	left: 0.75rem;
	bottom: 0.75rem;
	z-index: 500;
	padding: 0.25rem 0.6rem;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--vnp-muted);
	font-size: 0.75rem;
}
.vnp-map__fallback {
	margin-top: 0.75rem;
	font-size: 0.88rem;
}
.vnp-map__coords {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 0 0 0.25rem;
	color: var(--vnp-muted);
}
.vnp-map__coords strong {
	color: var(--vnp-ink);
}
.vnp .vnp-map__links {
	margin: 0;
}
.vnp .vnp-map__credit {
	margin: 0.5rem 0 0;
	font-size: 0.75rem;
}

/* FAQ ------------------------------------------------------------------------------------------ */
.vnp-faq__item {
	margin-top: 0.6rem;
	border: 1px solid var(--vnp-line);
	border-radius: var(--vnp-radius-sm);
	background: var(--vnp-soft);
}
.vnp-faq__item[open] {
	border-color: color-mix(in srgb, var(--vnp-primary) 35%, var(--vnp-line));
	background: var(--vnp-surface);
}
.vnp-faq__item > summary {
	position: relative;
	padding: 0.85rem 2.75rem 0.85rem 1rem;
	color: var(--vnp-ink);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.vnp-faq__item > summary::-webkit-details-marker {
	display: none;
}
.vnp-faq__item > summary::after {
	content: "+";
	position: absolute;
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--vnp-primary);
	font-size: 1.3rem;
	font-weight: 400;
}
.vnp-faq__item[open] > summary::after {
	content: "−";
}
.vnp .vnp-faq__item > p {
	margin: 0;
	padding: 0 1rem 1rem;
	max-width: 80ch;
	line-height: 1.65;
}

/* Page head on /tinh-thanh-cu/ ----------------------------------------------------------------- */
.vnp-head {
	margin-bottom: 1.5rem;
}
.vnp .vnp-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 800;
}
.vnp-lead {
	max-width: 75ch;
	font-size: 1.05rem;
}
.vnp-head__links {
	margin: 0.5rem 0 0;
}

/* Misc ----------------------------------------------------------------------------------------- */
.vnp .vnp-source {
	margin-top: 2rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--vnp-primary);
	border-radius: 0 var(--vnp-radius-sm) var(--vnp-radius-sm) 0;
	background: var(--vnp-surface);
	font-size: 0.85rem;
}
.vnp-note {
	padding: 1rem;
	border: 1px dashed var(--vnp-line);
	border-radius: var(--vnp-radius-sm);
}

@media (max-width: 1024px) {
	.vnp-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.vnp-split {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 640px) {
	.vnp-hero {
		border-radius: 18px;
	}
	.vnp-hero__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.vnp .vnp-stat__value {
		font-size: 1.3rem;
	}
	.vnp-stat {
		padding: 0.9rem 1rem;
	}
	.vnp-stat__icon {
		width: 2.3rem;
		height: 2.3rem;
	}
	.vnp-select {
		flex: 1 1 100%;
	}
	.vnp-hero .vnp-lookup__submit {
		width: 100%;
	}
	.vnp-tree details > summary {
		padding-left: 2.1rem;
	}
	.vnp-tree__body {
		padding-left: 1rem;
	}
}
@media (max-width: 400px) {
	.vnp-stats {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.vnp-tree details > summary::before,
	.vnp-card,
	.vnp-card__more .vnp-icon,
	.vnp .vnp-btn {
		transition: none;
	}
	.vnp-card:hover {
		transform: none;
	}
}
