/* ==========================================================================
   E-BMD FLOTIM - gaya aplikasi dashboard
   Token warna data (status & sekuensial biru) sudah divalidasi terhadap
   permukaan kartu putih; makna status selalu disertai ikon + label.
   ========================================================================== */

:root {
	/*
	 * Palet mengikuti logo E-BMD FLOTIM: hijau jangka #177a0e di atas krem
	 * #f5f4f0. Warna status sengaja dijaga tetap berbeda rona satu sama lain
	 * (hijau, kuning tanah, merah bata, biru) supaya tetap terbaca meski
	 * warna merek juga hijau; maknanya selalu disertai ikon dan label.
	 */
	--brand: #177a0e;
	--brand-600: #13650b;
	--brand-700: #0e4d08;
	--brand-50: #eef6ec;
	--brand-100: #cbe4c5;

	--status-good: #177a0e;
	--status-warning: #b4740b;
	--status-critical: #bf2f22;
	--status-info: #1f6fb2;

	--accent-toska: #0f8f7a;
	--accent-ungu: #5a4bbd;
	--accent-jingga: #cf6415;

	--bg: #f5f4f0;
	--surface: #ffffff;
	--surface-2: #faf9f5;
	--ink: #1a1a17;
	--ink-2: #3d3b34;
	--muted: #6d6b62;
	--line: #e5e2d8;

	--logo-bg: #177a0e;
	--logo-fg: #ffffff;

	--radius: 14px;
	--radius-sm: 10px;
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
	--shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 26px rgba(15, 23, 42, .06);
	--sidebar-w: 264px;
}

body.ebmd-body-app {
	background: var(--bg);
}

/* Atribut hidden harus mengalahkan display milik komponen. */
[hidden] {
	display: none !important;
}

.ebmd-icon {
	flex: none;
}

/* --------------------------------------------------------------- kerangka */

.ebmd-app {
	min-height: 100vh;
}

.ebmd-main {
	margin-left: var(--sidebar-w);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.ebmd-content {
	flex: 1;
	padding: 28px 24px 32px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 1440px;
	width: 100%;
}

/* ------------------------------------------------------------ menu samping */

.ebmd-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--sidebar-w);
	background: var(--surface);
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	z-index: 40;
}

.ebmd-sidebar__brand {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 18px 18px 16px;
	border-bottom: 1px solid var(--line);
}

.ebmd-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
	color: var(--ink);
	min-width: 0;
}

.ebmd-logo-mark {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(150deg, var(--brand) 0%, var(--brand-700) 100%);
	color: #fff;
	flex: none;
	box-shadow: 0 6px 14px rgba(42, 120, 214, .28);
}

.ebmd-logo-img {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	object-fit: contain;
}

.ebmd-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	min-width: 0;
}

.ebmd-brand__text strong {
	font-size: 15px;
	letter-spacing: -.01em;
}

.ebmd-brand__text small {
	font-size: 11.5px;
	color: var(--muted);
}

.ebmd-sidebar__close {
	display: none;
	background: none;
	border: 0;
	color: var(--muted);
	padding: 6px;
	border-radius: 8px;
	cursor: pointer;
}

.ebmd-nav {
	flex: 1;
	overflow-y: auto;
	padding: 16px 12px;
}

.ebmd-nav__label {
	margin: 0 8px 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #9c998e;
}

.ebmd-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ebmd-nav__link,
.ebmd-nav__list--wp a {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	color: var(--ink-2);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 500;
	transition: background .15s ease, color .15s ease;
}

.ebmd-nav__icon {
	display: grid;
	place-items: center;
	color: #9c998e;
	transition: color .15s ease;
}

.ebmd-nav__link:hover,
.ebmd-nav__list--wp a:hover {
	background: var(--surface-2);
	color: var(--ink);
}

.ebmd-nav__link:hover .ebmd-nav__icon {
	color: var(--brand);
}

.ebmd-nav__link.is-current,
.ebmd-nav__list--wp .current-menu-item > a {
	background: var(--brand-50);
	color: var(--brand-700);
}

.ebmd-nav__link.is-current .ebmd-nav__icon {
	color: var(--brand);
}

.ebmd-sidebar__footer {
	border-top: 1px solid var(--line);
	padding: 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ebmd-sidebar__user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 6px;
	min-width: 0;
}

.ebmd-sidebar__user-meta {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	min-width: 0;
}

