/* SISPEN — Pengumuman Seleksi Peserta Pelatihan, BPVP Bantaeng
   Token warna diambil dari variabel Figma. Breakpoint: mobile < 768 ≤ tablet < 1200 ≤ desktop. */

:root {
	--surface-page: #f4f6fa;
	--surface-card: #ffffff;
	/* v2.3: kartu hasil bertema biru Kemnaker (sebelumnya hitam #14161a). */
	--surface-dark: #0e4c92;
	--surface-dark-elevated: #0b3f7c;
	--brand-navy-900: #0a2647;
	--brand-blue-700: #0e4c92;
	--brand-blue-500: #1877d1;
	--brand-blue-300: #4f97e8;
	--brand-accent: #f2a413;
	--state-success: #16a34a;
	--state-danger: #d64545;
	--text-primary: #16202e;
	--text-secondary: #5b6676;
	--text-on-dark-primary: #ffffff;
	--text-on-dark-secondary: #d5e5f8;
	--text-on-dark-label: #a9d2ff;
	--border-subtle: #e2e7ef;
	--border-dark: #3570b4;
	--font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--surface-page);
	color: var(--text-primary);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
h1, h2, p, dl, dd { margin: 0; }
img { display: block; }
button, input { font: inherit; }

/* Varian teks per ukuran layar (mengikuti copy di tiap frame Figma). */
.v-wide, .v-tablet, .v-desktop { display: none; }

/* ---------- Logo ---------- */
.logo { position: relative; flex-shrink: 0; width: 42px; height: 42px; }
.logo img { position: absolute; max-width: none; }
.logo__shape { left: 9px; top: 7px; }
.logo__emblem { left: 12px; top: 8px; width: 25px; height: 25px; }

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand__text { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; line-height: 1.4; }
.brand__name { font-weight: 700; font-size: 12px; letter-spacing: 0.04em; color: var(--text-on-dark-primary); }
.brand__sub { font-size: 11px; color: var(--text-on-dark-secondary); }

/* ---------- Top bar ---------- */
.topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 14px 16px;
	background: var(--brand-navy-900);
	color: var(--text-on-dark-primary);
}
.topbar__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__back {
	font-family: Inter, system-ui, sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.4;
	color: inherit;
	text-decoration: none;
}
.topbar__title { font-weight: 700; font-size: 15px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page--sub .topbar__title { font-weight: 600; }
.topbar .brand, .topbar__nav { display: none; }
.topbar__nav a {
	font-size: 14px;
	line-height: 1.5;
	color: var(--text-on-dark-secondary);
	text-decoration: none;
	white-space: nowrap;
}
.topbar__nav a:hover, .topbar__nav a[aria-current="page"] { color: var(--text-on-dark-primary); }
.topbar__nav a[aria-current="page"] { font-weight: 600; }

/* ---------- Hero ---------- */
.hero { padding: 22px 20px 26px; color: var(--text-on-dark-primary); }
.hero--blue { background: var(--brand-blue-700); }
.hero--navy { background: var(--brand-navy-900); }
.hero__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero__inner--intro { gap: 12px; }
.hero__text { display: flex; flex-direction: column; gap: 14px; }
.hero__title { font-weight: 800; font-size: 24px; line-height: 1.2; }
.hero__desc { font-size: 13px; line-height: 1.5; color: var(--text-on-dark-secondary); }
.hero__headline { font-weight: 800; font-size: 24px; line-height: 1.18; text-transform: uppercase; }
.hero__headline--lg { font-size: 25px; }
.hero__sub { font-size: 13px; line-height: 1.5; color: var(--text-on-dark-secondary); }
.hero__sub--strong { font-weight: 500; line-height: 1.4; }

.badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--text-on-dark-primary);
	white-space: nowrap;
}
.badge--success { background: var(--state-success); }
.badge--danger { background: var(--state-danger); }
.badge--accent { background: var(--brand-accent); color: var(--text-primary); }

/* ---------- Main ---------- */
.main {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 22px 20px 28px;
}
/* Mobile: kartu hasil biru di atas latar terang, sama seperti halaman cek. */
.main--result { padding: 16px 16px 28px; background: var(--surface-page); }
.main--empty { justify-content: center; padding: 28px; }

.card { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: 20px; }

