:root {
	/* Palet logo Polri: coklat + emas */
	--brand: #c9a227;
	--polri-gold: #c9a227;
	--polri-gold-light: #e8c547;
	--polri-brown: #5c3a21;
	--polri-brown-dark: #2c1a0e;
	--nexus-accent: var(--polri-gold); /* alias warisan → emas */
	--nexus-ink: var(--polri-brown-dark);
	--ink: #2c1a0e;
	/* ponytail: #7a6550 ~4.8:1 — naikkan agar AA jelas di cream + th/paginasi */
	--muted: #5c4a38;
	--link: #8b5a14;
	--surface: #fffdf8;
	--canvas: #f5efe6;
	--sidebar: #2c1a0e;
	--sidebar-muted: #c4b59a;
	--border: #e5d9c5;
	--brand-soft: #f7f0dc;
	--radius-lg: 16px;
	--radius: 12px;
	--shadow-card: 0 1px 2px rgb(44 26 14 / 4%), 0 8px 24px rgb(44 26 14 / 6%);
	--sidebar-w: 248px;
	--sidebar-w-rail: 68px;
	--app-top-h: 64px;
	--bg: var(--canvas);
	--card: var(--surface);
	--font: 'Plus Jakarta Sans', system-ui, 'Segoe UI', sans-serif;
	--font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
}
* {
	box-sizing: border-box;
}
body {
	margin: 0;
	font-family: var(--font);
	background: var(--canvas);
	color: var(--ink);
	line-height: 1.45;
}
a {
	/* emas #c9a227 di cream hanya ~2.2:1 — pakai coklat-emas gelap */
	color: var(--link);
}
a:hover {
	color: var(--polri-brown-dark);
}

/* —— App shell (sidebar + top strip) —— */
.app-body {
	min-height: 100dvh;
	display: flex;
	background:
		radial-gradient(1200px 480px at 12% -10%, rgb(201 162 39 / 14%), transparent 55%),
		radial-gradient(900px 400px at 100% 0%, rgb(92 58 33 / 8%), transparent 50%),
		var(--canvas);
}
.sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	width: var(--sidebar-w);
	background: linear-gradient(180deg, #2c1a0e 0%, #3d2914 55%, #24140a 100%);
	color: #f5efe6;
	padding: 1rem 0.85rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	z-index: 40;
	overflow-x: hidden;
	overflow-y: auto;
	border-right: 1px solid rgb(255 255 255 / 6%);
	transition: width 0.2s ease;
}
.side-brand-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.35rem;
	padding-right: 0.15rem;
}
.side-brand {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none;
	color: #fff;
	padding: 0.35rem 0.5rem 0.75rem;
	min-width: 0;
	flex: 1;
}
.side-rail-toggle {
	flex-shrink: 0;
	width: 1.85rem;
	height: 1.85rem;
	margin-top: 0.35rem;
	border: 1px solid rgb(255 255 255 / 14%);
	border-radius: 8px;
	background: rgb(255 255 255 / 6%);
	color: #e8c547;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}
.side-rail-toggle:hover {
	border-color: rgb(201 162 39 / 55%);
	background: rgb(201 162 39 / 16%);
}
.side-brand__mark {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 8px;
	object-fit: contain;
	flex-shrink: 0;
	display: block;
	background: #fff;
	box-shadow: 0 0 0 1px rgb(232 197 71 / 35%);
}
.side-brand__text {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
}
.side-brand__text em {
	font-style: normal;
	color: var(--polri-gold-light);
}
.side-tagline {
	margin: 0 0.5rem 0.85rem;
	font-size: 0.72rem;
	line-height: 1.35;
	color: var(--sidebar-muted);
}
.side-nav {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}
.side-group {
	border-radius: 10px;
}
.side-group__head {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	width: 100%;
	padding: 0.5rem 0.55rem;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #f5efe6;
	font: inherit;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	text-align: left;
}
.side-group__head:hover {
	background: rgb(201 162 39 / 12%);
}
.side-group.has-active > .side-group__head {
	color: #e8c547;
}
.side-group__ico {
	width: 1.25rem;
	flex-shrink: 0;
	text-align: center;
	font-size: 0.95rem;
	opacity: 0.95;
}
.side-group__label {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.side-group__chev {
	font-size: 0.7rem;
	opacity: 0.65;
	transition: transform 0.15s ease;
}
.side-group.is-open > .side-group__head .side-group__chev {
	transform: rotate(0deg);
}
.side-group:not(.is-open) > .side-group__head .side-group__chev {
	transform: rotate(-90deg);
}
.side-group__body {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 0.1rem 0 0.35rem 0.15rem;
}
.side-group__body[hidden] {
	display: none !important;
}
.side-link {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.45rem 0.65rem;
	border-radius: 8px;
	color: #e5d9c5;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
}
.side-link:hover {
	background: rgb(201 162 39 / 12%);
	color: #fff;
}
.side-link.is-active {
	background: rgb(201 162 39 / 22%);
	color: #fff;
	box-shadow: inset 3px 0 0 var(--polri-gold);
}
.side-ico {
	width: 1.15rem;
	flex-shrink: 0;
	opacity: 0.85;
	font-size: 0.85rem;
	text-align: center;
}
.side-link__text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.side-section {
	margin-top: 0.65rem;
	padding-top: 0.55rem;
	border-top: 1px solid rgb(255 255 255 / 8%);
}
.side-label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--sidebar-muted);
	padding: 0.25rem 0.65rem 0.4rem;
	font-weight: 600;
}
.app-frame {
	margin-left: var(--sidebar-w);
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	transition: margin-left 0.2s ease;
}