.ebmd-sidebar__user-meta strong {
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ebmd-sidebar__user-meta small {
	font-size: 11.5px;
	color: var(--muted);
}

.ebmd-avatar {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--brand-50);
	color: var(--brand-700);
	font-weight: 700;
	font-size: 12.5px;
	flex: none;
}

.ebmd-avatar--sm {
	width: 32px;
	height: 32px;
	font-size: 11.5px;
}

.ebmd-logout {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	border: 1px solid #f4d4d4;
	background: #fcf3f1;
	color: #a5301f;
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
	transition: background .15s ease, border-color .15s ease;
}

.ebmd-logout:hover {
	background: #fae7e3;
	border-color: #efc0c0;
}

.ebmd-scrim {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, .38);
	z-index: 35;
}

/* ------------------------------------------------------------- tombol menu */

/*
 * Pengganti tombol menu yang dahulu menempel pada bilah atas. Hanya tampil
 * pada layar sempit; pada layar lebar menu samping selalu terlihat.
 */
.ebmd-menu-toggle {
	display: none;
	position: sticky;
	top: 12px;
	z-index: 30;
	align-self: flex-start;
	margin: 14px 0 -10px 16px;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
	color: var(--ink-2);
	cursor: pointer;
}

/* ------------------------------------------------------------ judul konten */

.ebmd-page-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.ebmd-page-head__title {
	margin: 0;
	font-size: 20px;
	font-weight: 680;
	letter-spacing: -.015em;
}

.ebmd-page-head__sub {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ebmd-page-head__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ---------------------------------------------------------------- komponen */

.ebmd-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.ebmd-grid {
	display: grid;
	gap: 20px;
}

.ebmd-grid--2 {
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.ebmd-grid--sidebar {
	grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}

.ebmd-panel {
	padding: 18px 20px 20px;
}

.ebmd-panel--table {
	padding-bottom: 8px;
}

.ebmd-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.ebmd-panel__head h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 650;
}

.ebmd-panel__head p {
	margin: 3px 0 0;
	font-size: 12.5px;
	color: var(--muted);
}

.ebmd-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
	font-family: inherit;
}

.ebmd-btn--primary {
	background: var(--brand);
	color: #fff;
	box-shadow: 0 6px 14px rgba(42, 120, 214, .22);
}

.ebmd-btn--primary:hover {
	background: var(--brand-600);
}

.ebmd-btn--ghost {
	background: #fff;
	border-color: var(--line);
	color: var(--ink-2);
}

.ebmd-btn--ghost:hover {
	border-color: var(--brand-100);
	background: var(--brand-50);
	color: var(--brand-700);
}

.ebmd-btn--block {
	width: 100%;
	justify-content: center;
	padding: 12px 16px;
}

.ebmd-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	font-size: 12px;
	font-weight: 600;
	color: var(--ink-2);
	white-space: nowrap;
}

.ebmd-badge .ebmd-icon {
	color: var(--badge, var(--brand));
}

.ebmd-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 13px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink-2);
	font-size: 12.5px;
	font-weight: 600;
	text-decoration: none;
}

.ebmd-chip .ebmd-icon {
	color: var(--chip, var(--brand));
}

.ebmd-chip:hover {
	border-color: var(--brand-100);
}

.ebmd-chip.is-active {
	background: var(--brand-50);
	border-color: var(--brand-100);
	color: var(--brand-700);
}

.ebmd-filters {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* --------------------------------------------------------- kartu statistik */

.ebmd-kpi {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
	gap: 20px;
}

.ebmd-kpi__item {
	padding: 18px 20px;
	position: relative;
	overflow: hidden;
}

.ebmd-kpi__icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	margin-bottom: 14px;
	background: var(--brand-50);
	color: var(--brand);
}