/* ---------- Form ---------- */
.form-card { width: 100%; display: flex; flex-direction: column; gap: 16px; padding: 20px 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label {
	font-weight: 700;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-secondary);
}
.field__input {
	width: 100%;
	padding: 13px 14px;
	background: var(--surface-page);
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	font-weight: 500;
	font-size: 14px;
	line-height: 1.4;
	color: var(--text-primary);
}
.field__input::placeholder { color: var(--text-secondary); opacity: 1; }
.field__input:focus { outline: none; border-color: var(--brand-blue-500); box-shadow: 0 0 0 3px rgba(24, 119, 209, 0.18); }
.field__input[aria-invalid="true"] { border-color: var(--state-danger); }
.field__error { font-size: 12px; color: var(--state-danger); }

.notes {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 0 4px;
	font-size: 12px;
	line-height: 1.55;
	color: var(--text-secondary);
}
.notes a { color: inherit; text-decoration: none; }
.notes a:hover strong { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 20px;
	border: 1px solid transparent;
	border-radius: 12px;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s, background-color 0.15s;
}
.btn:hover { filter: brightness(1.07); }
.btn:focus-visible { outline: 3px solid rgba(95, 168, 245, 0.6); outline-offset: 2px; }
.btn:disabled { cursor: progress; opacity: 0.75; }
.btn--primary { background: var(--brand-blue-500); color: var(--text-on-dark-primary); }
.btn--accent { background: var(--brand-accent); color: var(--text-primary); }
.btn--outline-dark { background: transparent; border-color: var(--border-dark); color: var(--text-on-dark-primary); }
.btn--outline-dark:hover { background: rgba(255, 255, 255, 0.04); }
.btn--outline { background: transparent; border-color: var(--border-subtle); color: var(--text-primary); }
.btn--outline:hover { background: var(--surface-card); }

/* ---------- Kartu hasil (gelap) ---------- */
.dcard {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 24px 20px 28px;
	background: var(--surface-dark);
	color: var(--text-on-dark-primary);
	border-radius: 16px;
	box-shadow: 0 10px 24px rgba(14, 76, 146, 0.18);
}
.eyebrow {
	font-weight: 700;
	font-size: 12px;
	line-height: 1.4;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--text-on-dark-label);
}

.identity { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.qr { flex-shrink: 0; width: 104px; height: 104px; padding: 12px; background: var(--surface-card); border-radius: 8px; }
.qr__code { width: 80px; height: 80px; }
.qr__code svg { display: block; width: 100%; height: 100%; }
.identity__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.identity__name { font-weight: 800; font-size: 28px; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
.identity__kejuruan { font-weight: 600; font-size: 15px; line-height: 1.3; text-transform: uppercase; }
.identity__unit { font-size: 13px; line-height: 1.4; color: var(--text-on-dark-secondary); }

.summary { display: flex; flex-direction: column; gap: 4px; }
.summary__name { font-weight: 800; font-size: 24px; line-height: 1.25; text-transform: uppercase; overflow-wrap: anywhere; }
.summary__kejuruan { font-size: 14px; line-height: 1.4; color: var(--text-on-dark-secondary); }

.divider { width: 100%; height: 1px; }
.divider img { width: 100%; height: 1px; }

.details { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; row-gap: 18px; }
.details__item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.details__item--full { grid-column: 1 / -1; }
.details dt {
	font-weight: 700;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-on-dark-label);
}
.details dd { font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }

.notice {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	background: var(--surface-dark-elevated);
	border: 1px solid var(--border-dark);
	border-radius: 12px;
}
.notice__title {
	font-weight: 700;
	font-size: 11px;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--brand-accent);
}
.notice__body { font-size: 12px; line-height: 1.55; color: var(--text-on-dark-secondary); }

.actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Data tidak ditemukan ---------- */
.empty { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.empty__icon { padding: 20px; border-radius: 999px; background: var(--border-subtle); }
.empty__icon span { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; }
.empty__text { display: flex; flex-direction: column; gap: 14px; }
.empty__title { font-weight: 800; font-size: 20px; line-height: 1.4; }
.empty__desc { font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.empty__actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Pesan & sesi aktif (halaman cek) ---------- */
.alert {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #bcd6f3;
	border-radius: 12px;
	background: #eaf3fd;
	color: var(--brand-blue-700);
	font-size: 13px;
	line-height: 1.5;
}
.sesi {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 12px 14px;
	border: 1px solid var(--border-subtle);
	border-radius: 12px;
	background: var(--surface-card);
	font-size: 13px;
	line-height: 1.5;
}
.sesi__aksi { display: flex; gap: 8px; }
.btn--sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }

/* ---------- Timeline jadwal ---------- */
.timeline { width: 100%; max-width: 680px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.timeline__item {
	display: grid;
	grid-template-columns: 92px 1fr;
	min-height: 76px;
	border-radius: 14px;
	overflow: hidden;
	color: var(--text-on-dark-primary);
	box-shadow: 0 6px 14px rgba(14, 76, 146, 0.18);
}
.timeline__tanggal {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 10px 6px;
	background: var(--brand-blue-700);
	text-align: center;
}
.timeline__hari { font-weight: 800; font-size: 22px; line-height: 1.1; white-space: nowrap; }
.timeline__bulan { font-size: 13px; line-height: 1.3; }
.timeline__kegiatan {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 16px;
	border-left: 2px solid rgba(255, 255, 255, 0.85);
	background: linear-gradient(90deg, var(--brand-blue-500), var(--brand-blue-300));
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	text-align: center;
}
.timeline__status {
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--brand-accent);
	color: var(--text-primary);
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.03em;
}
.timeline__status--selesai { background: rgba(255, 255, 255, 0.22); color: var(--text-on-dark-primary); }
.timeline__item.is-selesai { opacity: 0.6; }
.timeline__item.is-berlangsung { box-shadow: 0 0 0 3px var(--brand-accent), 0 6px 14px rgba(14, 76, 146, 0.18); }
.timeline__info { width: 100%; max-width: 680px; font-size: 13px; color: var(--text-secondary); text-align: center; }
.timeline__info a { color: var(--brand-blue-700); text-decoration: none; }
.timeline__info a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { display: none; }

/* ---------- Toast (salin teks bagikan) ---------- */
.toast {
	position: fixed;
	left: 50%;
	bottom: 24px;
	z-index: 10;
	max-width: calc(100% - 32px);
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--text-primary);
	color: var(--text-on-dark-primary);
	font-size: 13px;
	transform: translateX(-50%);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

/* ================= Tablet ================= */
@media (min-width: 768px) {
	.v-mobile { display: none; }
	.v-wide, .v-tablet { display: inline; }

	.topbar { padding: 18px 32px; }
	.topbar__title { display: none; }
	.topbar .brand { display: flex; }
	.topbar__nav { display: flex; gap: 24px; }
	.brand__text { line-height: 1.2; }
	.brand__name { font-weight: 800; font-size: 15px; }
	.brand__sub { font-size: 11px; }
	.brand--hero { display: none; }

	.hero { padding: 40px; }
	.hero__inner { align-items: center; gap: 16px; text-align: center; }
	.hero__inner--intro { gap: 12px; max-width: 580px; margin: 0 auto; }
	.hero__text { gap: 8px; max-width: 600px; }
	.hero__title { font-size: 28px; }
	.hero__desc { font-size: 14px; line-height: 1.6; }
	.hero__headline { font-size: 22px; line-height: 1.3; }
	.hero__headline--lg { font-size: 24px; }
	.hero__sub { line-height: 1.6; }
	.hero__sub--strong { font-size: 14px; line-height: 1.4; }
	.badge { padding: 8px 16px; font-size: 12px; letter-spacing: 0.06em; }

	.main { justify-content: flex-start; gap: 24px; padding: 40px 32px 64px; }
	.main--center { justify-content: center; }
	.main--result { background: transparent; }

	.form-card { max-width: 560px; gap: 20px; padding: 32px; box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05); }
	.field { gap: 8px; }
	.field__label { font-size: 12px; }
	.field__input { line-height: 1.5; }
	.btn { padding: 15px 12px; font-size: 13px; line-height: 1.5; }
	.btn--submit { font-size: 14px; }
	.notes { max-width: 560px; gap: 12px; padding: 0; line-height: 1.6; }
	.alert, .sesi { max-width: 560px; }
	.timeline { gap: 18px; }
	.timeline__item { grid-template-columns: 128px 1fr; min-height: 92px; }
	.timeline__hari { font-size: 30px; }
	.timeline__bulan { font-size: 15px; }
	.timeline__kegiatan { padding: 14px 24px; font-size: 20px; }

	.dcard { max-width: 600px; gap: 24px; padding: 32px; border-radius: 24px; }
	.dcard--wide { max-width: 640px; }
	.dcard--ringkas { gap: 20px; }
	.identity { flex-direction: row; align-items: center; gap: 20px; }
	.qr { border-radius: 12px; }
	.identity__name { font-size: 26px; line-height: 1.5; }
	.identity__kejuruan { font-size: 14px; line-height: 1.5; }
	.identity__unit { font-size: 12px; line-height: 1.5; }
	.summary__name { line-height: 1.5; }
	.details { column-gap: 32px; row-gap: 16px; }
	.details__item { gap: 4px; }
	.details__item--full { grid-column: auto; }
	.details dd { line-height: 1.4; }
	.notice { gap: 8px; padding: 20px; border-radius: 16px; }
	.notice__title { font-size: 12px; }
	.notice__body { line-height: 1.6; }
	.actions { flex-direction: row; gap: 16px; }
	.actions .btn { flex: 1 1 0; }

	.main--empty { padding: 40px 32px 64px; }
	.empty {
		max-width: 580px;
		gap: 24px;
		padding: 48px;
		background: var(--surface-card);
		border: 1px solid var(--border-subtle);
		border-radius: 24px;
		box-shadow: 0 15px 16px rgba(0, 0, 0, 0.03);
	}
	.empty__icon { background: var(--surface-page); }
	.empty__text { gap: 12px; }
	.empty__title { font-size: 24px; line-height: 1.5; }
	.empty__desc { font-size: 13px; line-height: 1.6; }

	.site-footer {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 8px;
		padding: 24px 32px;
		background: var(--brand-navy-900);
		border-top: 1px solid var(--border-dark);
		color: var(--text-on-dark-secondary);
		font-size: 12px;
		line-height: 1.5;
		text-align: center;
	}
}