/* Desktop icon-rail: sisa ikon grup */
body.sidebar-rail {
	--sidebar-w: var(--sidebar-w-rail);
}
body.sidebar-rail .sidebar {
	padding: 0.85rem 0.45rem 1rem;
	align-items: stretch;
}
body.sidebar-rail .side-brand-row {
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	padding-right: 0;
}
body.sidebar-rail .side-brand {
	padding: 0.25rem;
	justify-content: center;
}
body.sidebar-rail .side-brand__text,
body.sidebar-rail .side-tagline,
body.sidebar-rail .side-access-chip,
body.sidebar-rail .side-group__label,
body.sidebar-rail .side-group__chev,
body.sidebar-rail .side-link__text,
body.sidebar-rail .side-public-link {
	display: none;
}
body.sidebar-rail .side-ver {
	padding: 0.25rem 0;
	text-align: center;
	font-size: 0.62rem;
	letter-spacing: 0;
}
body.sidebar-rail .side-rail-toggle {
	margin: 0;
	transform: rotate(180deg);
}
body.sidebar-rail .side-group__head {
	justify-content: center;
	padding: 0.55rem 0.35rem;
}
body.sidebar-rail .side-group__body {
	padding: 0.05rem 0 0.25rem;
}
body.sidebar-rail .side-link {
	justify-content: center;
	padding: 0.45rem 0.25rem;
}
body.sidebar-rail .side-public-link {
	display: block;
	padding: 0.5rem 0;
	text-align: center;
}
body.sidebar-rail .side-public-link a {
	font-size: 0;
}
body.sidebar-rail .side-public-link a::before {
	content: '⌂';
	font-size: 0.95rem;
	color: #e8c547;
}
@media (max-width: 960px) {
	body.sidebar-rail {
		--sidebar-w: 248px;
	}
	body.sidebar-rail .side-brand__text,
	body.sidebar-rail .side-tagline,
	body.sidebar-rail .side-access-chip,
	body.sidebar-rail .side-group__label,
	body.sidebar-rail .side-group__chev,
	body.sidebar-rail .side-link__text,
	body.sidebar-rail .side-public-link {
		display: revert;
	}
	body.sidebar-rail .side-public-link a {
		font-size: inherit;
	}
	body.sidebar-rail .side-public-link a::before {
		content: none;
	}
	body.sidebar-rail .side-rail-toggle {
		display: none;
	}
}
.app-top {
	position: sticky;
	top: 0;
	z-index: 20;
	min-height: var(--app-top-h);
	height: var(--app-top-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 1.5rem;
	background: rgb(255 255 255 / 86%);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border);
}
/* spacer agar app-top__right tetap di kanan (judul halaman ada di sidebar/konten) */
.app-top__left {
	min-width: 0;
	flex: 1 1 auto;
}
.app-crumb,
.app-title {
	display: none;
}
.app-top__right {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
	margin-left: auto;
}
.app-user {
	font-size: 0.85rem;
	color: var(--muted);
}
.sidebar-toggle {
	display: none;
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 50;
	width: 2.4rem;
	height: 2.4rem;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: #fff;
	font-size: 1.1rem;
	cursor: pointer;
	box-shadow: var(--shadow-card);
	/* ponytail: geser ke kanan drawer supaya tidak menimpa logo */
	transition:
		left 0.25s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
		background 0.15s ease,
		border-color 0.15s ease;
}
.sidebar-backdrop {
	display: none;
}
@media (max-width: 960px) {
	.sidebar {
		transform: translateX(-105%);
		transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
	}
	body.sidebar-open .sidebar {
		transform: none;
	}
	.sidebar-toggle {
		display: grid;
		place-items: center;
		/* sejajar dengan header lebih tinggi */
		top: 1rem;
		left: 0.75rem;
		width: 2.65rem;
		height: 2.65rem;
	}
	/* burger ikut geser ke kanan tepi drawer — logo brand tidak tertutup */
	body.sidebar-open .sidebar-toggle {
		left: min(calc(var(--sidebar-w) + 0.55rem), calc(100vw - 3.4rem));
		background: #fffdf8;
		border-color: rgb(201 162 39 / 45%);
	}
	.sidebar-backdrop:not([hidden]) {
		display: block;
		position: fixed;
		inset: 0;
		background: rgb(15 23 42 / 45%);
		z-index: 35;
	}
	.app-frame {
		margin-left: 0;
	}
	/* Header mobile: satu baris aksi (cari · user · ikon) */
	.app-top {
		height: auto;
		min-height: var(--app-top-h);
		flex-wrap: nowrap;
		align-items: center;
		row-gap: 0;
		column-gap: 0.5rem;
		padding: 0.75rem 0.9rem 0.75rem 3.75rem;
	}
	.app-top__left {
		display: none;
	}
	.app-top__right {
		flex: 1 1 auto;
		width: auto;
		justify-content: flex-end;
		gap: 0.5rem;
		padding-top: 0;
		border-top: none;
		margin-left: 0;
	}
	.search-trigger {
		flex-shrink: 0;
		padding: 0.4rem 0.7rem;
		font-size: 0.8rem;
	}
	.app-user {
		font-size: 0.78rem;
		line-height: 1.35;
		text-align: right;
		min-width: 0;
		max-width: 62%;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}
@media (max-width: 420px) {
	.app-top {
		min-height: var(--app-top-h);
		padding-top: 0.7rem;
		padding-bottom: 0.7rem;
	}
	/* tombol cari: ikon saja biar user tidak kepotong */
	.search-trigger {
		padding: 0.45rem 0.55rem;
		min-width: 2.5rem;
		font-size: 1rem;
	}
	.search-trigger__label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

/* Desktop: full viewport width on all menu pages */
.wrap {
	max-width: none;
	width: 100%;
	margin: 0 auto;
	padding: 1.25rem 1.5rem 2rem;
	flex: 1;
}
.wrap--wide {
	padding: 0.65rem 0.85rem 0.85rem;
}
@media (max-width: 800px) {
	.wrap {
		padding: 1rem;
	}
}

/* Auth (login / setup) */
.auth-body {
	min-height: 100dvh;
	display: grid;
	place-items: center;
	background:
		radial-gradient(900px 420px at 20% 0%, rgb(201 162 39 / 22%), transparent 55%),
		linear-gradient(160deg, #2c1a0e, #3d2914 55%, #1a1008);
	padding: 1.5rem;
}
.auth-wrap {
	width: min(440px, 100%);
}
.auth-wrap .card {
	box-shadow: var(--shadow-card);
	border: none;
}

/* Fallback: proses lama masih HTML .topbar — jangan sembunyikan jika belum ada sidebar */
.topbar {
	background: var(--nexus-ink);
	color: #fff;
	padding: 0.65rem 1.25rem;
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}
.topbar .brand {
	font-weight: 700;
	color: #fff;
	text-decoration: none;
}
.topbar .brand span {
	color: var(--nexus-accent);
}
.topbar nav a {
	color: #ddd;
	margin-right: 0.85rem;
	text-decoration: none;
	font-size: 0.92rem;
}
.topbar nav a.active {
	color: #fff;
	border-bottom: 2px solid var(--nexus-accent);
	padding-bottom: 2px;
}
/* Shell baru: sembunyikan topbar hanya bila sidebar sudah ada di DOM */
body:has(.sidebar) .topbar {
	display: none;
}

/* Command palette */
.cmdk {
	position: fixed;
	inset: 0;
	z-index: 80;
	background: rgb(15 23 42 / 45%);
	display: grid;
	place-items: start center;
	padding-top: 12vh;
}
.cmdk[hidden] {
	display: none !important;
}
.cmdk__panel {
	width: min(560px, 92vw);
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: 0 24px 64px rgb(15 23 42 / 25%);
	overflow: hidden;
	border: 1px solid var(--border);
}
.cmdk__input {
	width: 100%;
	border: none;
	border-bottom: 1px solid var(--border);
	border-radius: 0;
	padding: 1rem 1.15rem;
	font-size: 1.05rem;
}
.cmdk__list {
	list-style: none;
	margin: 0;
	padding: 0.35rem;
	max-height: 320px;
	overflow: auto;
}
.cmdk__item {
	width: 100%;
	text-align: left;
	border: none;
	background: transparent;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.cmdk__item:hover,
.cmdk__item.is-focus {
	background: var(--brand-soft);
}
.cmdk__hint {
	margin: 0;
	padding: 0.45rem 1rem 0.65rem;
	font-size: 0.75rem;
	border-top: 1px solid var(--border);
}
.cmdk__empty {
	padding: 1rem;
}

/* Mockup primitives */
.hero-search {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.15rem;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	cursor: text;
	margin-bottom: 1.25rem;
}
.hero-search__ico {
	font-size: 1.25rem;
	opacity: 0.55;
}
.hero-search__text {
	flex: 1;
	color: var(--muted);
	font-size: 1rem;
}
.hero-search kbd {
	font-size: 0.72rem;
	padding: 0.15rem 0.4rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: #f8fafc;
	color: var(--muted);
}
.kpi-hero {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.85rem;
	margin: 0 0 1.25rem;
}
@media (max-width: 900px) {
	.kpi-hero {
		grid-template-columns: repeat(2, 1fr);
	}
}
.kpi-hero .kpi {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1rem 1.15rem;
	box-shadow: var(--shadow-card);
	min-width: 0;
}
.kpi-hero .kpi strong {
	font-family: var(--font-display);
	font-size: 1.65rem;
	letter-spacing: -0.03em;
}
.chip-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0 0 1.25rem;
}
.chip {
	border: 1px solid var(--border);
	background: #fff;
	border-radius: 999px;
	padding: 0.35rem 0.85rem;
	font-size: 0.82rem;
	font-weight: 500;
	cursor: pointer;
	color: var(--ink);
	font-family: inherit;
}
.chip:hover,
.chip.is-active {
	border-color: var(--brand);
	background: var(--brand-soft);
	color: var(--polri-brown);
}
.page-hero {
	margin-bottom: 1rem;
}
.page-hero h1 {
	font-family: var(--font-display);
	font-size: 1.55rem;
	letter-spacing: -0.03em;
	margin: 0 0 0.35rem;
}
.page-hero p {
	margin: 0;
	color: var(--muted);
	max-width: 52rem;
}
.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 1rem;
	border-bottom: 1px solid var(--border);
	padding-bottom: 0.35rem;
}
.tab-btn {
	border: none;
	background: transparent;
	padding: 0.55rem 0.9rem;
	font: inherit;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--muted);
	cursor: pointer;
	border-radius: 8px 8px 0 0;
}
.tab-btn.is-active {
	color: var(--brand);
	box-shadow: inset 0 -2px 0 var(--brand);
}
.tab-panel {
	display: none;
}
.tab-panel.is-active {
	display: block;
}
.service-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.85rem;
	margin-bottom: 1.25rem;
}
.service-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	box-shadow: var(--shadow-card);
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
	transition: border-color 0.15s, transform 0.15s;
}
.service-card:hover,
.service-card.is-active {
	border-color: var(--brand);
	transform: translateY(-1px);
}
.service-card strong {
	display: block;
	font-size: 0.98rem;
	margin-bottom: 0.25rem;
}
.service-card span {
	font-size: 0.82rem;
	color: var(--muted);
}
.hub-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0.85rem;
}
.hub-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.1rem;
	box-shadow: var(--shadow-card);
}
.hub-card h3 {
	margin: 0 0 0.35rem;
	font-size: 1rem;
}
.stepper {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1rem 0 1.25rem;
}
.step {
	flex: 1;
	min-width: 7rem;
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	border: 1px dashed var(--border);
	background: #fff;
	font-size: 0.82rem;
	text-align: center;
	color: var(--muted);
}
.step.is-on {
	border-style: solid;
	border-color: var(--brand);
	color: var(--ink);
	background: var(--brand-soft);
	font-weight: 600;
}
.score-hero {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}
.score-hero__num {
	font-family: var(--font-display);
	font-size: 3.2rem;
	font-weight: 700;
	letter-spacing: -0.04em;
	line-height: 1;
	color: var(--brand);
}
.score-hero__meta {
	color: var(--muted);
	font-size: 0.92rem;
}
.kpi-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin: 1rem 0;
}
.kpi {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.75rem 1rem;
	min-width: 120px;
}
.kpi span {
	display: block;
	font-size: 0.8rem;
	color: var(--muted);
}
.kpi strong {
	font-size: 1.35rem;
}
.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}
.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem 1.5rem;
	margin-bottom: 1rem;
	box-shadow: var(--shadow-card);
}
h1 {
	font-family: var(--font-display);
	font-size: 1.35rem;
	margin: 0 0 0.5rem;
	letter-spacing: -0.02em;
}
.muted {
	color: var(--muted);
	font-size: 0.92rem;
}
label {
	display: block;
	font-size: 0.88rem;
	font-weight: 600;
	margin: 0.75rem 0 0.25rem;
}
input,
select,
textarea {
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	font: inherit;
	color: var(--ink);
	background: #fff;
}
input::placeholder,
textarea::placeholder {
	color: #6b5845;
	opacity: 1;
}
textarea {
	min-height: 88px;
	resize: vertical;
}
.btn {
	display: inline-block;
	border: none;
	border-radius: 6px;
	padding: 0.55rem 1rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	background: linear-gradient(180deg, var(--polri-gold-light), var(--polri-gold));
	color: var(--polri-brown-dark);
	margin-top: 0.75rem;
	margin-right: 0.5rem;
	box-shadow: 0 1px 0 rgb(44 26 14 / 12%);
}
.btn.secondary {
	background: var(--surface);
	color: var(--polri-brown);
	border: 1px solid var(--border);
}
.btn:disabled,
.btn.secondary:disabled {
	/* opacity saja membuat teks Prev/Next pudar di cream */
	opacity: 1;
	cursor: not-allowed;
	color: var(--polri-brown);
	background: #ebe4d6;
	border-color: #d4c4a8;
	box-shadow: none;
}
.alert {
	padding: 0.65rem 0.85rem;
	border-radius: 6px;
	margin: 0.75rem 0;
	font-size: 0.92rem;
}
.alert.ok {
	background: #e8f5e9;
	border: 1px solid #a5d6a7;
}
.alert.err {
	background: #ffebee;
	border: 1px solid #ef9a9a;
}
.alert.warn {
	background: #fff8e1;
	border: 1px solid #ffe082;
}
table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}
th,
td {
	border-bottom: 1px solid var(--border);
	padding: 0.5rem 0.4rem;
	text-align: left;
}
th {
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
	color: var(--polri-brown);
}
.badge {
	display: inline-block;
	background: #eee;
	border-radius: 999px;
	padding: 0.15rem 0.55rem;
	font-size: 0.75rem;
	margin-right: 0.25rem;
}
.admin-subnav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.85rem;
	margin: 0.75rem 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border);
}
.admin-subnav a {
	font-size: 0.92rem;
	text-decoration: none;
	color: var(--muted);
	padding: 0.2rem 0;
}
.admin-subnav a.active {
	color: var(--nexus-ink);
	font-weight: 600;
	border-bottom: 2px solid var(--nexus-accent);
}
.um-panel {
	margin: 0.75rem 0 0.5rem;
	padding: 0.85rem 1rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: #fafafa;
}
.um-panel--edit {
	border-color: #c45c26;
	background: #fff8f3;
}
.um-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	align-items: flex-end;
	margin: 0.35rem 0 0.25rem;
}
.um-form label {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.85rem;
	color: var(--muted);
	min-width: 9rem;
}
.um-form input,
.um-form select {
	font: inherit;
	padding: 0.4rem 0.55rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: #fff;
	color: var(--ink);
}
.um-form input[readonly] {
	background: #eee;
	color: var(--muted);
	cursor: not-allowed;
}
.um-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}
.um-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}
.um-actions .btn,
.btn-sm {
	padding: 0.3rem 0.65rem;
	font-size: 0.82rem;
}
.status-pill {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.2rem 0.55rem;
	border-radius: 6px;
	white-space: nowrap;
}
.status-pill--ok {
	background: #e6f6ec;
	color: #146c2e;
}
.status-pill--warn {
	
	background: #fff3d6;
	color: #8a5b00;
}
.status-pill--muted {
	background: #eef0f3;
	color: #4a5160;
}
.status-pill--bad {
	background: #f3e6d8;
	color: #7a2e0e;
}
.kpi--ok strong {
	color: #146c2e;
}
.kpi--warn strong {
	color: #8a5b00;
}
.kpi--muted strong {
	color: #4a5160;
}
.kpi--bad strong {
	color: #7a2e0e;
}
.chat-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 1rem;
	min-height: 70vh;
}
@media (max-width: 800px) {
	.chat-layout {
		grid-template-columns: 1fr;
	}
}
.case-card {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.65rem;
	margin-bottom: 0.5rem;
	cursor: pointer;
	font-size: 0.88rem;
	background: color-mix(in srgb, var(--polri-gold) 6%, transparent);
}
.case-card:hover {
	border-color: var(--polri-gold);
	background: color-mix(in srgb, var(--polri-gold) 14%, transparent);
}
.case-card .case-units {
	font-size: 0.75rem;
	opacity: 0.85;
}
.chat-log {
	border: 1px solid var(--border);
	border-radius: 8px;
	min-height: 320px;
	max-height: 52vh;
	overflow-y: auto;
	padding: 0.75rem;
	background: #fafbfc;
	margin-bottom: 0.75rem;
}
.msg {
	margin-bottom: 0.65rem;
	padding: 0.5rem 0.65rem;
	border-radius: 8px;
	max-width: 92%;
	animation: msg-in 0.35s ease-out both;
}
.msg.user {
	background: #fdecee;
	margin-left: auto;
}
.msg.ai {
	background: #fff;
	border: 1px solid var(--border);
}
.msg.user .md-plain {
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
	font-size: 0.92rem;
}
/* Markdown prose di bubble AI — aturan subset Peruri (escape-first) */
.msg .md {
	font-size: 0.92rem;
	line-height: 1.45;
	word-break: break-word;
}
.msg .md > :first-child {
	margin-top: 0;
}
.msg .md > :last-child {
	margin-bottom: 0;
}
.msg .md p {
	margin: 0.35rem 0;
}
.msg .md h1,
.msg .md h2,
.msg .md h3,
.msg .md h4 {
	margin: 0.55rem 0 0.3rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--ink);
}
.msg .md h1 {
	font-size: 1.05rem;
}
.msg .md h2 {
	font-size: 1rem;
}
.msg .md h3,
.msg .md h4 {
	font-size: 0.95rem;
}
.msg .md ul {
	margin: 0.35rem 0;
	padding-left: 1.25rem;
	list-style: disc;
}
.msg .md ol {
	margin: 0.35rem 0;
	padding-left: 1.25rem;
	list-style: decimal;
}
.msg .md li {
	margin: 0.15rem 0;
}
.msg .md code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.82em;
	background: #f0f2f5;
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
}
.msg .md pre {
	margin: 0.45rem 0;
	padding: 0.65rem 0.75rem;
	overflow-x: auto;
	border-radius: 8px;
	background: #1a1a1a;
	color: #f5f5f5;
}
.msg .md pre code {
	background: transparent;
	padding: 0;
	color: inherit;
	font-size: 0.8rem;
}
.msg .md a {
	color: var(--nexus-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.msg .md blockquote {
	margin: 0.45rem 0;
	padding-left: 0.75rem;
	border-left: 3px solid var(--nexus-accent);
	color: var(--muted);
}
.msg .md hr {
	margin: 0.65rem 0;
	border: none;
	border-top: 1px solid var(--border);
}
.msg .md-table {
	margin: 0.45rem 0;
	overflow-x: auto;
}
.msg .md table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.8rem;
}
.msg .md th,
.msg .md td {
	border: 1px solid var(--border);
	padding: 0.35rem 0.5rem;
	text-align: left;
	vertical-align: top;
}
.msg .md th {
	background: #f5f6f8;
	font-weight: 600;
}
@keyframes msg-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
/* Chat typing / status loading */
.msg.typing {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-width: 4.5rem;
	padding: 0.7rem 0.9rem;
}
.typing-dots {
	display: inline-flex;
	gap: 5px;
	align-items: center;
}
.typing-dots span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--polri-gold);
	animation: typing-bounce 1.1s ease-in-out infinite;
}
.typing-dots span:nth-child(2) {
	animation-delay: 0.15s;
	background: var(--polri-gold-light);
}
.typing-dots span:nth-child(3) {
	animation-delay: 0.3s;
	background: var(--polri-brown);
}
@keyframes typing-bounce {
	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 0.45;
	}
	30% {
		transform: translateY(-5px);
		opacity: 1;
	}
}
.ai-status {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	margin-bottom: 0.5rem;
	min-height: 1.4rem;
}
.ai-status.is-busy::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--nexus-accent);
	flex-shrink: 0;
	animation: pulse 1s infinite;
}
.ai-status-bar {
	height: 3px;
	border-radius: 999px;
	background: linear-gradient(
		90deg,
		transparent,
		var(--polri-gold),
		var(--polri-brown),
		var(--polri-gold),
		transparent
	);
	background-size: 200% 100%;
	animation: status-shimmer 1.4s linear infinite;
	margin: 0 0 0.55rem;
	opacity: 0;
	transition: opacity 0.2s;
}
.ai-status-bar.is-on {
	opacity: 1;
}
@keyframes status-shimmer {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}
.composer {
	display: flex;
	gap: 0.5rem;
}
.composer textarea {
	flex: 1;
	min-height: 56px;
}