.ebmd-kpi__item--toska .ebmd-kpi__icon { background: #e4f5f0; color: #0d7c69; }
.ebmd-kpi__item--ungu .ebmd-kpi__icon { background: #eeecf9; color: var(--accent-ungu); }
.ebmd-kpi__item--jingga .ebmd-kpi__icon { background: #fbeee2; color: #b4560f; }

.ebmd-kpi__label {
	margin: 0;
	font-size: 12.5px;
	color: var(--muted);
	font-weight: 500;
}

.ebmd-kpi__value {
	margin: 4px 0 2px;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -.02em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.ebmd-kpi__note {
	margin: 0;
	font-size: 12px;
	color: #9c998e;
}

/* ------------------------------------------------------------------ grafik */

.ebmd-stack {
	display: flex;
	gap: 2px;
	height: 14px;
	border-radius: 999px;
	overflow: hidden;
	background: var(--surface-2);
	margin-bottom: 16px;
}

.ebmd-stack__seg {
	position: relative;
	min-width: 3px;
	border-radius: 4px;
}

.ebmd-stack__seg:hover::after {
	content: attr(data-tip);
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	background: var(--ink);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	padding: 6px 10px;
	border-radius: 8px;
	white-space: nowrap;
	z-index: 5;
	pointer-events: none;
}

.ebmd-legend {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ebmd-legend__item {
	display: grid;
	grid-template-columns: 20px 1fr auto 58px;
	align-items: center;
	gap: 10px;
	padding: 8px 6px;
	border-radius: 8px;
	font-size: 13px;
}

.ebmd-legend__item:hover {
	background: var(--surface-2);
}

.ebmd-legend__mark {
	display: grid;
	place-items: center;
}

.ebmd-legend__label {
	color: var(--ink-2);
}

.ebmd-legend__value {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.ebmd-legend__pct {
	text-align: right;
	color: var(--muted);
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- tabel */

.ebmd-table-wrap {
	overflow-x: auto;
	margin: 0 -20px;
	padding: 0 20px;
}

.ebmd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 720px;
}

.ebmd-table--auto {
	min-width: 0;
}

.ebmd-table th {
	text-align: left;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #9c998e;
	font-weight: 600;
	padding: 0 12px 10px;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}

.ebmd-table td {
	padding: 12px;
	border-bottom: 1px solid #f3f1ea;
	color: var(--ink-2);
	vertical-align: top;
}

.ebmd-table tbody tr:hover td {
	background: #fafcff;
}

.ebmd-table .is-num {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.ebmd-table__code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
}

.ebmd-table__title {
	color: var(--ink);
	font-weight: 600;
	text-decoration: none;
}

.ebmd-table__title:hover {
	color: var(--brand-600);
	text-decoration: underline;
}

.ebmd-table td small {
	display: block;
	color: var(--muted);
	font-size: 11.5px;
	margin-top: 2px;
}

.ebmd-table tfoot th,
.ebmd-table tfoot td {
	padding: 12px;
	border-top: 2px solid var(--line);
	font-weight: 700;
	color: var(--ink);
	text-align: left;
}

.ebmd-table tfoot .is-num {
	text-align: right;
}

.ebmd-pagination {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	align-items: center;
}

.ebmd-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink-2);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

.ebmd-pagination .page-numbers.current {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}

/* Keterangan "Halaman x dari y" di samping tombol nomor halaman. */
.ebmd-pagination__info {
	margin-left: auto;
	color: var(--muted);
	font-size: 12px;
}

@media (max-width: 640px) {
	.ebmd-pagination__info {
		margin-left: 0;
		width: 100%;
	}
}

/* ------------------------------------------------------------ detail & isi */

.ebmd-detail {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px 24px;
}

.ebmd-detail__row dt {
	font-size: 11.5px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #9c998e;
	font-weight: 600;
	margin-bottom: 3px;
}

.ebmd-detail__row dd {
	margin: 0;
	font-size: 14px;
	color: var(--ink);
	font-weight: 500;
}

.ebmd-detail__note {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
}

.ebmd-thumb {
	border-radius: var(--radius-sm);
	display: block;
}

.ebmd-prose {
	color: var(--ink-2);
	line-height: 1.7;
}

.ebmd-prose h1, .ebmd-prose h2, .ebmd-prose h3 {
	color: var(--ink);
	letter-spacing: -.01em;
}

.ebmd-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ebmd-list__item a {
	font-weight: 650;
	color: var(--ink);
	text-decoration: none;
}

.ebmd-list__item small {
	display: block;
	color: var(--muted);
	font-size: 12px;
	margin-top: 2px;
}

.ebmd-list__item p {
	margin: 6px 0 0;
	color: var(--ink-2);
}

.ebmd-empty {
	text-align: center;
	padding: 36px 20px 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.ebmd-empty__icon {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 18px;
	background: var(--brand-50);
	color: var(--brand);
	margin-bottom: 4px;
}

.ebmd-empty h3 {
	margin: 0;
	font-size: 15.5px;
}

.ebmd-empty p {
	margin: 0;
	color: var(--muted);
	max-width: 380px;
}

.ebmd-empty .ebmd-btn {
	margin-top: 10px;
}

.ebmd-empty-inline {
	margin: 0;
	padding: 18px 0;
	color: var(--muted);
	font-size: 13px;
}

/* ------------------------------------------------------------------ fokus */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

/* ------------------------------------------------------------ bilah admin */

body.admin-bar .ebmd-sidebar { top: 32px; }

@media screen and (max-width: 782px) {
	body.admin-bar .ebmd-sidebar { top: 46px; }
}

/* ---------------------------------------------------------------- responsif */

@media (max-width: 1080px) {
	.ebmd-grid--sidebar {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 1024px) {
	.ebmd-sidebar {
		transform: translateX(-100%);
		transition: transform .22s ease;
		box-shadow: 0 20px 40px rgba(15, 23, 42, .18);
	}

	.ebmd-sidebar.is-open {
		transform: none;
	}

	.ebmd-sidebar__close {
		display: block;
	}

	.ebmd-main {
		margin-left: 0;
	}

	.ebmd-menu-toggle {
		display: grid;
		place-items: center;
	}
}

@media (max-width: 720px) {
	.ebmd-content {
		padding: 16px;
		gap: 16px;
	}

	.ebmd-kpi {
		grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
		gap: 12px;
	}

	.ebmd-kpi__value {
		font-size: 21px;
	}

	.ebmd-grid {
		gap: 16px;
	}
}

/* ------------------------------------------------------------------ cetak */

@media print {
	.ebmd-sidebar,
	.ebmd-menu-toggle,
	.ebmd-page-head__actions,
	.ebmd-scrim {
		display: none !important;
	}

	.ebmd-main {
		margin-left: 0;
	}

	.ebmd-card {
		box-shadow: none;
		border-color: #d6d2c6;
		break-inside: avoid;
	}
}

/* ==========================================================================
   Formulir umum (dipakai layar login dan seluruh halaman aplikasi)
   ========================================================================== */

.ebmd-alert {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	padding: 11px 13px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	margin-bottom: 18px;
	border: 1px solid;
	line-height: 1.5;
}

.ebmd-alert--galat {
	background: #fcf3f1;
	border-color: #eecdc8;
	color: #93281c;
}

.ebmd-alert--sukses {
	background: #edf7eb;
	border-color: #c6e3c0;
	color: #14620c;
}

.ebmd-alert--info {
	background: var(--brand-50);
	border-color: var(--brand-100);
	color: var(--brand-700);
}

.ebmd-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ebmd-field label,
.ebmd-field__judul {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink-2);
	margin-bottom: 6px;
}

.ebmd-field__wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.ebmd-field__wrap > .ebmd-icon {
	position: absolute;
	left: 13px;
	color: #9c998e;
	pointer-events: none;
}

.ebmd-field input {
	width: 100%;
	padding: 12px 14px 12px 40px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	font: inherit;
	font-size: 14px;
	color: var(--ink);
	transition: border-color .15s ease, background .15s ease;
}

.ebmd-field input::placeholder {
	color: #a8a59a;
}

.ebmd-field input:focus {
	outline: none;
	background: #fff;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-50);
}

.ebmd-field__reveal {
	position: absolute;
	right: 8px;
	background: none;
	border: 0;
	padding: 6px 8px;
	border-radius: 8px;
	color: var(--brand-600);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
}

.ebmd-field__reveal:hover {
	background: var(--brand-50);
}

.ebmd-form__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	margin-top: -4px;
}

.ebmd-check {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--ink-2);
	cursor: pointer;
}

.ebmd-check input {
	width: 15px;
	height: 15px;
	accent-color: var(--brand);
}

.ebmd-link {
	color: var(--brand-600);
	text-decoration: none;
	font-weight: 600;
}

.ebmd-link:hover {
	text-decoration: underline;
}


/* ==========================================================================
   Komponen inventarisasi
   ========================================================================== */

.ebmd-langkah {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	counter-reset: langkah;
}

.ebmd-langkah li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	counter-increment: langkah;
}

/* Nomor langkah dihasilkan CSS agar tidak berganda dengan penanda daftar. */
.ebmd-langkah li::before {
	content: counter( langkah );
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--brand-50);
	color: var(--brand-700);
	font-size: 12px;
	font-weight: 700;
	flex: none;
}

.ebmd-langkah strong {
	display: block;
	font-size: 13.5px;
	color: var(--ink);
}

.ebmd-langkah p {
	margin: 2px 0 0;
	font-size: 12.5px;
	color: var(--muted);
	line-height: 1.55;
}

/* -------------------------------------------------------------- unggah */

.ebmd-dropzone {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px;
	border: 1.5px dashed #cfe0c9;
	border-radius: var(--radius);
	background: var(--surface-2);
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}

.ebmd-dropzone:hover,
.ebmd-dropzone.is-hover {
	border-color: var(--brand);
	background: var(--brand-50);
}

.ebmd-dropzone.is-terisi {
	border-style: solid;
	border-color: var(--status-good);
	background: #f2fbf2;
}

.ebmd-dropzone input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.ebmd-dropzone__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid var(--line);
	color: var(--brand);
	flex: none;
}

.ebmd-dropzone__teks {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ebmd-dropzone__teks strong {
	font-size: 14px;
	color: var(--ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ebmd-dropzone__teks small {
	color: var(--muted);
	font-size: 12.5px;
}

.ebmd-form-unggah {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ebmd-form-unggah__baris {
	display: flex;
	align-items: flex-end;
	gap: 14px;
	flex-wrap: wrap;
}

.ebmd-form-unggah__baris .ebmd-field {
	flex: 1;
	min-width: 220px;
}

.ebmd-form-unggah__baris .ebmd-field input {
	padding-left: 14px;
}

/* ------------------------------------------------------- kartu ringkasan */

.ebmd-ringkas {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
	gap: 14px;
	align-items: stretch;
}

.ebmd-ringkas__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
}

.ebmd-ringkas__ikon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: var(--surface-2);
	color: var(--badge, var(--muted));
	flex: none;
}

.ebmd-ringkas__item strong {
	display: block;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -.01em;
	font-variant-numeric: tabular-nums;
}

.ebmd-ringkas__item small {
	color: var(--muted);
	font-size: 12px;
}

.ebmd-ringkas__status {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 16px;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	font-size: 12.5px;
}

.ebmd-ringkas__status label {
	color: var(--muted);
	font-weight: 600;
}

.ebmd-ringkas__status select,
.ebmd-field select {
	font: inherit;
	font-size: 13px;
	padding: 7px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	width: 100%;
}

/* ------------------------------------------------------------ tabel sel */

.ebmd-editor {
	max-height: 70vh;
	overflow: auto;
}

.ebmd-table--editor {
	min-width: 100%;
	font-size: 12.5px;
}

.ebmd-table--editor thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--surface);
	padding: 10px 8px;
	border-bottom: 1px solid var(--line);
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ebmd-table--editor td {
	padding: 0;
	border-bottom: 1px solid #f3f1ea;
	border-right: 1px solid #f7f5ef;
}

.ebmd-editor__no {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--surface-2);
	text-align: right;
	padding: 8px 10px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
	font-size: 11.5px;
	white-space: nowrap;
	border-right: 1px solid var(--line);
}

.ebmd-table--editor thead .ebmd-editor__no {
	z-index: 3;
}

.ebmd-sel__input {
	width: 100%;
	min-width: 120px;
	max-width: 260px;
	border: 0;
	background: transparent;
	padding: 8px 10px;
	font: inherit;
	font-size: 12.5px;
	color: var(--ink-2);
}

.ebmd-sel__input:focus {
	outline: 2px solid var(--brand);
	outline-offset: -2px;
	background: #fff;
	color: var(--ink);
}

.ebmd-sel.is-kritis { background: #fdf3f3; box-shadow: inset 3px 0 0 var(--status-critical); }
.ebmd-sel.is-perhatian { background: #fdf7e8; box-shadow: inset 3px 0 0 var(--status-warning); }
.ebmd-sel.is-info { background: #eef4fa; box-shadow: inset 3px 0 0 var(--status-info); }
.ebmd-sel.is-diubah { background: #eef6ec; box-shadow: inset 3px 0 0 var(--brand); }
.ebmd-sel.is-tersimpan { background: #eff8ed; box-shadow: inset 3px 0 0 var(--status-good); }

.ebmd-tanda {
	display: inline-grid;
	place-items: center;
	vertical-align: middle;
	margin-left: 3px;
}

.ebmd-tanda--perhatian { color: var(--status-warning); }

/* ----------------------------------------------------------- simpan bar */

.ebmd-simpan-bar {
	position: fixed;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 12px 10px 18px;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, .28);
	font-size: 13px;
	z-index: 45;
}

/* --------------------------------------------------------- daftar temuan */

.ebmd-temuan {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.ebmd-temuan__item {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 11px 6px;
	border-bottom: 1px solid #f3f1ea;
}

.ebmd-temuan__item:last-child { border-bottom: 0; }

.ebmd-temuan__ikon {
	display: grid;
	place-items: center;
	margin-top: 1px;
}

.ebmd-temuan__isi { flex: 1; min-width: 0; }

.ebmd-temuan__isi strong {
	font-size: 12.5px;
	color: var(--ink);
	display: flex;
	align-items: center;
	gap: 7px;
}

.ebmd-temuan__isi p {
	margin: 2px 0 0;
	font-size: 12.5px;
	color: var(--ink-2);
}

.ebmd-temuan__tautan {
	font-size: 12px;
	font-weight: 600;
	color: var(--brand-600);
	text-decoration: none;
	white-space: nowrap;
}

.ebmd-temuan__tautan:hover { text-decoration: underline; }

.ebmd-tag-ai {
	font-size: 10px;
	letter-spacing: .06em;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--brand-50);
	color: var(--brand-700);
}

.ebmd-temuan-mini {
	display: inline-flex;
	gap: 6px;
}

.ebmd-temuan-mini__item {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--ink-2);
	font-variant-numeric: tabular-nums;
}

.ebmd-temuan-mini__item .ebmd-icon { color: var(--badge, var(--muted)); }
.ebmd-temuan-mini__item.is-kosong { opacity: .32; }

.ebmd-badge--jenis {
	background: var(--brand-50);
	border-color: var(--brand-100);
	color: var(--brand-700);
	font-size: 11px;
	letter-spacing: .04em;
}

/* -------------------------------------------------------------- tombol */

.ebmd-btn--kecil {
	padding: 6px 10px;
	font-size: 12px;
}

.ebmd-btn--bahaya {
	background: #fcf3f1;
	border-color: #eecdc8;
	color: #a5301f;
}

.ebmd-btn--bahaya:hover {
	background: #fae7e3;
	border-color: #e5b5ad;
}

.ebmd-btn.is-sibuk {
	opacity: .7;
	cursor: progress;
}

/*
 * Sel aksi tidak boleh memakai display:flex - sebuah <td> yang diubah menjadi
 * flex container keluar dari perhitungan lebar tabel sehingga isinya meluap.
 */
.ebmd-table__aksi {
	white-space: nowrap;
	text-align: right;
}

.ebmd-table__aksi > * {
	vertical-align: middle;
}

.ebmd-table__aksi > * + * {
	margin-left: 6px;
}

.ebmd-inline { display: inline; margin: 0; }

.ebmd-panel__aksi { display: flex; gap: 8px; flex-wrap: wrap; }

.ebmd-hapus-dokumen { margin-top: 4px; }

/*
 * Formulir tingkat halaman menumpuk kartunya sendiri, di luar jangkauan gap
 * milik .ebmd-content. Tanpa aturan ini kartu-kartunya berhimpitan dan baris
 * tombol menempel pada kartu terakhir.
 */
.ebmd-form-app {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ebmd-aksi-bawah {
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
}

/* Di dalam baris tombol, teks bantuan sejajar tombol, bukan turun sendiri. */
.ebmd-aksi-bawah .ebmd-bantuan {
	margin: 0;
}

/* ------------------------------------------------------ pengguna & profil */

.ebmd-pengguna {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ebmd-pengguna strong { display: block; color: var(--ink); font-size: 13px; }
.ebmd-pengguna small { color: var(--muted); font-size: 11.5px; }

tr.is-disunting td { background: var(--brand-50) !important; }

.ebmd-avatar--besar {
	width: 62px;
	height: 62px;
	font-size: 20px;
}

.ebmd-profil-kartu {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 6px 0 18px;
	text-align: center;
	border-bottom: 1px solid var(--line);
	margin-bottom: 16px;
}

.ebmd-profil-kartu strong { font-size: 15px; }
.ebmd-profil-kartu small { color: var(--muted); }

.ebmd-subjudul {
	margin: 20px 0 8px;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #9c998e;
}

.ebmd-list-ringkas {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.ebmd-list-ringkas a {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}

.ebmd-list-ringkas a:hover { color: var(--brand-600); }
.ebmd-list-ringkas small { display: block; color: var(--muted); font-size: 11.5px; }

.ebmd-form--dua {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px;
}

.ebmd-form--dua .ebmd-form__aksi { grid-column: 1 / -1; }

.ebmd-field input:disabled {
	background: #f3f1ea;
	color: var(--muted);
	cursor: not-allowed;
}

.ebmd-bantuan {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.6;
}

.ebmd-link--blok {
	display: block;
	text-align: center;
	margin-top: 10px;
	font-size: 12.5px;
}

/* -------------------------------------------------------------- notifikasi */

.ebmd-alert--info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }

.ebmd-toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	max-width: 340px;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	background: var(--ink);
	color: #fff;
	font-size: 13px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, .26);
	z-index: 60;
	transition: opacity .35s ease, transform .35s ease;
}

.ebmd-toast--galat { background: #93281c; }
.ebmd-toast.is-keluar { opacity: 0; transform: translateY(8px); }

/* ---------------------------------------------------------------- responsif */

@media (max-width: 720px) {
	.ebmd-ringkas { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
	.ebmd-dropzone { flex-direction: column; text-align: center; }
	.ebmd-simpan-bar { left: 12px; right: 12px; transform: none; justify-content: space-between; }
	.ebmd-editor { max-height: none; }
}

@media print {
	.ebmd-simpan-bar, .ebmd-toast, .ebmd-dropzone { display: none !important; }
}

/* ------------------------------------------------------- lambang & logo */

.ebmd-logo-svg {
	display: block;
	border-radius: 50%;
}

.ebmd-logo-mark {
	display: inline-grid;
	place-items: center;
	flex: none;
}

.ebmd-logo-img {
	max-height: 40px;
	width: auto;
}

/* -------------------------------------------------- formulir master data */

.ebmd-form--tiga {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

/*
 * Baris identitas master data: nama UPB jauh lebih panjang daripada tahun dan
 * jabatan, jadi ketiganya diberi lebar sendiri-sendiri alih-alih dibagi rata.
 */
.ebmd-form--identitas {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 260px;
	gap: 16px;
}

/* Jarak antara blok kisi dan isian tunggal yang mengikutinya. */
.ebmd-form--tiga + .ebmd-field,
.ebmd-form--identitas + .ebmd-field,
.ebmd-form--dua + .ebmd-field,
.ebmd-field + .ebmd-form--dua,
.ebmd-field + .ebmd-field,
.ebmd-field + .ebmd-alert {
	margin-top: 16px;
}

/*
 * Di dalam kisi, jarak antar isian sudah diatur oleh gap; margin sibling di
 * atas justru menggeser kolom kedua dan ketiga sehingga labelnya tidak lagi
 * sebaris dengan kolom pertama.
 */
.ebmd-form--tiga > .ebmd-field + .ebmd-field,
.ebmd-form--identitas > .ebmd-field + .ebmd-field,
.ebmd-form--dua > .ebmd-field + .ebmd-field {
	margin-top: 0;
}

.ebmd-field select:focus {
	outline: none;
	border-color: var(--brand);
	background: var(--surface);
	box-shadow: 0 0 0 3px var(--brand-50);
}

/* Isian pilihan pada formulir penuh sepadan tingginya dengan isian teks. */
.ebmd-form-master .ebmd-field select,
.ebmd-form-rekon .ebmd-field select {
	padding: 11px 12px;
	font-size: 14px;
	background: var(--surface-2);
}

/* Jenis rekon: pilihan radio tersusun menurun, satu jenis per baris. */
.ebmd-pilihan {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
}

.ebmd-pilihan__kosong {
	align-self: stretch;
	margin: 0;
	padding: 11px 12px;
	border: 1px dashed var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--muted);
	font-size: 14px;
}

.ebmd-field .ebmd-pilihan__opsi {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 5px 10px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--ink);
	font-size: 12.5px;
	font-weight: 400;
	line-height: 1.35;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}

.ebmd-field .ebmd-pilihan__opsi:hover {
	border-color: var(--brand-100);
}

.ebmd-field .ebmd-pilihan__opsi input {
	width: 14px;
	height: 14px;
	margin: 0;
	padding: 0;
	flex: none;
	accent-color: var(--brand);
	cursor: pointer;
}

.ebmd-field .ebmd-pilihan__opsi input:focus {
	box-shadow: none;
}

.ebmd-field .ebmd-pilihan__opsi:has(input:focus-visible) {
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-50);
}

.ebmd-field .ebmd-pilihan__opsi:has(input:checked) {
	background: var(--brand-50);
	border-color: var(--brand);
	color: var(--brand-700);
}

.ebmd-berkas {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}

.ebmd-berkas__item {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 13px 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
}

.ebmd-berkas__item.is-terisi {
	border-color: var(--brand-100);
	background: var(--brand-50);
}

.ebmd-berkas__label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-2);
}

.ebmd-berkas__item input[type="file"] {
	font-size: 12px;
	color: var(--muted);
	max-width: 100%;
}

.ebmd-berkas__item input[type="file"]::file-selector-button {
	margin-right: 8px;
	padding: 5px 10px;
	border: 1px solid var(--line);
	border-radius: 7px;
	background: var(--surface);
	font: inherit;
	font-size: 12px;
	color: var(--ink-2);
	cursor: pointer;
}

.ebmd-berkas__ada {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 12px;
	color: var(--ink-2);
	overflow-wrap: anywhere;
}

.ebmd-berkas__ada small {
	margin-left: auto;
	color: var(--muted);
	white-space: nowrap;
}

/* ------------------------------------------------ dokumen pendukung rekon */

.ebmd-dokumen {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.ebmd-dokumen__baris h3 {
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink-2);
}

.ebmd-berkas__label small {
	display: block;
	margin-top: 2px;
	font-weight: 400;
	font-size: 11px;
	color: var(--muted);
}

.ebmd-dokumen__nomor {
	margin: 0;
	font-size: 12px;
	color: var(--ink-2);
	overflow-wrap: anywhere;
}

.ebmd-dokumen__hapus {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--muted);
	cursor: pointer;
}

/* ----------------------------------------------------- tabel rincian rekon */

.ebmd-table--rekon th small {
	display: block;
	margin-top: 2px;
	font-weight: 400;
	font-size: 10.5px;
	text-transform: none;
	letter-spacing: 0;
	color: var(--muted);
}

.ebmd-table--rekon thead th {
	min-width: 132px;
	white-space: normal;
	vertical-align: bottom;
}

.ebmd-table--rekon td {
	padding: 0;
}

.ebmd-table--rekon td input {
	width: 100%;
	min-width: 132px;
	padding: 9px 10px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 13px;
	color: var(--ink);
}

.ebmd-table--rekon td input:focus {
	outline: 2px solid var(--brand);
	outline-offset: -2px;
	background: var(--brand-50);
}

.ebmd-table--rekon td:last-child {
	padding: 6px 10px;
	text-align: right;
}

.ebmd-form-rekon .ebmd-table-wrap:empty {
	display: none;
}

/* ---------------------------------------------------------------- responsif */

@media (max-width: 960px) {
	.ebmd-form--identitas {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	.ebmd-form--tiga {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------- pemilih aset rekon */

.ebmd-aset {
	position: relative;
	min-width: 230px;
	padding: 6px 8px;
}

.ebmd-aset__cari {
	width: 100%;
	padding: 6px 9px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	font: inherit;
	font-size: 12.5px;
	color: var(--ink);
}

.ebmd-aset__cari:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-50);
}

.ebmd-aset__terpilih {
	margin: 5px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--ink-2);
	overflow-wrap: anywhere;
}

.ebmd-aset__terpilih:empty {
	display: none;
}

.ebmd-aset__daftar {
	position: absolute;
	z-index: 20;
	left: 8px;
	right: 8px;
	top: calc(100% - 4px);
	max-height: 230px;
	overflow-y: auto;
	margin: 0;
	padding: 4px;
	list-style: none;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.ebmd-aset__daftar button {
	display: block;
	width: 100%;
	padding: 7px 9px;
	border: 0;
	border-radius: 7px;
	background: none;
	font: inherit;
	font-size: 12.5px;
	text-align: left;
	color: var(--ink);
	cursor: pointer;
}

.ebmd-aset__daftar button:hover,
.ebmd-aset__daftar button:focus-visible {
	background: var(--brand-50);
	color: var(--brand-700);
}

.ebmd-aset__pesan {
	padding: 8px 9px;
	font-size: 12px;
	color: var(--muted);
}