/* ================= Desktop ================= */
@media (min-width: 1200px) {
	.v-tablet { display: none; }
	.v-desktop { display: inline; }

	.topbar { padding: 16px 30px; }
	.topbar__brand { gap: 14px; }
	.topbar__nav { gap: 32px; }
	.brand { gap: 14px; }
	.brand__name { font-size: 16px; }
	.brand__sub { font-size: 12px; }

	.hero { padding: 48px 80px; }
	.hero__inner--intro { max-width: 800px; }
	.hero__text { max-width: 900px; }
	.hero__title { font-size: 36px; }
	.hero__desc { font-size: 15px; }
	.hero__headline { font-size: 30px; }
	.hero__headline--lg { font-size: 32px; }
	.hero__sub { font-size: 14px; }
	.hero__sub--strong { font-size: 16px; }

	.main { padding: 48px 80px 64px; }

	.form-card { max-width: 640px; gap: 24px; }
	.btn { font-size: 14px; }
	.btn--submit { font-size: 15px; }
	.notes { max-width: 640px; font-size: 13px; }
	.alert, .sesi { max-width: 640px; }

	.dcard { max-width: 800px; padding: 40px; }
	.dcard--wide { max-width: 900px; }
	.dcard--ringkas { gap: 24px; }
	.identity { gap: 24px; }
	.identity__name { font-size: 32px; }
	.identity__kejuruan { font-size: 16px; }
	.identity__unit { font-size: 13px; }
	.summary__name { font-size: 28px; }
	.details { column-gap: 40px; row-gap: 18px; }
	.details dd { line-height: 1.5; }
	.notice { padding: 24px; }
	.notice__body { font-size: 13px; }

	.empty { max-width: 640px; }
	.empty__desc { font-size: 14px; }

	.site-footer { flex-direction: row; justify-content: space-between; padding: 24px 80px; font-size: 13px; }
}

/* ================= Cetak / simpan PDF ================= */
@media print {
	@page { margin: 16mm; }
	body { background: #fff; color: #000; min-height: 0; }
	.topbar, .site-footer, .actions, .toast { display: none !important; }
	.hero { background: none; color: #000; padding: 0 0 16px; }
	.hero__inner { align-items: flex-start; text-align: left; }
	.hero__sub { color: #333; }
	.badge { border: 1px solid currentColor; background: none; color: #15803d; }
	.main, .main--result { padding: 0; background: none; }
	.dcard { max-width: none; padding: 20px; background: #fff; color: #000; border: 1px solid #ccc; border-radius: 12px; }
	.eyebrow, .details dt { color: #0e4c92; }
	.identity__unit { color: #333; }
	.qr { border: 1px solid #ccc; }
	.notice { background: #f4f6fa; border-color: #ddd; }
	.notice__title { color: #a35f00; }
	.notice__body { color: #333; }
	.divider img { filter: invert(0.6); }
}