/* Live ingest + interactive dashboard */
.live-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	background: #e8f5e9;
	color: #1b5e20;
	border: 1px solid #a5d6a7;
	border-radius: 999px;
	padding: 0.2rem 0.65rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.live-pill::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #2e7d32;
	animation: pulse 1.2s infinite;
}
@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.35;
	}
}
.ingest-feed {
	max-height: 220px;
	overflow-y: auto;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.78rem;
	background: #0f1419;
	color: #d7e0ea;
	border-radius: 8px;
	padding: 0.75rem;
}
.ingest-feed .ev {
	margin-bottom: 0.35rem;
	border-bottom: 1px solid #243041;
	padding-bottom: 0.35rem;
}
.ingest-feed .ev strong {
	color: #ff8a80;
}
.row-table td,
.row-table th {
	font-size: 0.82rem;
	white-space: nowrap;
}
.dt-wrap {
	margin-top: 0.75rem;
}
.dt-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1rem;
	align-items: center;
	margin-bottom: 0.55rem;
}
.dt-toolbar label {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.85rem;
	margin: 0;
	color: var(--polri-brown);
	font-weight: 600;
}
.dt-toolbar input[type='search'] {
	min-width: 12rem;
	margin: 0;
	padding: 0.4rem 0.55rem;
}
.dt-toolbar select {
	margin: 0;
	padding: 0.35rem 0.45rem;
	width: auto;
}
.dt-info {
	margin-left: auto;
	font-size: 0.8rem;
	color: var(--polri-brown);
	font-weight: 600;
}
.dt-pager .muted {
	color: var(--polri-brown);
	font-weight: 600;
	font-size: 0.85rem;
}
.dt-scroll {
	overflow: auto;
}
.dt-pager {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.55rem;
	flex-wrap: wrap;
}
.dt-btn {
	padding: 0.35rem 0.7rem;
	font-size: 0.82rem;
}
th.dt-sortable {
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
}
th.dt-sortable:hover {
	color: var(--red, var(--polri-brown));
}
th.dt-sortable::after {
	content: ' ⇅';
	opacity: 0.35;
	font-size: 0.75em;
}
th.dt-asc::after {
	content: ' ↑';
	opacity: 1;
}
th.dt-desc::after {
	content: ' ↓';
	opacity: 1;
}
tr.dt-empty td {
	text-align: center;
	color: var(--muted);
	padding: 1rem;
}
.dash-board {
	margin-top: 0.75rem;
}
.dash-board.is-loading .dash-skel {
	display: grid;
}
.dash-skel {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 0.75rem;
}
.dash-skel-card {
	height: 140px;
	border-radius: 10px;
	background: linear-gradient(110deg, #eceff3 25%, #f7f8fa 40%, #eceff3 55%);
	background-size: 200% 100%;
	animation: skel-shine 1.25s ease-in-out infinite;
	border: 1px solid var(--border);
}
.dash-skel-card.tall {
	height: 180px;
	grid-column: span 1;
}
@keyframes skel-shine {
	0% {
		background-position: 100% 0;
	}
	100% {
		background-position: -100% 0;
	}
}
.dash-head {
	animation: dash-head-in 0.45s ease-out both;
}
@keyframes dash-head-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
.dash-head h2 {
	margin: 0 0 0.25rem;
	font-size: 1.15rem;
}
.dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 0.85rem;
	margin-top: 0.75rem;
}
.dash-card {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 0.85rem;
	min-height: 160px;
	box-shadow: 0 8px 24px rgba(26, 26, 26, 0.04);
	opacity: 0;
	transform: translateY(14px) scale(0.97);
	animation: dash-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.dash-card:nth-child(1) {
	animation-delay: 0.05s;
}
.dash-card:nth-child(2) {
	animation-delay: 0.12s;
}
.dash-card:nth-child(3) {
	animation-delay: 0.19s;
}
.dash-card:nth-child(4) {
	animation-delay: 0.26s;
}
.dash-card:nth-child(5) {
	animation-delay: 0.33s;
}
.dash-card:nth-child(6) {
	animation-delay: 0.4s;
}
@keyframes dash-card-in {
	to {
		opacity: 1;
		transform: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	.msg,
	.dash-card,
	.dash-head,
	.typing-dots span,
	.ai-status-bar,
	.dash-skel-card {
		animation: none !important;
		opacity: 1;
		transform: none;
	}
	.ai-status-bar.is-on {
		opacity: 0.5;
	}
}
.dash-card-title {
	font-size: 0.82rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--muted);
}
.dash-kpi span {
	display: block;
	font-size: 0.8rem;
	color: var(--muted);
}
.dash-kpi strong {
	font-size: 1.75rem;
	display: block;
	margin: 0.25rem 0;
}
.dash-kpi .up {
	color: #2e7d32;
}
.dash-kpi .down {
	color: #7a2e0e;
}
.ai-layout-wide {
	display: grid;
	grid-template-columns: minmax(220px, 280px) minmax(0, 1.05fr) minmax(0, 1.25fr);
	gap: 0.75rem;
	align-items: stretch;
}
.ai-rail {
	display: flex;
	flex-direction: column;
	min-height: 0;
	/* ponytail: clip di rail; scroll di .thread-list / .ai-side-scroll */
	overflow: hidden;
}
.thread-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	flex-shrink: 0;
}
.btn-sm {
	padding: 0.28rem 0.55rem;
	font-size: 0.8rem;
}
.thread-list {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	/* ponytail: % max-height gagal di flex → list terpotong tanpa scrollbar; pakai flex+vh */
	flex: 1 1 0;
	min-height: 8rem;
	max-height: none;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 0.65rem;
	padding-right: 2px;
}
.thread-item {
	position: relative;
	text-align: left;
	border: 1px solid var(--border);
	background: #fafbfc;
	border-radius: 8px;
	padding: 0.45rem 1.6rem 0.45rem 0.55rem;
	cursor: pointer;
	font: inherit;
	color: inherit;
}
.thread-item:hover {
	border-color: #c5cad3;
}
.thread-item.is-active {
	border-color: var(--nexus-accent);
	background: #fdecee;
}
.thread-item__title {
	display: block;
	font-size: 0.86rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.thread-item__meta {
	display: block;
	font-size: 0.72rem;
	color: var(--muted);
	margin-top: 0.15rem;
}
.thread-item__del {
	position: absolute;
	right: 0.35rem;
	top: 0.35rem;
	width: 1.25rem;
	height: 1.25rem;
	line-height: 1.15rem;
	text-align: center;
	border-radius: 4px;
	color: var(--muted);
	font-size: 1rem;
}
.thread-item__del:hover {
	background: #eee;
	color: var(--nexus-accent);
}
.chat-thread-meta {
	font-size: 0.82rem;
	margin-bottom: 0.4rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.case-fold {
	flex: 0 1 auto;
	min-height: 0;
	max-height: 42%;
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--border);
	padding-top: 0.45rem;
	overflow: hidden;
}
.case-fold > summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 0.88rem;
	margin-bottom: 0.35rem;
	list-style: none;
	flex-shrink: 0;
}
.case-fold > summary::-webkit-details-marker {
	display: none;
}
.case-fold[open] {
	flex: 0 1 42%;
}
.case-fold[open] .ai-side-scroll {
	flex: 1 1 auto;
	min-height: 0;
}
.ai-layout-wide > .card {
	margin-bottom: 0;
}
.ai-side-scroll {
	flex: 1;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
@media (min-width: 961px) {
	.ai-layout-wide {
		height: calc(100dvh - var(--app-top-h) - 1.5rem);
		min-height: 480px;
	}
	.ai-layout-wide > .card {
		display: flex;
		flex-direction: column;
		min-height: 0;
		overflow: hidden;
		padding: 0.85rem 1rem;
	}
	.ai-layout-wide .chat-log {
		flex: 1;
		min-height: 0;
		max-height: none;
		overflow-y: auto;
	}
	.ai-layout-wide #dash {
		flex: 1;
		min-height: 0;
		overflow: auto;
	}
	.ai-layout-wide .composer {
		flex-shrink: 0;
	}
	.ai-layout-wide > .ai-rail {
		overflow-y: auto;
	}
}
@media (max-width: 960px) {
	.ai-layout-wide {
		grid-template-columns: 1fr;
		height: auto;
	}
	/* tanpa tinggi viewport tetap: batasi list thread agar tetap bisa di-scroll */
	.ai-rail {
		overflow: visible;
		max-height: none;
	}
	.thread-list {
		flex: none;
		max-height: min(40vh, 280px);
	}
	.case-fold,
	.case-fold[open] {
		max-height: none;
		flex: none;
	}
	.case-fold[open] .ai-side-scroll {
		max-height: min(32vh, 240px);
	}
}

/* —— Nexus AI: dashboard tersimpan (Q&A terjawab) —— */
.saved-block {
	border-top: 1px solid var(--border);
	padding-top: 0.5rem;
	margin-bottom: 0.65rem;
	flex-shrink: 0;
	min-width: 0;
}
.saved-hint {
	font-size: 0.75rem;
	margin: 0 0 0.4rem;
}
.saved-filter {
	font-size: 0.75rem;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	cursor: pointer;
	white-space: nowrap;
}
.saved-list {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	max-height: min(26vh, 220px);
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.saved-item {
	text-align: left;
	border: 1px solid var(--border);
	background: #fffdf6;
	border-radius: 8px;
	padding: 0.45rem 0.55rem;
	cursor: pointer;
	font: inherit;
	color: inherit;
	min-width: 0;
}
.saved-item:hover {
	border-color: var(--polri-gold, #c9a227);
}
.saved-item__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.84rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.saved-item__meta {
	display: block;
	font-size: 0.72rem;
	color: var(--muted);
	margin-top: 0.15rem;
}
.ai-wilayah-chip {
	display: inline-block;
	max-width: 100%;
	font-size: 0.78rem;
	padding: 0.2rem 0.55rem;
	margin-bottom: 0.4rem;
	border-radius: 999px;
	border: 1px solid var(--polri-gold, #c9a227);
	background: color-mix(in srgb, var(--polri-gold, #c9a227) 12%, transparent);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ai-mtabs {
	display: none;
}
/* grid/flex children: izinkan menyusut (pre/tabel lebar tidak boleh melebarkan halaman) */
.ai-layout-wide > .card,
.ai-layout-wide .chat-log,
.ai-layout-wide .msg,
.ai-layout-wide .md,
.ai-layout-wide #dash {
	min-width: 0;
}
.ai-layout-wide .msg .md {
	overflow-wrap: anywhere;
}
.ai-layout-wide .msg .md pre {
	max-width: 100%;
	white-space: pre;
}
.ai-layout-wide .dash-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.ai-layout-wide .dash-card {
	min-width: 0;
}
.ai-layout-wide .dash-card canvas {
	max-width: 100%;
}

/* —— Mobile (≤960px): satu kolom, chat dulu, tab lompat, tanpa scroll horizontal —— */
@media (max-width: 960px) {
	.ai-layout-wide {
		grid-template-columns: minmax(0, 1fr);
	}
	.ai-chat-card {
		order: 1;
	}
	.ai-dash-card {
		order: 2;
	}
	.ai-rail {
		order: 3;
	}
	.ai-mtabs {
		display: flex;
		gap: 0.35rem;
		position: sticky;
		top: var(--app-top-h, 0px);
		z-index: 20;
		margin: 0 0 0.6rem;
		padding: 0.4rem 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		background: var(--bg, #fbf8ef);
	}
	.ai-mtabs::-webkit-scrollbar {
		display: none;
	}
	.ai-mtab {
		flex: 0 0 auto;
		padding: 0.45rem 0.8rem;
		border-radius: 999px;
		border: 1px solid var(--border);
		background: #fff;
		font-size: 0.85rem;
		font-weight: 600;
		color: inherit;
		text-decoration: none;
		min-height: 36px;
		display: inline-flex;
		align-items: center;
		gap: 0.3rem;
	}
	.ai-mtab__n:not(:empty) {
		background: var(--polri-gold, #c9a227);
		color: #1a1a1a;
		border-radius: 999px;
		font-size: 0.7rem;
		padding: 0 0.4rem;
	}
	.ai-layout-wide > .card {
		scroll-margin-top: calc(var(--app-top-h, 0px) + 3.2rem);
	}
	.thread-list {
		min-height: 0;
	}
	.chat-log {
		min-height: 220px;
		max-height: 60vh;
	}
	.msg {
		max-width: 100%;
	}
	.ai-layout-wide .composer {
		position: sticky;
		bottom: 0;
		z-index: 5;
		background: inherit;
		padding: 0.4rem 0 0.2rem;
	}
	.composer textarea {
		font-size: 16px; /* cegah auto-zoom iOS */
		min-height: 52px;
	}
	.ai-layout-wide .btn-row {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
	}
	.ai-layout-wide .btn-row .btn {
		flex: 1 1 40%;
		min-height: 40px;
	}
	.ai-layout-wide .chip {
		min-height: 34px;
	}
	.saved-list {
		max-height: none;
	}
}
@media (max-width: 480px) {
	.ai-layout-wide > .card {
		padding: 0.75rem 0.7rem;
	}
	.ai-layout-wide .msg .md table {
		font-size: 0.74rem;
	}
	.ai-layout-wide .dash-head h2 {
		font-size: 1rem;
	}
	.nexus-banner {
		font-size: 0.8rem;
	}
}

/* Bahasa awam (SPOK) di /analytics */
.ll-box {
	margin: 0.85rem 0 1rem;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--border);
	border-left: 4px solid var(--nexus-accent);
	background: linear-gradient(180deg, #fff8f7 0%, #fff 70%);
	border-radius: 8px;
}
.ll-box--gallery {
	border-left-color: #4a5160;
	background: linear-gradient(180deg, #f5f6f8 0%, #fff 70%);
}
.ll-box__title {
	margin: 0 0 0.55rem;
	font-size: 1.05rem;
	color: var(--nexus-ink);
}
.ll-box__dl {
	margin: 0;
	display: grid;
	gap: 0.65rem;
}
.ll-box__dl > div {
	display: grid;
	gap: 0.15rem;
}
.ll-box__dl dt {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--muted);
}
.ll-box__dl dd {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--text, #1a1f2c);
}
@media (min-width: 961px) {
	.ll-box__dl {
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}
}

.geo-layout {
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: 1rem;
	min-height: calc(100dvh - 4rem);
}
@media (max-width: 960px) {
	.geo-layout {
		grid-template-columns: 1fr;
	}
}
.geo-map-wrap {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(0, 0, 0, 0.08);
	min-height: 420px;
}
.geo-map-canvas {
	width: 100%;
	height: min(72vh, 640px);
}
.geo-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
}
.geo-breadcrumb--float {
	position: absolute;
	top: 0.65rem;
	left: 3.65rem; /* clear overlay layer rail (48px) */
	z-index: 2;
	margin: 0;
	max-width: min(62%, 28rem);
	padding: 0.4rem 0.7rem;
	border-radius: 10px;
	background: rgb(255 253 248 / 92%);
	border: 1px solid rgb(44 26 14 / 10%);
	box-shadow: 0 4px 16px rgb(44 26 14 / 10%);
	backdrop-filter: blur(8px);
	font-size: 0.82rem;
}
.geo-crumb {
	background: none;
	border: none;
	color: var(--polri-brown, #5c3a21);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.geo-crumb:hover {
	color: var(--polri-gold, #c9a227);
}
.geo-side .kpi {
	margin-bottom: 0.5rem;
}
.geo-demo-banner {
	background: #fff8e1;
	border: 1px solid #ffe082;
	color: #8a5b00;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	font-size: 0.85rem;
	margin-bottom: 0.75rem;
}
.future-layout {
	display: grid;
	grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
	gap: 0.75rem;
	min-height: 70vh;
	align-items: stretch;
}
@media (max-width: 800px) {
	.future-layout {
		grid-template-columns: 1fr;
	}
}
.future-rail {
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.future-menu-list {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}
.future-menu-item {
	display: block;
	width: 100%;
	text-align: left;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.65rem 0.75rem;
	background: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 0.9rem;
}
.future-menu-item:hover {
	border-color: var(--nexus-accent);
}
.future-menu-item.is-active {
	border-color: var(--nexus-accent);
	background: #fff5f5;
	font-weight: 600;
}
.future-canvas {
	min-height: 60vh;
	display: flex;
	flex-direction: column;
}
.future-canvas-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.future-canvas-placeholder {
	flex: 1;
	min-height: 320px;
	border: 1px dashed var(--border);
	border-radius: 8px;
	background: #fafbfc;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 0.95rem;
}
.future-canvas-slot {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}
.future-canvas-title[hidden] {
	display: none !important;
}

/* —— NIM: Inventori Satker & Geospatial Monitoring —— */
.nim-root {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	min-height: 0;
}
.nim-banner {
	background: #fff8e6;
	border: 1px solid #ffe082;
	color: #8a5b00;
	padding: 0.45rem 0.7rem;
	border-radius: 8px;
	font-size: 0.8rem;
}
.nim-head {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	align-items: stretch;
}
.nim-title {
	margin: 0;
	font-size: 1.05rem;
}
.nim-sub {
	margin: 0.15rem 0 0;
	font-size: 0.8rem;
}
.nim-subnav {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	width: 100%;
}
.nim-nav-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.55rem;
	padding: 0.4rem 0.55rem;
	background: #f8fafc;
	border: 1px solid var(--border);
	border-radius: 8px;
}
.nim-nav-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	flex: 1;
	min-width: 0;
}
.nim-tab {
	border: 1px solid var(--border);
	background: #fff;
	border-radius: 8px;
	padding: 0.35rem 0.7rem;
	font: inherit;
	font-size: 0.8rem;
	cursor: pointer;
	white-space: nowrap;
}
.nim-tab:hover {
	border-color: var(--nexus-accent);
}
.nim-tab.is-active {
	background: #fff5f5;
	border-color: var(--nexus-accent);
	font-weight: 600;
}
.nim-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.75rem;
	align-items: center;
	font-size: 0.82rem;
}
.nim-filters label {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--muted);
}
.nim-filters input,
.nim-filters select {
	font: inherit;
	font-size: 0.82rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 0.25rem 0.4rem;
	background: #fff;
}
.nim-search input {
	min-width: 140px;
}
.nim-body {
	min-height: 360px;
}
.nim-kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.5rem;
	margin-bottom: 0.65rem;
}
.nim-kpi {
	background: #fafafa;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.55rem 0.7rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.nim-kpi-label {
	font-size: 0.72rem;
	color: var(--muted);
	line-height: 1.25;
}
.nim-kpi-val {
	font-size: 1.15rem;
}
.nim-kpi-hint {
	font-size: 0.7rem;
}
.nim-chart-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
	margin-bottom: 0.65rem;
}
@media (max-width: 900px) {
	.nim-chart-grid {
		grid-template-columns: 1fr;
	}
}
.nim-chart-card,
.nim-panel {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.65rem 0.75rem;
}
.nim-chart-card h3,
.nim-panel h3 {
	margin: 0 0 0.45rem;
	font-size: 0.88rem;
}
.nim-chart-card canvas {
	max-height: 220px;
}
.nim-two-col {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
}
@media (max-width: 900px) {
	.nim-two-col {
		grid-template-columns: 1fr;
	}
}
.nim-table {
	font-size: 0.8rem;
}
.nim-table-wrap {
	overflow: auto;
	max-height: 420px;
}
.nim-sort {
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	color: inherit;
	text-align: left;
}
.nim-pager {
	display: flex;
	gap: 0.4rem;
	margin-top: 0.5rem;
}
.nim-map-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
	gap: 0.65rem;
	min-height: 420px;
}
@media (max-width: 900px) {
	.nim-map-layout {
		grid-template-columns: 1fr;
	}
}
.nim-map {
	height: 420px;
	border-radius: 8px;
	border: 1px solid var(--border);
	z-index: 0;
}
.nim-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 0.4rem;
	font-size: 0.78rem;
	color: var(--muted);
}
.nim-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: 0.2rem;
	vertical-align: middle;
}
.nim-dot.green {
	background: #059669;
}
.nim-dot.amber {
	background: #d97706;
}
.nim-dot.red {
	background: #9a3412;
}
.nim-dot.gray {
	background: #9ca3af;
}
.nim-map-side {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.75rem;
	background: #fafbfc;
	font-size: 0.85rem;
}
.nim-badge {
	display: inline-block;
	font-size: 0.72rem;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	margin-bottom: 0.35rem;
	font-weight: 600;
}
.nim-badge.green {
	background: #d1fae5;
	color: #065f46;
}
.nim-badge.amber {
	background: #fef3c7;
	color: #92400e;
}
.nim-badge.red {
	background: #fee2e2;
	color: #991b1b;
}
.nim-badge.gray {
	background: #e5e7eb;
	color: #374151;
}
.nim-section-title {
	margin: 0.35rem 0 0.45rem;
	font-size: 0.92rem;
}
.nim-sla-grid .nim-sla-card {
	background: #fafafa;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.55rem 0.7rem;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}
.nim-sla-card.ok {
	border-color: #86efac;
	background: #f0fdf4;
}
.nim-sla-card.bad {
	border-color: #d4a574;
	background: #f7f0dc;
}
.nim-bat-bar {
	position: relative;
	min-width: 72px;
	height: 1.05rem;
	background: #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
}
.nim-bat-fill {
	display: block;
	height: 100%;
	border-radius: 4px;
}
.nim-bat-fill.green {
	background: #059669;
}
.nim-bat-fill.amber {
	background: #d97706;
}
.nim-bat-fill.red {
	background: #9a3412;
}
.nim-bat-bar em {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-style: normal;
	font-size: 0.68rem;
	font-weight: 600;
	color: #111;
	mix-blend-mode: difference;
	color: #fff;
}
.nim-dl {
	margin: 0.5rem 0 0.75rem;
	display: grid;
	gap: 0.35rem;
}
.nim-dl div {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 0.35rem;
}
.nim-dl dt {
	color: var(--muted);
	margin: 0;
}
.nim-dl dd {
	margin: 0;
}
.nim-downtime-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem;
}
@media (max-width: 900px) {
	.nim-downtime-grid {
		grid-template-columns: 1fr;
	}
}
.nim-band.green {
	border-left: 4px solid #059669;
}
.nim-band.amber {
	border-left: 4px solid #d97706;
}
.nim-band.red {
	border-left: 4px solid #9a3412;
}
.nim-band.gray {
	border-left: 4px solid #9ca3af;
}
.nim-list {
	margin: 0;
	padding-left: 1.1rem;
	font-size: 0.82rem;
}
.nim-threshold-note {
	font-size: 0.82rem;
	margin-bottom: 0.5rem;
}
.nim-row-red td:first-child {
	box-shadow: inset 3px 0 0 #9a3412;
}
.nim-row-amber td:first-child {
	box-shadow: inset 3px 0 0 #d97706;
}
.nim-row-gray td:first-child {
	box-shadow: inset 3px 0 0 #9ca3af;
}

/* —— NIM governance extensions —— */
.nim-nav-group {
	display: inline-flex;
	align-items: center;
	flex: 0 0 6.75rem;
	padding: 0.2rem 0.15rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted, #6b7280);
}
.nim-gov-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
	margin: 0.5rem 0 0.85rem;
}
.nim-gov-toolbar label {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
	font-size: 0.82rem;
}
.nim-gov-toolbar select,
.nim-gov-toolbar input,
.nim-site-detail input,
.nim-site-detail select,
.nim-site-detail textarea,
.nim-panel input,
.nim-panel select,
.nim-panel textarea {
	font: inherit;
	padding: 0.3rem 0.45rem;
	border: 1px solid var(--border, #d1d5db);
	border-radius: 6px;
	background: #fff;
	max-width: 100%;
}
.nim-site-detail label,
.nim-panel label {
	display: block;
	margin: 0.45rem 0;
	font-size: 0.82rem;
}
.nim-risk-weights .nim-filters {
	margin-top: 0.35rem;
}

/* Workflow Builder (DEMO) */
.wf-banner,
.wf-banner-test {
	background: #fff7ed;
	border: 1px solid #fdba74;
	color: #9a3412;
	padding: 0.55rem 0.75rem;
	border-radius: 6px;
	font-size: 0.82rem;
	margin-bottom: 0.75rem;
}
.wf-banner-test {
	background: #eff6ff;
	border-color: #93c5fd;
	color: #1e3a8a;
}
.wf-env {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	background: #fef3c7;
	color: #92400e;
}
.wf-layout {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) minmax(280px, 1.2fr);
	gap: 0.85rem;
}
@media (max-width: 900px) {
	.wf-layout {
		grid-template-columns: 1fr;
	}
}
.wf-graph {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0.5rem 0 1rem;
}
.wf-node {
	position: relative;
	border: 1px solid var(--border, #d1d5db);
	border-left: 3px solid #0f766e;
	border-radius: 8px;
	padding: 0.55rem 0.7rem 0.65rem;
	background: #f8fafc;
}
.wf-node-type {
	display: block;
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #64748b;
}
.wf-node-id {
	font-size: 0.72rem;
	margin-left: 0.35rem;
}
.wf-node-edges {
	display: block;
	font-size: 0.75rem;
	margin-top: 0.25rem;
}
.wf-arrow {
	display: block;
	text-align: center;
	color: #94a3b8;
	font-size: 0.9rem;
	line-height: 1;
	margin-top: 0.2rem;
}
.wf-json textarea {
	width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.75rem;
	margin: 0.5rem 0;
}
.wf-pre {
	margin: 0;
	white-space: pre-wrap;
	word-break: break-word;
	font-size: 0.7rem;
	max-width: 220px;
}
.wf-err {
	color: #b91c1c;
}
.wf-toolbar {
	margin-bottom: 0.5rem;
}

/* —— Nexus Bhayangkara D0–D7 —— */
.side-access-chip {
	display: inline-block;
	margin: 0.35rem 0.85rem 0.5rem;
	padding: 0.2rem 0.55rem;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #2c1a0e;
	background: linear-gradient(135deg, #e8c547, #c9a227);
	border-radius: 999px;
}
.app-user-badge {
	font-size: 0.7rem;
	color: #c9a227;
	font-weight: 600;
}
.nexus-banner {
	margin: 0 0 1rem;
	padding: 0.55rem 0.85rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #f5efe6;
	background: linear-gradient(90deg, #2c1a0e, #5c3a21 55%, #3d2a1a);
	border-left: 3px solid #c9a227;
	border-radius: 0 8px 8px 0;
}
.inv-search-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inv-search {
	flex: 1;
	min-width: 180px;
	padding: 0.65rem 0.85rem;
	border: 1px solid #d4b896;
	border-radius: 10px;
	background: #fffdf8;
	font: inherit;
}
.inv-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.75rem;
	margin-top: 1rem;
}
.inv-card {
	display: block;
	padding: 0.85rem;
	border: 1px solid #e8d5b5;
	border-radius: 12px;
	background: #fffdf8;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.inv-card:hover { border-color: #c9a227; box-shadow: 0 4px 16px rgba(92, 58, 33, 0.08); }
.inv-card--person { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; }
.inv-siluet { border-radius: 12px; background: #2c1a0e; flex-shrink: 0; }
.inv-siluet--lg { width: 96px; height: 96px; border-radius: 16px; }
.badge-TINGGI { background: #c9a227; color: #2c1a0e; }
.badge-SEDANG { background: #e8d5b5; color: #5c3a21; }
.badge-RENDAH { background: #d4b896; color: #3d2a1a; }
.inv-capture-grid, .inv-analysis-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 1rem;
}
@media (max-width: 900px) {
	.inv-capture-grid, .inv-analysis-grid { grid-template-columns: 1fr; }
}
.inv-cam-frame {
	position: relative;
	aspect-ratio: 3/4;
	max-height: 70vh;
	background: #1a1008;
	border-radius: 16px;
	overflow: hidden;
}
.inv-cam-frame video, .inv-cam-frame canvas { width: 100%; height: 100%; object-fit: cover; }
.inv-cam-placeholder {
	position: absolute; inset: 0; display: grid; place-items: center;
	color: #d4b896; font-size: 0.9rem; text-align: center; padding: 1rem;
}
.inv-boxes { position: absolute; inset: 0; pointer-events: none; }
.inv-box {
	position: absolute;
	border: 2px solid #e8c547;
	color: #f5efe6;
	font-size: 0.65rem;
	padding: 0.1rem 0.25rem;
	background: rgba(44, 26, 14, 0.65);
}
.inv-modal { border: none; border-radius: 16px; padding: 0; max-width: 420px; width: calc(100% - 2rem); }
.inv-modal::backdrop { background: rgba(44, 26, 14, 0.55); }
.inv-modal__inner { padding: 1.25rem; }
.geo-layout--drawer { align-items: stretch; }
.geo-drawer { max-height: 70vh; overflow: auto; }
.geo-drawer.geo-drawer--hud { max-height: none; }
.geo-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.75rem 0; }
.brief-shell { min-height: 60vh; }
.brief-hero h1 { letter-spacing: 0.02em; }
.brief-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}
@media (max-width: 1100px) { .brief-grid { grid-template-columns: 1fr; } }
.brief-panel--alert {
	/* teks default gelap agar toolbar/paginasi di zona cream terbaca */
	background: linear-gradient(160deg, #2c1a0e 0%, #3d2a1a 40%, #f5efe6 40%);
	color: var(--ink);
}
.brief-panel--alert > h2 {
	color: #f5efe6;
}
.brief-panel--alert > .muted {
	/* hanya lead di zona gelap header */
	color: #e8d5b5;
}
.brief-panel--alert .dt-wrap,
.brief-panel--alert .data-table {
	color: var(--ink);
	background: #fffdf8;
	border-radius: 8px;
}
.brief-panel--alert .dt-toolbar,
.brief-panel--alert .dt-pager,
.brief-panel--alert .dt-info,
.brief-panel--alert .dt-pager .muted {
	color: var(--polri-brown);
}
.brief-panel--alert .btn.secondary {
	color: var(--polri-brown);
	background: #fff;
	border-color: #d4c4a8;
}
.chip.is-on, .chip.is-active { background: #c9a227; color: #2c1a0e; border-color: #a67c2a; }
.ai-mode-chip { margin-bottom: 0.25rem; }

/* —— O0b public shell + O1 Vision HUD + CCTV —— */
.public-body {
	min-height: 100dvh;
	margin: 0;
	background:
		radial-gradient(1200px 600px at 10% -10%, rgba(201, 162, 39, 0.18), transparent 55%),
		linear-gradient(165deg, #f7f0dc 0%, #efe4c8 40%, #f5efe6 100%);
	color: #2c1a0e;
	font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
.public-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 1.25rem;
	border-bottom: 1px solid rgba(44, 26, 14, 0.1);
	background: rgba(255, 253, 248, 0.85);
	backdrop-filter: blur(8px);
	position: sticky;
	top: 0;
	z-index: 20;
}
.public-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: inherit;
	text-decoration: none;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.public-brand em { font-style: normal; color: #8a6a1f; }
.public-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem 1rem;
	font-size: 0.92rem;
	margin-left: auto;
}
.public-nav a { color: #5c3a21; text-decoration: none; }
.public-nav a.is-active { color: #2c1a0e; font-weight: 600; border-bottom: 2px solid #c9a227; }
.public-body {
	--pub-bg: #f7f0dc;
	--pub-text: #2c1a0e;
	--pub-muted: #5c4a38;
	--pub-accent: #8b5a14;
	--pub-card: rgba(255, 253, 248, 0.94);
	--pub-border: rgba(44, 26, 14, 0.1);
}
.public-main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.public-main.public-main--bleed {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
	padding-bottom: 2rem;
}
.public-main--bleed .pub-geo__hero,
.public-main--bleed .pub-geo-chips,
.public-main--bleed .pub-geo__foot {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}
.public-foot { text-align: center; padding: 1.5rem; font-size: 0.85rem; }
.public-hero h1 {
	font-size: clamp(2rem, 5vw, 3rem);
	margin: 0.25rem 0 0.5rem;
	letter-spacing: -0.02em;
}
.public-hero h1 em { font-style: normal; color: #8a6a1f; }
.public-kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: #8a6a1f; margin: 0; }
.public-lead { font-size: 1.15rem; max-width: 36rem; }
.pub-hero-cta { margin-top: 1.25rem; gap: 0.5rem; flex-wrap: wrap; }
.pub-mini-kpi {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
	margin: 1.25rem 0 0;
	max-width: 36rem;
}
.pub-mini-kpi__item {
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	background: var(--pub-card);
	border: 1px solid var(--pub-border);
}
.pub-mini-kpi__item span {
	display: block;
	font-size: 0.72rem;
	color: var(--pub-muted);
	margin-bottom: 0.15rem;
}
.pub-mini-kpi__item strong {
	font-size: 1.05rem;
	color: var(--pub-text);
	font-variant-numeric: tabular-nums;
}
.public-pillars {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.85rem;
	margin: 2rem 0;
}
@media (max-width: 900px) {
	.public-pillars { grid-template-columns: 1fr 1fr; }
	.pub-mini-kpi { grid-template-columns: 1fr; max-width: none; }
}
.public-pillars article {
	padding: 1rem 1.1rem;
	border-radius: 12px;
	background: rgba(255, 253, 248, 0.9);
	border: 1px solid rgba(44, 26, 14, 0.08);
}
.public-pillars h2 { margin: 0 0 0.35rem; font-size: 0.95rem; letter-spacing: 0.08em; color: #8a6a1f; }
.public-pillars p { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.public-module-list { margin: 0.5rem 0 0; padding-left: 1.1rem; line-height: 1.7; }

/* U0–U3: kartu pilar · stats · katalog · peta publik */
.pub-pillar-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.85rem;
	margin: 0 0 2rem;
}
.pub-pillar-card {
	display: block;
	padding: 1.1rem 1.15rem;
	border-radius: 14px;
	background: var(--pub-card);
	border: 1px solid var(--pub-border);
	color: inherit;
	text-decoration: none;
	transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.pub-pillar-card:hover {
	border-color: rgba(201, 162, 39, 0.55);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(44, 26, 14, 0.08);
}
.pub-pillar-card__kicker {
	display: block;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #8a6a1f;
	margin-bottom: 0.35rem;
}
.pub-pillar-card h2 {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
	color: var(--pub-text);
}
.pub-pillar-card p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: var(--pub-muted);
}
.pub-stat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.85rem;
	margin: 0 0 1.25rem;
}
.pub-stat-card {
	padding: 1rem 1.1rem;
	border-radius: 14px;
	background: var(--pub-card);
	border: 1px solid var(--pub-border);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.pub-stat-card span {
	font-size: 0.78rem;
	color: var(--pub-muted);
}
.pub-stat-card strong {
	font-size: clamp(1.45rem, 3vw, 1.85rem);
	color: #5c3a21;
	font-variant-numeric: tabular-nums;
	line-height: 1.1;
}
.pub-stat-card small {
	font-size: 0.72rem;
	color: var(--pub-muted);
}
.pub-stat-card--side p {
	margin: 0.35rem 0 0;
	font-size: 0.9rem;
	color: var(--pub-muted);
	line-height: 1.45;
}
.pub-chart-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem;
	margin-bottom: 1.25rem;
	opacity: 0.96;
}
.pub-chart-grid.is-ready {
	animation: pub-fade-in 0.45s ease both;
}
.pub-chart-card {
	padding: 1rem 1.1rem 1.15rem;
	border-radius: 14px;
	background: var(--pub-card);
	border: 1px solid var(--pub-border);
}
.pub-chart-card h2 {
	margin: 0 0 0.65rem;
	font-size: 1rem;
	color: var(--pub-text);
}
.pub-chart-wrap {
	position: relative;
	height: min(280px, 42vh);
	min-height: 220px;
}
.pub-chart-fallback { margin: 0.75rem 0 0; padding-left: 1.1rem; line-height: 1.55; }
.pub-stat-side {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
}
.pub-stat-side .pub-stat-card { flex: 1 1 240px; }
.pub-cat-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.pub-cat-search {
	flex: 1 1 220px;
	min-width: 0;
	padding: 0.55rem 0.75rem;
	border-radius: 10px;
	border: 1px solid var(--pub-border);
	background: #fffdf8;
	color: var(--pub-text);
	font: inherit;
}
.pub-cat-search::placeholder { color: #6b5845; }
.pub-cat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 0.85rem;
	margin-bottom: 1.25rem;
}
.pub-cat-card {
	padding: 1rem 1.05rem;
	border-radius: 14px;
	background: var(--pub-card);
	border: 1px solid var(--pub-border);
}
.pub-cat-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.45rem;
}
.pub-cat-card h2 {
	margin: 0 0 0.3rem;
	font-size: 1rem;
	color: var(--pub-text);
}
.pub-badge {
	font-size: 0.68rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	background: rgba(201, 162, 39, 0.18);
	color: #5c3a21;
	font-weight: 600;
}
.pub-cat-table { margin-bottom: 1rem; }
.pub-cat-table summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--pub-text);
	margin-bottom: 0.75rem;
}
.pub-cat-cta { margin-top: 0.5rem; }
.pub-geo { position: relative; }
.pub-geo-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0 0 0.85rem;
}
.pub-geo-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.35rem 0.7rem;
	border-radius: 999px;
	background: var(--pub-card);
	border: 1px solid var(--pub-border);
	font-size: 0.85rem;
	color: var(--pub-muted);
}
.pub-geo-chip strong {
	color: #5c3a21;
	font-variant-numeric: tabular-nums;
}
.pub-geo-panel {
	position: absolute;
	top: 7.5rem;
	right: 1.25rem;
	z-index: 12;
	width: min(300px, calc(100% - 2rem));
	padding: 0;
	border-radius: 14px;
	background: rgba(18, 14, 10, 0.92);
	backdrop-filter: blur(12px);
	color: #f5efe6;
	border: 1px solid rgba(245, 239, 230, 0.18);
	box-shadow: 0 12px 28px rgba(8, 4, 2, 0.45);
}
.pub-geo-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.85rem 0.95rem 0.35rem;
}
.pub-geo-panel__head h2 {
	margin: 0;
	font-size: 1.05rem;
	color: #ffe566;
}
.pub-geo-panel__close {
	appearance: none;
	border: 0;
	background: transparent;
	color: #f0e6d4;
	font-size: 1.05rem;
	cursor: pointer;
	line-height: 1;
	padding: 0.15rem;
	opacity: 0.9;
}
.pub-geo-panel__close:hover { color: #ffe566; opacity: 1; }
.pub-geo-panel__body { padding: 0.35rem 0.95rem 0.65rem; }
/* Override .kpi span / .muted gelap (cream theme) di atas panel gelap */
.pub-geo-panel__body .kpi {
	background: transparent;
	border: 0;
	padding: 0.35rem 0;
	color: #e8dcc8;
}
.pub-geo-panel__body .kpi span {
	color: #e8dcc8;
	font-weight: 500;
}
.pub-geo-panel__body .kpi strong {
	color: #ffe566;
	font-size: 1.25rem;
}
.pub-geo-panel .muted,
.pub-geo-panel__body .muted,
#pub-geo-note {
	color: #d2c4ae !important;
}
.pub-geo-panel__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	padding: 0.55rem 0.95rem 0.95rem;
}
.pub-geo-panel__foot .btn.secondary {
	background: rgba(245, 239, 230, 0.12);
	color: #f5efe6;
	border-color: rgba(245, 239, 230, 0.28);
}
.pub-geo-panel__foot .btn.secondary:hover {
	background: rgba(245, 239, 230, 0.2);
	color: #fff;
}
.pub-geo__foot { margin-top: 0.85rem; }
@keyframes pub-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pub-pillar-card { transition: none; }
	.pub-pillar-card:hover { transform: none; }
	.pub-chart-grid.is-ready { animation: none; }
}
@media (max-width: 900px) {
	.pub-pillar-cards,
	.pub-stat-grid,
	.pub-chart-grid { grid-template-columns: 1fr; }
	.pub-geo-panel {
		position: fixed;
		left: max(0.65rem, env(safe-area-inset-left));
		right: max(0.65rem, env(safe-area-inset-right));
		top: auto;
		bottom: max(0.65rem, env(safe-area-inset-bottom));
		width: auto;
		max-height: min(42vh, 320px);
		overflow: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 20;
	}
}
/* /geo/public — mobile: peta full-bleed, kontrol layer (basemap) tetap ketuk */
@media (max-width: 720px) {
	.pub-geo__hero {
		margin-bottom: 0.35rem;
		padding-top: 0.15rem;
	}
	.pub-geo__hero h1 {
		font-size: 1.2rem;
		margin: 0 0 0.2rem;
		line-height: 1.25;
	}
	.pub-geo__hero p {
		font-size: 0.82rem;
		margin: 0;
		line-height: 1.35;
	}
	.pub-geo-chips {
		gap: 0.35rem;
		margin-bottom: 0.5rem;
	}
	.pub-geo-chip {
		padding: 0.28rem 0.55rem;
		font-size: 0.78rem;
	}
	.geo-map-wrap--public {
		min-height: calc(100dvh - 11.5rem);
		/* ponytail: biarkan flyout/toolbar tidak ketimpa clip ketat */
		overflow: visible;
	}
	.geo-map-wrap--public .geo-map-canvas {
		height: calc(100dvh - 11.5rem);
		min-height: 260px;
		border-radius: 0;
	}
	.geo-map-wrap--public .geo-basemap,
	.geo-map-wrap--public .geo-legend {
		pointer-events: auto;
	}
	.pub-geo__foot {
		font-size: 0.78rem;
		margin-top: 0.65rem;
		padding-bottom: env(safe-area-inset-bottom);
	}
}
@media (max-width: 640px) {
	.public-nav {
		overflow-x: auto;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.15rem;
	}
	.public-pillars { grid-template-columns: 1fr; }
	.public-top {
		padding-left: max(0.75rem, env(safe-area-inset-left));
		padding-right: max(0.75rem, env(safe-area-inset-right));
	}
}
.side-foot {
	margin-top: auto;
	padding: 0.5rem 0 0.85rem;
	border-top: 1px solid rgba(245, 239, 230, 0.08);
}
.side-public-link { padding: 0.65rem 1rem 0.35rem; font-size: 0.8rem; margin: 0; }
.side-public-link a {
	/* #8a6a1f di sidebar gelap hanya ~3.3:1 */
	color: #e8c547;
}
.side-public-link a:hover {
	color: #f5efe6;
}
.side-ver {
	margin: 0;
	padding: 0.15rem 1rem 0.35rem;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: #c4b59a;
	font-variant-numeric: tabular-nums;
}
.public-foot .app-ver {
	color: #5c3a21;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
/* ponytail: proses publik stale (HTML lama) tetap tampilkan versi dari CSS disk */
.public-foot:not(:has(.app-ver))::after {
	content: ' · v0.5.7';
	color: #5c3a21;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.sidebar:not(:has(.side-ver)) .side-public-link::after {
	content: 'v0.5.7';
	display: block;
	margin-top: 0.35rem;
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	color: #c4b59a;
	font-variant-numeric: tabular-nums;
}

/* —— Vision HUD: penuh sisa viewport di bawah app-top —— */
.wrap--hud {
	max-width: none;
	padding: 0 !important;
	margin: 0;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}
.app-body--compact:has(.wrap--hud) .app-frame {
	min-height: 100dvh;
	max-height: 100dvh;
	overflow: hidden;
}
.app-body--compact:has(.wrap--hud) .app-top {
	flex-shrink: 0;
}
.geo-hud {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	height: calc(100dvh - var(--app-top-h));
}
.geo-hud .nexus-banner { margin: 0.5rem 0.75rem; flex-shrink: 0; }
.geo-hud__stage {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	min-height: 0;
	height: 100%;
	position: relative;
}
/* Overlay layer rail — pola Osiris (glass strip + flyout), palet Nexus */
.geo-layer-rail--overlay {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 5;
	width: 48px;
	padding: 0;
	margin: 0;
	pointer-events: none;
	background: transparent;
	border: none;
	overflow: visible;
	color: #f5efe6;
	font-size: 0.82rem;
	display: block;
}
.geo-layer-rail__strip {
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	width: 48px;
	height: 100%;
	padding: 0.65rem 0 0.75rem;
	background: rgb(20 12 8 / 42%);
	backdrop-filter: blur(22px) saturate(1.25);
	-webkit-backdrop-filter: blur(22px) saturate(1.25);
	border-right: 1px solid rgb(255 255 255 / 8%);
	box-shadow: 4px 0 24px rgb(0 0 0 / 18%);
}
.geo-layer-rail__brand {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: grid;
	place-items: center;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #1a120a;
	background: linear-gradient(145deg, #e2c46a, #c9a227);
	box-shadow: 0 0 12px rgb(201 162 39 / 35%);
	margin-bottom: 0.35rem;
	flex-shrink: 0;
}
.geo-layer-rail__groups {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	min-height: 0;
}
.geo-layer-group {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}
.geo-layer-ico {
	position: relative;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 10px;
	background: transparent;
	color: rgb(255 255 255 / 28%);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.geo-layer-ico:hover,
.geo-layer-ico.is-open {
	background: rgb(255 255 255 / 8%);
	color: rgb(255 255 255 / 55%);
}
.geo-layer-ico.is-live {
	color: rgb(255 253 248 / 82%);
	filter: drop-shadow(0 0 5px rgb(201 162 39 / 45%));
}
.geo-layer-ico:focus-visible {
	outline: none;
	box-shadow: 0 0 0 1px rgb(255 255 255 / 40%);
}
.geo-layer-ico__badge {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 13px;
	height: 13px;
	padding: 0 3px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	font-size: 0.58rem;
	font-variant-numeric: tabular-nums;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	line-height: 1;
	background: #c9a227;
	color: #1a120a;
	box-shadow: 0 0 6px rgb(201 162 39 / 55%);
}
.geo-layer-flyout {
	position: absolute;
	left: 52px;
	top: 0;
	min-width: 248px;
	padding: 0.7rem 0.65rem;
	border-radius: 14px;
	z-index: 20;
	pointer-events: auto;
	background: rgb(18 11 7 / 78%);
	backdrop-filter: blur(36px) saturate(1.4);
	-webkit-backdrop-filter: blur(36px) saturate(1.4);
	border: 1px solid rgb(255 255 255 / 8%);
	box-shadow: 0 12px 40px rgb(0 0 0 / 45%);
	animation: geo-fly-in 0.18s ease-out;
}
.geo-layer-group[data-group="ops"] .geo-layer-flyout {
	top: 50%;
	transform: translateY(-50%);
	animation-name: geo-fly-in-ops;
}
@keyframes geo-fly-in {
	from { opacity: 0; transform: translateX(-6px); filter: blur(3px); }
	to { opacity: 1; transform: translateX(0); filter: blur(0); }
}
@keyframes geo-fly-in-ops {
	from { opacity: 0; transform: translateY(-50%) translateX(-6px); filter: blur(3px); }
	to { opacity: 1; transform: translateY(-50%) translateX(0); filter: blur(0); }
}
.geo-layer-flyout__head {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.45rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid rgb(255 255 255 / 6%);
	font-size: 0.62rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgb(255 255 255 / 38%);
}
.geo-layer-flyout__head span { flex: 1; }
.geo-layer-flyout__all,
.geo-layer-flyout__close {
	border: none;
	background: transparent;
	color: rgb(255 255 255 / 40%);
	font: inherit;
	font-size: 0.62rem;
	letter-spacing: 0.12em;
	padding: 0.2rem 0.4rem;
	border-radius: 6px;
	cursor: pointer;
}
.geo-layer-flyout__all:hover,
.geo-layer-flyout__close:hover {
	color: #fff;
	background: rgb(255 255 255 / 10%);
}
.geo-layer-row {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0;
	padding: 0.45rem 0.35rem;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	text-align: left;
	cursor: pointer;
	font: inherit;
	transition: background 0.2s ease;
}
.geo-layer-row:hover { background: rgb(255 255 255 / 6%); }
.geo-layer-row:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%);
}
.geo-layer-sw {
	position: relative;
	flex-shrink: 0;
	width: 28px;
	height: 14px;
	border-radius: 999px;
	border: 1px solid rgb(255 255 255 / 14%);
	background: transparent;
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.geo-layer-sw::after {
	content: '';
	position: absolute;
	top: 1px;
	left: 2px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgb(255 255 255 / 22%);
	transition: left 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.22s ease, box-shadow 0.22s ease;
}
.geo-layer-row.is-on .geo-layer-sw {
	background: rgb(201 162 39 / 22%);
	border-color: rgb(201 162 39 / 55%);
	box-shadow: 0 0 8px rgb(201 162 39 / 25%);
}
.geo-layer-row.is-on .geo-layer-sw::after {
	left: 15px;
	background: rgb(255 253 248 / 92%);
	box-shadow: 0 0 6px rgb(201 162 39 / 45%);
}
.geo-layer-row__txt {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}
.geo-layer-row__txt strong {
	font-size: 0.72rem;
	font-weight: 600;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgb(255 255 255 / 38%);
}
.geo-layer-row.is-on .geo-layer-row__txt strong { color: rgb(255 253 248 / 82%); }
.geo-layer-row__txt em {
	font-style: normal;
	font-size: 0.68rem;
	line-height: 1.3;
	color: rgb(255 255 255 / 32%);
}
.geo-layer-row.is-on .geo-layer-row__txt em { color: rgb(255 255 255 / 48%); }
.geo-layer-row__n {
	flex-shrink: 0;
	font-size: 0.68rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-variant-numeric: tabular-nums;
	color: rgb(255 255 255 / 22%);
}
.geo-layer-row.is-on .geo-layer-row__n { color: rgb(255 255 255 / 48%); }
.geo-layer-rail__hint {
	margin: auto 0 0;
	padding: 0;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 0.58rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	opacity: 0.45;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.geo-map-wrap--hud {
	position: relative;
	border-radius: 0;
	border: none;
	min-height: 0;
	height: 100%;
	overflow: hidden; /* canvas clip; flyout tetap di dalam bounds peta */
	background: #d9cbb0;
}
.geo-map-wrap--hud .geo-layer-rail--overlay {
	/* pastikan di atas canvas MapLibre */
	z-index: 5;
}
.geo-map-canvas--hud {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
}
.geo-map-wrap--public {
	position: relative;
	min-height: 520px;
	width: 100%;
	overflow: hidden;
	border-radius: 0;
	border-top: 1px solid rgba(44, 26, 14, 0.08);
	border-bottom: 1px solid rgba(44, 26, 14, 0.08);
	background: #0d1117;
}
.geo-map-wrap--public .geo-map-canvas {
	height: min(78vh, 720px);
	min-height: 420px;
}
.geo-map-wrap--dark .geo-map-canvas,
.geo-map-wrap--hud .geo-map-canvas {
	background: #0d1117;
}
.geo-map-status {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 6;
	padding: 0.65rem 1rem;
	border-radius: 10px;
	background: rgba(18, 14, 10, 0.9);
	border: 1px solid rgba(245, 239, 230, 0.18);
	color: #f0e6d4;
	font-size: 0.9rem;
	pointer-events: none;
}
.geo-map-wrap--light .geo-map-status {
	background: rgba(255, 253, 248, 0.92);
	border-color: rgba(44, 26, 14, 0.12);
	color: #5c3a21;
}
.geo-map-status.is-error { color: #ff8a7a; }
.geo-basemap {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 8;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	justify-content: flex-end;
	pointer-events: none;
}
.geo-map-wrap--hud .geo-basemap {
	top: 0.75rem;
	right: 4.25rem;
}
.geo-basemap__group {
	display: inline-flex;
	gap: 0;
	pointer-events: auto;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(245, 239, 230, 0.22);
	background: rgba(12, 10, 8, 0.82);
	backdrop-filter: blur(8px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}
.geo-basemap__btn {
	appearance: none;
	border: 0;
	margin: 0;
	padding: 0.38rem 0.62rem;
	background: transparent;
	color: #d9cbb3;
	font: inherit;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	border-right: 1px solid rgba(245, 239, 230, 0.12);
}
.geo-basemap__btn:last-child { border-right: 0; }
.geo-basemap__btn:hover { color: #ffe566; background: rgba(245, 239, 230, 0.06); }
.geo-basemap__btn.is-on {
	color: #12100c;
	background: #e8c547;
}
.geo-legend {
	position: absolute;
	/* kanan bawah — kiri bawah dipakai NavigationControl */
	right: 0.85rem;
	left: auto;
	bottom: 0.85rem;
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.4rem 0.65rem;
	border-radius: 10px;
	background: rgba(12, 10, 8, 0.86);
	border: 1px solid rgba(245, 239, 230, 0.18);
	font-size: 0.72rem;
	color: #e8dcc8;
	pointer-events: none;
}
.geo-map-wrap--light .geo-legend {
	background: rgba(255, 253, 248, 0.92);
	border-color: rgba(44, 26, 14, 0.12);
	color: #5c3a21;
}
.geo-legend__bar {
	display: inline-block;
	width: 96px;
	height: 10px;
	border-radius: 999px;
	/* hijau → kuning → merah (parah) */
	background: linear-gradient(90deg, #1b8a4a, #c5d63a, #f0c419, #e07a2f, #c0392b);
}
.geo-hover-tip {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 7;
	padding: 0.35rem 0.55rem;
	border-radius: 8px;
	background: rgba(12, 10, 8, 0.92);
	color: #f5efe6;
	font-size: 0.78rem;
	pointer-events: none;
	white-space: nowrap;
	max-width: min(260px, 70vw);
	overflow: hidden;
	text-overflow: ellipsis;
}
/* Dossier overlay — pola Osiris region dossier (glass), palet Nexus */
.geo-drawer--overlay {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	bottom: 0.75rem;
	z-index: 8;
	width: min(360px, calc(100% - 4.5rem));
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	pointer-events: auto;
	color: #f5efe6;
	background: rgb(28 18 10 / 82%);
	backdrop-filter: blur(18px) saturate(1.15);
	-webkit-backdrop-filter: blur(18px) saturate(1.15);
	border: 1px solid rgb(201 162 39 / 28%);
	border-radius: 14px;
	box-shadow:
		0 18px 48px rgb(0 0 0 / 45%),
		inset 0 1px 0 rgb(255 255 255 / 6%);
	min-height: 0;
	max-height: none;
	overflow: hidden;
	opacity: 0;
	transform: translateX(12px) scale(0.98);
	transition: opacity 0.22s ease, transform 0.22s ease;
}
.geo-drawer--overlay[hidden],
.geo-cam-panel[hidden] {
	display: none !important;
}
.geo-drawer--overlay.is-open {
	opacity: 1;
	transform: translateX(0) scale(1);
}
.geo-drawer--overlay .muted { color: rgb(245 239 230 / 55%); }
.geo-drawer__head {
	flex-shrink: 0;
	padding: 0.75rem 0.9rem 0.35rem;
}
.geo-drawer__head-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}
.geo-drawer__kicker {
	margin: 0;
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	color: #c9a227;
	font-weight: 700;
}
.geo-drawer__close {
	appearance: none;
	border: 1px solid rgb(255 255 255 / 12%);
	background: rgb(255 255 255 / 6%);
	color: #f5efe6;
	width: 1.7rem;
	height: 1.7rem;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.85rem;
	line-height: 1;
}
.geo-drawer__close:hover { border-color: #c9a227; color: #c9a227; }
.geo-drawer__title {
	margin: 0 0 0.2rem;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.3;
	color: #fffdf8;
}
.geo-drawer__sub {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.35;
}
.geo-drawer--overlay .geo-tabs {
	flex-shrink: 0;
	margin: 0.35rem 0.9rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgb(255 255 255 / 8%);
	display: flex;
	flex-wrap: nowrap;
	gap: 0.3rem;
	overflow-x: auto;
	scrollbar-width: thin;
}
.geo-drawer--overlay .geo-tabs .chip {
	flex: 0 0 auto;
	white-space: nowrap;
	font-size: 0.72rem;
	padding: 0.28rem 0.5rem;
	background: rgb(255 255 255 / 6%);
	border: 1px solid rgb(255 255 255 / 10%);
	color: rgb(245 239 230 / 78%);
}
.geo-drawer--overlay .geo-tabs .chip.is-on {
	background: rgb(201 162 39 / 22%);
	border-color: rgb(201 162 39 / 45%);
	color: #f5efe6;
}
.geo-drawer__body {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 0.75rem 0.9rem;
	-webkit-overflow-scrolling: touch;
}
.geo-drawer__foot {
	flex-shrink: 0;
	margin: 0;
	padding: 0.65rem 0.9rem 0.85rem;
	gap: 0.4rem;
	flex-wrap: wrap;
	border-top: 1px solid rgb(255 255 255 / 8%);
	background: rgb(0 0 0 / 22%);
}
.geo-drawer--overlay .geo-drawer__foot .btn {
	font-size: 0.72rem;
	padding: 0.35rem 0.55rem;
}
.geo-spark {
	display: block;
	width: 100%;
	height: 48px;
	margin-top: 0.5rem;
}
.geo-tab-panel .kpi {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid rgb(255 255 255 / 8%);
}
/* Overlay dossier: reset .kpi cream surface → teks kontras di glass gelap */
.geo-drawer--overlay .geo-tab-panel .kpi {
	background: transparent;
	border: none;
	border-bottom: 1px solid rgb(255 255 255 / 12%);
	border-radius: 0;
	padding: 0.5rem 0;
	min-width: 0;
	box-shadow: none;
}
.geo-drawer--overlay .geo-tab-panel .kpi span {
	color: #d9cbb3;
	font-size: 0.8rem;
	font-weight: 500;
}
.geo-drawer--overlay .geo-tab-panel .kpi strong {
	font-size: 1.2rem;
	font-weight: 700;
	color: #ffe566;
	text-shadow: 0 1px 0 rgb(0 0 0 / 45%);
}

/* Floating CCTV stream panel — pola Osiris CameraViewer */
.geo-cam-panel {
	position: absolute;
	z-index: 9;
	left: 0.75rem;
	right: 0.75rem;
	bottom: 0.75rem;
	width: auto;
	max-width: 480px;
	pointer-events: auto;
	display: flex;
	flex-direction: column;
	color: #f5efe6;
	background: rgb(8 6 4 / 88%);
	backdrop-filter: blur(20px) saturate(1.1);
	-webkit-backdrop-filter: blur(20px) saturate(1.1);
	border: 1px solid rgb(201 162 39 / 30%);
	border-radius: 12px;
	box-shadow: 0 20px 50px rgb(0 0 0 / 55%), inset 0 0 30px rgb(0 0 0 / 35%);
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px) scale(0.97);
	transition: opacity 0.22s ease, transform 0.22s ease;
}
.geo-cam-panel.is-open {
	opacity: 1;
	transform: translateY(0) scale(1);
}
@media (min-width: 960px) {
	.geo-cam-panel {
		left: auto;
		right: 0.9rem;
		bottom: 0.9rem;
		width: min(480px, calc(100% - 5rem));
	}
	.geo-drawer--overlay.is-open ~ .geo-cam-panel.is-open,
	.geo-map-wrap--hud:has(.geo-drawer--overlay.is-open) .geo-cam-panel.is-open {
		right: calc(min(360px, calc(100% - 4.5rem)) + 1.4rem);
	}
}
.geo-cam-panel__head { position: relative; z-index: 2; }
.geo-cam-panel__meta-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.28rem 0.65rem;
	font-size: 0.62rem;
	letter-spacing: 0.16em;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	color: rgb(245 239 230 / 48%);
	background: rgb(201 162 39 / 8%);
	border-bottom: 1px solid rgb(255 255 255 / 6%);
}
.geo-cam-panel__id, .geo-cam-panel__live { color: #c9a227; font-weight: 700; }
.geo-cam-panel__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.55rem 0.65rem;
	border-bottom: 1px solid rgb(255 255 255 / 8%);
}
.geo-cam-panel__titles { min-width: 0; flex: 1; }
.geo-cam-panel__titles h3 {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.geo-cam-panel__titles p {
	margin: 0.15rem 0 0;
	font-size: 0.65rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgb(201 162 39 / 85%);
}
.geo-cam-panel__acts { display: flex; gap: 0.25rem; flex-shrink: 0; }
.geo-cam-panel__btn {
	appearance: none;
	width: 1.7rem; height: 1.7rem;
	border-radius: 6px;
	border: 1px solid rgb(255 255 255 / 12%);
	background: rgb(255 255 255 / 5%);
	color: #f5efe6;
	cursor: pointer;
	font-size: 0.85rem;
	line-height: 1;
}
.geo-cam-panel__btn:hover { border-color: #c9a227; color: #c9a227; }
.geo-cam-panel__btn--x { border-color: rgb(192 57 43 / 35%); color: #e07468; }
.geo-cam-panel__btn--x:hover { background: rgb(192 57 43 / 25%); border-color: #c0392b; color: #fff; }
.geo-cam-panel__feed {
	position: relative;
	aspect-ratio: 16 / 9;
	max-height: 35vh;
	background: #020202;
	overflow: hidden;
}
/* ponytail: display:block di bawah menimpa UA [hidden]=none — wajib override */
.geo-cam-panel__feed [hidden] {
	display: none !important;
}
.geo-cam-panel__feed img,
.geo-cam-panel__feed video,
.geo-cam-panel__feed iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
	background: #020202;
	z-index: 1;
}
.geo-cam-panel__feed img.is-offline { object-fit: contain; background: #1a120a; }
.geo-cam-panel__scan {
	pointer-events: none;
	position: absolute;
	inset: 0;
	background:
		repeating-linear-gradient(0deg, transparent, transparent 1px, rgb(255 255 255 / 2%) 2px, rgb(255 255 255 / 2%) 2px),
		radial-gradient(ellipse at center, transparent 40%, rgb(0 0 0 / 55%) 100%);
	background-size: 100% 4px, auto;
	z-index: 2;
}
.geo-cam-panel__foot {
	margin: 0;
	padding: 0.45rem 0.65rem 0.55rem;
	font-size: 0.7rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 960px) {
	.app-body--compact:has(.wrap--hud) .app-frame {
		max-height: none;
		overflow: visible;
	}
	.geo-hud {
		height: auto;
		min-height: calc(100dvh - 5.75rem);
	}
	.geo-hud__stage {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(62dvh, 1fr);
	}
	/* Dock layer selalu di atas dossier/cam — semua tombol INTEL/OPS bisa diketuk */
	.geo-layer-rail--overlay {
		top: auto;
		bottom: max(0.55rem, env(safe-area-inset-bottom));
		left: max(0.45rem, env(safe-area-inset-left));
		right: auto;
		width: auto;
		height: auto;
		z-index: 16;
	}
	.geo-layer-rail__strip {
		flex-direction: row;
		width: auto;
		height: auto;
		padding: 0.3rem 0.4rem;
		border-radius: 14px;
		border: 1px solid rgb(255 255 255 / 10%);
		border-right: 1px solid rgb(255 255 255 / 10%);
		box-shadow: 0 8px 28px rgb(0 0 0 / 28%);
		gap: 0.15rem;
	}
	.geo-layer-rail__brand { margin: 0 0.2rem 0 0; width: 32px; height: 32px; }
	.geo-layer-rail__groups { flex-direction: row; flex: 0; gap: 0.1rem; }
	.geo-layer-rail__hint { display: none; }
	.geo-layer-ico {
		width: 44px;
		height: 44px;
		border-radius: 12px;
	}
	.geo-layer-flyout {
		left: 0;
		right: auto;
		bottom: calc(100% + 8px);
		top: auto;
		min-width: min(86vw, 300px);
		max-width: min(92vw, 320px);
		max-height: min(52dvh, 340px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}
	.geo-layer-group[data-group="ops"] .geo-layer-flyout {
		top: auto;
		transform: none;
		animation-name: geo-fly-in;
	}
	.geo-layer-row {
		padding: 0.55rem 0.4rem;
		min-height: 44px;
	}
	.geo-map-wrap--hud {
		min-height: 62dvh;
		height: min(78dvh, 720px);
		/* flyout naik ke atas dock — jangan clip */
		overflow: visible;
	}
	.geo-map-wrap--hud .geo-map-canvas--hud {
		border-radius: 0;
		overflow: hidden;
	}
	/* Basemap OSM/Sat/2D/3D — kanan atas, target sentuh besar */
	.geo-basemap,
	.geo-map-wrap--hud .geo-basemap,
	.geo-map-wrap--public .geo-basemap {
		top: max(0.5rem, env(safe-area-inset-top));
		right: max(0.5rem, env(safe-area-inset-right));
		left: auto;
		gap: 0.4rem;
		z-index: 14;
		max-width: calc(100% - 1rem);
	}
	.geo-basemap__btn {
		padding: 0.55rem 0.72rem;
		min-height: 44px;
		min-width: 44px;
		font-size: 0.78rem;
	}
	.geo-legend {
		left: max(0.5rem, env(safe-area-inset-left));
		right: auto;
		bottom: max(4.6rem, calc(env(safe-area-inset-bottom) + 3.8rem));
		z-index: 7;
		padding: 0.35rem 0.5rem;
		font-size: 0.65rem;
	}
	.geo-legend__bar { width: 72px; height: 8px; }
	/* Dossier naik di atas dock layer (~56px) supaya tombol layer tetap kebuka */
	.geo-drawer--overlay {
		top: auto;
		left: max(0.45rem, env(safe-area-inset-left));
		right: max(0.45rem, env(safe-area-inset-right));
		bottom: calc(3.6rem + env(safe-area-inset-bottom));
		width: auto;
		max-height: min(42dvh, 380px);
		z-index: 10;
	}
	.geo-cam-panel {
		bottom: calc(min(42dvh, 380px) + 4.4rem + env(safe-area-inset-bottom));
		left: max(0.45rem, env(safe-area-inset-left));
		right: max(0.45rem, env(safe-area-inset-right));
		max-width: none;
		z-index: 11;
	}
	.geo-breadcrumb--float {
		left: 0.5rem;
		right: 0.5rem;
		top: max(3.6rem, calc(env(safe-area-inset-top) + 3.2rem));
		max-width: none;
		z-index: 9;
	}
	/* Zoom/compass: kanan bawah — jangan tabrak dock layer kiri */
	.geo-map-wrap--hud .maplibregl-ctrl-bottom-left,
	.geo-map-wrap--public .maplibregl-ctrl-bottom-left {
		left: auto !important;
		right: max(8px, env(safe-area-inset-right));
		bottom: max(8px, env(safe-area-inset-bottom));
	}
	.maplibregl-ctrl-group button {
		width: 36px !important;
		height: 36px !important;
	}
}
/* MapLibre zoom: geser dari strip overlay (desktop) */
.geo-map-wrap--hud .maplibregl-ctrl-bottom-left {
	left: 52px;
	bottom: 8px;
}
@media (max-width: 960px) {
	.geo-map-wrap--hud .maplibregl-ctrl-bottom-left {
		left: auto;
	}
}
.cctv-pin {
	width: 14px; height: 14px; border-radius: 50%;
	background: #1a6b8a; border: 2px solid #f5efe6;
	box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
	cursor: pointer;
}
.cctv-pin--demo { background: #c9a227; }
.cctv-thumbs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem;
}
.cctv-thumb {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	text-align: left;
	padding: 0;
	margin: 0;
	border: 1px solid rgb(255 255 255 / 10%);
	border-radius: 10px;
	background: rgb(255 255 255 / 4%);
	color: inherit;
	cursor: pointer;
	overflow: hidden;
	font: inherit;
}
.cctv-thumb:hover, .cctv-thumb.is-on {
	border-color: rgb(201 162 39 / 55%);
	background: rgb(201 162 39 / 12%);
	box-shadow: 0 0 0 1px rgb(201 162 39 / 20%);
}
.cctv-thumb__shot {
	display: block;
	aspect-ratio: 16 / 10;
	background: #1a120a;
	overflow: hidden;
}
.cctv-thumb__shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cctv-thumb__shot img.is-offline { object-fit: contain; }
.cctv-thumb__meta {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 0 0.45rem 0.45rem;
	min-width: 0;
}
.cctv-thumb__meta strong {
	font-size: 0.72rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cctv-thumb__meta em {
	font-style: normal;
	font-size: 0.62rem;
	opacity: 0.55;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
/* legacy text list (kalau masih dipakai di tempat lain) */
.cctv-list { display: flex; flex-direction: column; gap: 0.35rem; max-height: min(220px, 35vh); overflow: auto; }
.cctv-item {
	text-align: left; background: #fffdf8; border: 1px solid rgba(44,26,14,0.1);
	border-radius: 8px; padding: 0.4rem 0.55rem; cursor: pointer; font: inherit; font-size: 0.85rem;
}
.cctv-item.is-on, .cctv-item:hover { border-color: #c9a227; background: #f7f0dc; }
.cctv-viewer { margin-top: 0.75rem; }
.cctv-viewer img {
	width: 100%; aspect-ratio: 16/9; object-fit: cover;
	border-radius: 8px; background: #2c1a0e; border: 1px solid rgba(44,26,14,0.12);
}
.cctv-viewer img.is-offline {
	object-fit: contain;
	background: #1a120a;
	border-color: rgba(201, 162, 39, 0.35);
}

/* —— Predict person dossier (P3) —— */
.pred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.pred-avatar { border-radius: 12px; object-fit: cover; background: #2c1a0e; flex-shrink: 0; }
.pred-dossier { max-width: 960px; }
.pred-dossier__head { margin-bottom: 1rem; }
.pred-dossier__hero { display: flex; gap: 1rem; align-items: flex-start; margin-top: 0.75rem; }
.pred-dossier__av {
	width: 96px; height: 96px; border-radius: 18px; object-fit: cover;
	border: 2px solid rgba(201,162,39,0.45); background: #2c1a0e; flex-shrink: 0;
}
.pred-dossier__kicker {
	margin: 0 0 0.25rem; font-size: 0.7rem; letter-spacing: 0.12em;
	text-transform: uppercase; color: #8b6914; font-weight: 600;
}
.pred-dossier__hero h1 { margin: 0 0 0.25rem; font-size: 1.55rem; }
.pred-dossier__pills { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.pred-score {
	font-weight: 700; font-size: 1.25rem; color: #5c3a21;
	background: #f7f0dc; border: 1px solid rgba(201,162,39,0.4);
	padding: 0.15rem 0.55rem; border-radius: 8px;
}
.pred-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0.75rem; }
.pred-kv {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.65rem 1rem; margin: 0.75rem 0 1rem;
}
.pred-kv span { display: block; font-size: 0.75rem; color: #8a7a66; }
.pred-kv strong { font-size: 0.95rem; color: #2c1a0e; }
.pred-waterfall { display: flex; flex-direction: column; gap: 0.45rem; margin: 0.75rem 0 1.25rem; }
.pred-wf { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(80px,1fr) auto; gap: 0.5rem; align-items: center; }
.pred-wf__lab span { display: block; font-size: 0.85rem; font-weight: 600; color: #2c1a0e; }
.pred-wf__lab em { font-style: normal; font-size: 0.7rem; color: #8a7a66; }
.pred-wf__bar { height: 8px; background: #efe6d4; border-radius: 99px; overflow: hidden; }
.pred-wf__bar i { display: block; height: 100%; background: linear-gradient(90deg, #c9a227, #5c3a21); border-radius: 99px; }
.pred-wf__d { font-size: 0.8rem; color: #5c3a21; font-variant-numeric: tabular-nums; }
.pred-cites { font-size: 0.85rem; line-height: 1.45; padding-left: 1.2rem; }
.pred-cites a { color: #8b6914; }
.pred-score-kpis .kpi strong { color: #5c3a21; font-size: 1.35rem; }
.pred-dossier__foot { margin-top: 1.25rem; flex-wrap: wrap; }
.pred-rescore-out {
	margin-top: 0.75rem; padding: 0.75rem; background: #f7f0dc; border-radius: 8px;
	font-size: 0.75rem; overflow: auto; max-height: 200px;
}
.pred-panel h2 { margin-top: 0; }
.pred-panel h3 { margin: 1rem 0 0.4rem; font-size: 0.95rem; color: #5c3a21; }
@media (max-width: 640px) {
	.pred-dossier__hero { flex-direction: column; }
	.pred-wf { grid-template-columns: 1fr auto; }
	.pred-wf__bar { grid-column: 1 / -1; }
}

/* ===== v0.6.0 · Detail pages (D0–D5) & Katalog awam (K0–K4) ===== */
.nx-detail { max-width: 1100px; margin: 0 auto; }
.nx-detail__back { display: inline-block; margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--link); text-decoration: none; }
.nx-detail__back:hover { text-decoration: underline; }
.nx-detail__head { display: flex; gap: 1rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; box-shadow: var(--shadow-card); }
.nx-detail__thumb { flex: 0 0 96px; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--brand-soft); display: grid; place-items: center; font-size: 2rem; }
.nx-detail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.nx-detail__hero { flex: 1; min-width: 0; }
.nx-detail__kicker { margin: 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.nx-detail__title { margin: 0.15rem 0 0.4rem; font-size: 1.45rem; line-height: 1.25; color: var(--ink); word-break: break-word; }
.nx-detail__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.nx-detail__meta { margin: 0.5rem 0 0; font-size: 0.82rem; color: var(--muted); }
.nx-detail__lead { font-size: 0.95rem; line-height: 1.5; }
.nx-detail__tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0 0.5rem; }
.nx-detail__panels { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem 1.25rem; }
.nx-detail__panel h3 { margin: 1rem 0 0.4rem; font-size: 0.95rem; color: var(--polri-brown); }
.nx-detail__panel h3:first-child { margin-top: 0; }
.nx-detail__body { margin-top: 1rem; }
.nx-detail__foot { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.nx-detail.nx-empty { padding: 2rem 0; }
.nx-kv { margin-top: 0.25rem; }
.nx-note { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 0.6rem 0.85rem; border-radius: 8px; font-size: 0.88rem; }
.nx-section-title { margin: 1.25rem 0 0.5rem; font-size: 1rem; color: var(--polri-brown); }
.nx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.nx-list li { padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; background: #fffaf0; font-size: 0.88rem; }
.nx-file { font-weight: 600; }
.nx-cols td:first-child { width: 34%; color: var(--muted); font-size: 0.82rem; }
.nx-late { color: #a1301c; }
.nx-timeline { list-style: none; margin: 0.75rem 0; padding: 0 0 0 1rem; border-left: 2px solid var(--border); }
.nx-timeline__item { position: relative; padding: 0.35rem 0 0.5rem 0.6rem; font-size: 0.88rem; }
.nx-timeline__item::before { content: ''; position: absolute; left: -1.43rem; top: 0.65rem; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); }
.nx-timeline__item time { display: block; font-size: 0.72rem; color: var(--muted); }
.nx-timeline__item.is-demo::before { background: #b9a88f; }
.nx-reply, .nx-inline-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-top: 0.75rem; }
.nx-reply textarea { flex: 1 1 320px; min-height: 70px; }
.nx-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0 0.75rem; }
.nx-filter input[type="search"] { flex: 1 1 220px; }
a.nx-card, .nx-card { cursor: pointer; text-decoration: none; color: inherit; display: block; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
a.nx-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(92, 58, 33, 0.1); }
a.nx-card:focus-visible, .nx-row-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.nx-row-link { cursor: pointer; }
.nx-row-link:hover td { background: var(--brand-soft); }
.nx-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 94vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: -8px 0 32px rgba(44, 26, 14, 0.18); z-index: 60; display: flex; flex-direction: column; }
.nx-drawer[hidden] { display: none; }
.nx-drawer__head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--border); }
.nx-drawer__head h2 { margin: 0; font-size: 1.05rem; }
.nx-drawer__close { background: none; border: 0; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.nx-drawer__body { padding: 1rem; overflow: auto; flex: 1; }

/* Katalog awam */
.cat-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0; }
.cat-chip { display: inline-block; font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 99px; background: #f3ead6; color: var(--polri-brown); border: 1px solid #e5d3a8; white-space: nowrap; }
.cat-chip--main { background: var(--brand); color: #2c1a0e; border-color: var(--brand); font-weight: 600; }
.cat-blurb { margin: 0.25rem 0; font-size: 0.85rem; line-height: 1.4; color: var(--ink); }
.cat-title-link { color: inherit; font-weight: 600; text-decoration: none; }
.cat-title-link:hover { text-decoration: underline; color: var(--link); }
.cat-hero-kicker { margin: 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cat-hero-title { margin: 0.15rem 0 0.4rem; font-size: 1.45rem; }
.cat-detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.cat-ll { margin: 0; }
.cat-producer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; }
.cat-producer__title { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--polri-brown); }
.cat-producer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.cat-producer__item { padding: 0.5rem 0.6rem; border-radius: 8px; background: #fffaf0; border: 1px solid var(--border); }
.cat-producer__item strong { display: block; font-size: 0.9rem; }
.cat-producer__meta { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.cat-producer__note { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--muted); }
.cat-producer__foot { margin: 0.6rem 0 0; font-size: 0.75rem; color: var(--muted); }
.cat-role { display: inline-block; font-size: 0.68rem; padding: 0.05rem 0.4rem; border-radius: 6px; background: #efe6d4; color: var(--polri-brown); margin-left: 0.3rem; vertical-align: middle; }
.cat-detail-cta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.5rem; }
.cat-footnote { margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 0.5rem; }
a.pub-cat-card { text-decoration: none; color: inherit; }
.pub-cat-more { color: var(--link); font-weight: 600; }
.pub-motif-kamus { margin-top: 0.75rem; }
.pub-chart-hint { margin: -0.25rem 0 0.4rem; font-size: 0.78rem; }
.dash-card.is-active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.35); }
@media (max-width: 760px) {
	.cat-detail-grid { grid-template-columns: 1fr; }
	.nx-detail__head { flex-direction: column; }
	.nx-detail__thumb { width: 72px; height: 72px; flex-basis: 72px; }
}


/* —— Crime map curation: legend, route, nearest, mobile dossier (2026-11-06) —— */
.geo-layer-sw--ico {
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	background: transparent;
	overflow: hidden;
}
.geo-layer-sw--ico img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.geo-layer-sw--rawan {
	background: rgb(192 57 43 / 45%);
	border: 1px solid #c0392b;
}
.geo-legend-float {
	position: absolute;
	right: max(0.55rem, env(safe-area-inset-right));
	bottom: max(0.55rem, env(safe-area-inset-bottom));
	z-index: 15;
	max-width: min(240px, 70vw);
}
.geo-legend-float__tog {
	font: inherit;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 0.45rem 0.7rem;
	min-height: 40px;
	border-radius: 10px;
	border: 1px solid rgb(255 255 255 / 14%);
	background: rgb(18 14 10 / 88%);
	color: #f5efe6;
	cursor: pointer;
	backdrop-filter: blur(8px);
}
.geo-legend-float__body {
	margin-top: 0.35rem;
	padding: 0.55rem 0.65rem;
	border-radius: 12px;
	border: 1px solid rgb(255 255 255 / 12%);
	background: rgb(18 14 10 / 92%);
	color: #f5efe6;
	font-size: 0.78rem;
}
.geo-legend-float__note {
	margin: 0 0 0.4rem;
	font-size: 0.68rem;
	opacity: 0.75;
}
.geo-legend-float__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.35rem;
}
.geo-legend-float__list li {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}
.geo-legend-float__list img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}
.geo-legend-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #f5efe6;
	flex-shrink: 0;
}
.geo-legend-dot--tkp { background: #c9a227; border-color: #1a120a; }
.geo-legend-dot--cctv { background: #1a6b8a; }
.geo-legend-swatch--rawan {
	width: 14px;
	height: 10px;
	background: rgb(192 57 43 / 45%);
	border: 1px solid #c0392b;
	flex-shrink: 0;
}
.geo-route-panel {
	position: absolute;
	top: max(3.2rem, env(safe-area-inset-top));
	right: max(0.5rem, env(safe-area-inset-right));
	width: min(320px, calc(100% - 1rem));
	z-index: 17;
	padding: 0.75rem 0.85rem;
	border-radius: 14px;
	border: 1px solid rgb(255 255 255 / 12%);
	background: rgb(18 14 10 / 94%);
	color: #f5efe6;
	box-shadow: 0 12px 40px rgb(0 0 0 / 35%);
	max-height: min(70dvh, 520px);
	overflow: auto;
}
.geo-route-panel[hidden] { display: none !important; }
.geo-route-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.45rem;
}
.geo-route-panel__disc {
	font-size: 0.72rem;
	margin: 0 0 0.55rem;
	line-height: 1.35;
}
.geo-route-panel__lab {
	display: grid;
	gap: 0.2rem;
	font-size: 0.75rem;
	margin-bottom: 0.45rem;
}
.geo-route-panel__lab input {
	font: inherit;
	padding: 0.45rem 0.55rem;
	border-radius: 8px;
	border: 1px solid rgb(255 255 255 / 14%);
	background: rgb(255 255 255 / 6%);
	color: inherit;
}
.geo-route-panel__modes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.5rem;
}
.geo-route-panel__result {
	margin-top: 0.55rem;
	font-size: 0.78rem;
	line-height: 1.4;
}
.geo-nearest-box {
	padding: 0.45rem 0.75rem 0.65rem;
	font-size: 0.8rem;
	border-top: 1px solid rgb(255 255 255 / 10%);
}
.geo-nearest-box ol {
	margin: 0.35rem 0 0;
	padding-left: 1.1rem;
}

@media (max-width: 960px) {
	/* Region dossier: scroll body, keep foot actions visible, clear layer dock */
	.geo-drawer--overlay {
		display: flex;
		flex-direction: column;
		max-height: min(48dvh, 420px);
		bottom: calc(4.1rem + env(safe-area-inset-bottom));
		padding-bottom: 0;
		overflow: hidden;
	}
	.geo-drawer--overlay .geo-drawer__body {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
		padding-bottom: 0.35rem;
	}
	.geo-drawer--overlay .geo-drawer__foot {
		flex-shrink: 0;
		flex-wrap: wrap;
		gap: 0.4rem;
		padding: 0.45rem 0.65rem calc(0.45rem + env(safe-area-inset-bottom));
		border-top: 1px solid rgb(255 255 255 / 10%);
		background: rgb(18 14 10 / 96%);
	}
	.geo-drawer--overlay .geo-drawer__foot .btn {
		flex: 1 1 40%;
		min-height: 40px;
		font-size: 0.8rem;
	}
	.geo-drawer--overlay .geo-tabs {
		flex-shrink: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.geo-legend-float {
		right: max(0.45rem, env(safe-area-inset-right));
		bottom: calc(4.2rem + env(safe-area-inset-bottom));
	}
	.geo-route-panel {
		top: auto;
		bottom: calc(4.2rem + env(safe-area-inset-bottom));
		left: max(0.45rem, env(safe-area-inset-left));
		right: max(0.45rem, env(safe-area-inset-right));
		width: auto;
		max-height: min(55dvh, 480px);
	}
}

.nx-spider { font-size: 0.78rem; }
.nx-spider__h { margin: 0 0 0.35rem; font-weight: 600; }
.nx-spider-item {
	display: block; width: 100%; text-align: left; margin: 0.2rem 0;
	padding: 0.35rem 0.45rem; border-radius: 6px; border: 1px solid #ddd;
	background: #fff; cursor: pointer; font: inherit;
}
.nx-spider-item:hover { border-color: #c9a227; }
.geo-simulasi-badge {
	display: inline-block; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
	padding: 0.1rem 0.35rem; border-radius: 4px; background: #c0392b; color: #fff;
}

.geo-layer-sw--polda { background: #1a2744; border: 2px solid #c9a227; }
.geo-layer-sw--polres { background: #1e3a5f; border: 2px solid #8eb4d8; }
.geo-layer-sw--polsek { background: #0d7377; border: 2px solid #a8dadc; }

.geo-dossier-caption { margin: 0 0 0.45rem; font-size: 0.72rem; }
.geo-dossier-chart { margin: 0.55rem 0 0.75rem; }
.geo-dossier-chart__title {
	margin: 0 0 0.35rem; font-size: 0.78rem; font-weight: 600; color: #f5efe6;
}
.geo-dossier-chart__wrap {
	position: relative; width: 100%; height: 160px;
	background: rgb(0 0 0 / 18%); border-radius: 10px; padding: 0.35rem;
}
.geo-dossier-chart__wrap--tall { height: 180px; }
.geo-dossier-chart__empty { margin: 0.25rem 0 0; font-size: 0.72rem; }
.geo-drawer--overlay .geo-tab-panel .kpi--compact strong { font-size: 1rem; }
.geo-drawer--overlay .geo-tab-panel .kpi--compact { padding: 0.3rem 0; }
.geo-dossier-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.geo-stations-empty {
	position: absolute; left: 56px; right: 12px; top: 12px; z-index: 6;
	display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
	margin: 0; padding: 0.5rem 0.65rem; font-size: 0.78rem;
	border-radius: 10px; background: rgb(28 18 10 / 92%); color: #f5efe6;
	border: 1px solid rgb(201 162 39 / 45%); box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
	pointer-events: auto;
}
.geo-stations-empty[hidden] { display: none !important; }
.geo-stations-empty .btn { pointer-events: auto; }
@media (max-width: 720px) {
	.geo-dossier-chart__wrap, .geo-dossier-chart__wrap--tall { height: 150px; }
	.geo-stations-empty { left: 12px; top: auto; bottom: 72px; }
}
