/* Sertifikat Panitia › modul admin/TU (#sertifikatView) dan halaman publik cek keaslian (#srtPublik).
   Mengikuti token --app-* SIGAPP dan aksen hijau hutan yang sama dengan BERSERI/CV Saudi. Pemisah antarbagian memakai
   selisih nada, bukan garis; garis hanya pada tabel. main.css memaksa <button> berbentuk pil, jadi kontrol di sini pil. */

:is(#sertifikatView, #srtPublik) {
  --srt-bg: var(--app-bg, #f0f4ed);
  --srt-card: var(--app-card, #ffffff);
  --srt-ink: var(--app-text, #1e293b);
  --srt-dim: color-mix(in srgb, var(--srt-ink) 72%, var(--srt-card));
  --srt-fill: color-mix(in srgb, var(--srt-ink) 6%, var(--srt-card));
  --srt-fill-2: color-mix(in srgb, var(--srt-ink) 11%, var(--srt-card));
  --srt-line: color-mix(in srgb, var(--srt-ink) 13%, transparent);
  --srt-accent: #2f6f4e;
  --srt-on-accent: #ffffff;
  --srt-ok: #2f6f4e; --srt-ok-bg: #e3f1e8;
  --srt-x: #b42318; --srt-x-bg: #fde3df;
  --srt-warn: #8a5a00; --srt-warn-bg: #fdf0d2;
  --srt-wa: #1f8a4c;
  --srt-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color: var(--srt-ink);
  font: 15px/1.5 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:is([data-theme="dark"] #sertifikatView, [data-theme="dark"] #srtPublik) {
  --srt-accent: #7cc49a; --srt-on-accent: #0b1f14;
  --srt-ok: #8fd3aa; --srt-ok-bg: rgba(124, 196, 154, 0.14);
  --srt-x: #ff9a8b; --srt-x-bg: rgba(240, 110, 95, 0.18);
  --srt-warn: #f0c46b; --srt-warn-bg: rgba(240, 196, 107, 0.14);
  --srt-wa: #6fd49a;
}

#sertifikatView *, #sertifikatView *::before, #sertifikatView *::after, #srtPublik *, #srtPublik *::before, #srtPublik *::after { box-sizing: border-box; }
:is(#sertifikatView, #srtPublik) :is(p, ol, ul, figure, fieldset) { margin: 0; }
#sertifikatView .srt-shell { max-width: 1240px; margin: 0 auto; padding: 16px 24px 120px; }
:is(#sertifikatView, #srtPublik) [hidden] { display: none !important; }
:is(#sertifikatView, #srtPublik) .srt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:is(#sertifikatView, #srtPublik) svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
:is(#sertifikatView, #srtPublik) code { padding: 1px 6px; border-radius: 6px; background: var(--srt-fill); font: 600 13px/1.4 ui-monospace, "SFMono-Regular", Menlo, monospace; }
:is(#sertifikatView, #srtPublik) h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 750; }
:is(#sertifikatView, #srtPublik) :is(th, td, label, legend, small, span) { text-transform: none; letter-spacing: normal; }

/* ── Kontrol ── */
:is(#sertifikatView, #srtPublik) :where(button, select, input, textarea) { font: inherit; color: inherit; }
/* :where() menjaga spesifisitas rendah agar kelas varian (.srt-primary, .srt-kecil, …) selalu menang. */
:is(#sertifikatView, #srtPublik) :where(button, a.srt-ikon) {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 9px 18px; border: 0; border-radius: 999px !important;
  background: var(--srt-fill); color: var(--srt-ink); font-size: 14px; font-weight: 650; line-height: 1.2; text-decoration: none;
  box-shadow: none; /* taste-skill-ignore: reset bayangan tombol main.css */
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--srt-ease), background-color 160ms ease, color 160ms ease;
}
@media (hover: hover) { :is(#sertifikatView, #srtPublik) :where(button, a.srt-ikon):where(:hover:not(:disabled)) { background: var(--srt-fill-2); } }
:is(#sertifikatView, #srtPublik) :where(button, a.srt-ikon):where(:active:not(:disabled)) { transform: scale(0.96); }
:is(#sertifikatView, #srtPublik) button:disabled { opacity: 0.45; cursor: not-allowed; }
@media (hover: hover) { #sertifikatView .srt-wa:hover:not(:disabled) { background: color-mix(in srgb, var(--srt-wa) 86%, var(--srt-ink)); } }
:is(#sertifikatView, #srtPublik) :is(button, select, input, textarea, summary, a, [tabindex]):focus-visible { outline: 3px solid color-mix(in srgb, var(--srt-accent) 55%, transparent); outline-offset: 2px; }
:is(#sertifikatView, #srtPublik) .srt-primary { background: var(--srt-accent); color: var(--srt-on-accent); }
@media (hover: hover) { :is(#sertifikatView, #srtPublik) .srt-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--srt-accent) 86%, var(--srt-ink)); } }
#sertifikatView .srt-kecil { min-height: 38px; padding: 7px 14px; font-size: 13.5px; }
#sertifikatView .srt-ikon { width: 40px; min-height: 40px; padding: 0; }
#sertifikatView .srt-bahaya { color: var(--srt-x); }
#sertifikatView .srt-tipis { background: transparent; }
#sertifikatView .srt-link { min-height: 36px; padding: 6px 4px; justify-content: flex-start; background: transparent; color: var(--srt-accent); text-align: left; text-decoration: underline; text-underline-offset: 3px; }
#sertifikatView li > .srt-link, #sertifikatView p > .srt-link { display: inline; min-height: 0; padding: 0; }
@media (hover: hover) { #sertifikatView .srt-link:hover:not(:disabled) { background: transparent; color: color-mix(in srgb, var(--srt-accent) 80%, var(--srt-ink)); } }
#sertifikatView .srt-wa { background: var(--srt-wa); color: #ffffff; }
[data-theme="dark"] #sertifikatView .srt-wa { color: #0b1f14; }

:is(#sertifikatView, #srtPublik) .srt-field { display: grid; gap: 5px; align-content: start; font-size: 13px; font-weight: 650; color: var(--srt-dim); }
#sertifikatView .srt-field em { font-style: normal; font-weight: 600; color: var(--srt-x); }
#sertifikatView .srt-field small { font-weight: 500; }
:is(#sertifikatView, #srtPublik) .srt-field :is(input, select, textarea) {
  width: 100%; min-height: 44px; padding: 9px 16px; border: 1.5px solid transparent; border-radius: 14px !important;
  background: var(--srt-fill); color: var(--srt-ink); font-size: 15px; font-weight: 550; box-shadow: none; /* taste-skill-ignore */
}
#sertifikatView .srt-field textarea { resize: vertical; line-height: 1.45; }
#sertifikatView .srt-field input[type="color"] { padding: 4px 6px; height: 44px; }
#sertifikatView .srt-field input[type="range"] { padding: 0; min-height: 32px; background: transparent; accent-color: var(--srt-accent); }
:is(#sertifikatView, #srtPublik) .srt-field :is(input, select, textarea):focus { border-color: color-mix(in srgb, var(--srt-accent) 60%, transparent); outline: none; }
#sertifikatView .srt-cek, #sertifikatView .srt-radio { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; font-weight: 600; cursor: pointer; }
#sertifikatView .srt-cek input, #sertifikatView .srt-radio input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--srt-accent); flex: none; }
#sertifikatView .srt-radio small { display: block; font-weight: 500; color: var(--srt-dim); font-size: 13px; }
#sertifikatView .srt-radio select { margin-left: 8px; min-height: 36px; padding: 4px 12px; border: 0; border-radius: 10px; background: var(--srt-fill); }
#sertifikatView .srt-dua { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; align-items: end; }
#sertifikatView .srt-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--srt-fill); }
#sertifikatView .srt-seg button { min-height: 36px; padding: 6px 13px; background: transparent; color: var(--srt-dim); font-size: 13px; }
#sertifikatView .srt-seg button[aria-pressed="true"] { background: var(--srt-card); color: var(--srt-ink); }
#sertifikatView .srt-angka { display: flex; align-items: center; gap: 4px; }
#sertifikatView .srt-angka input { text-align: center; min-width: 0; padding-inline: 6px; }

/* ── Kepala & kartu ── */
#sertifikatView .srt-back { min-height: 36px; margin: 0 0 6px -10px; padding: 5px 13px 5px 8px; background: transparent; color: var(--srt-accent); }
#sertifikatView .srt-head { margin: 2px 0 20px; }
#sertifikatView .srt-head h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); line-height: 1.05; letter-spacing: -0.03em; font-weight: 800; overflow-wrap: anywhere; }
#sertifikatView .srt-head h1:focus { outline: none; }
#sertifikatView .srt-head > p, #sertifikatView .srt-sub { margin-top: 6px; max-width: 70ch; color: var(--srt-dim); font-size: 15px; }
#sertifikatView .srt-head-acara { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
#sertifikatView .srt-head-acara > div:first-child { flex: 1 1 420px; min-width: 0; }
#sertifikatView .srt-head-acara > div:first-child p { max-width: 70ch; }
#sertifikatView .srt-status-wrap { display: flex; align-items: center; gap: 8px; }
#sertifikatView .srt-status { font-size: 13.5px; font-weight: 650; color: var(--srt-dim); }
#sertifikatView .srt-status.is-ok { color: var(--srt-ok); }
#sertifikatView .srt-status.is-error { color: var(--srt-x); }
#sertifikatView .srt-bar { display: flex; gap: 10px; margin-bottom: 16px; }
#sertifikatView .srt-baris { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* Ringkasan angka seperti KPI CV Study in Saudi. */
#sertifikatView .srt-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
#sertifikatView .srt-kpi > div { display: flex; min-height: 84px; flex-direction: column; justify-content: space-between; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--srt-card); }
#sertifikatView .srt-kpi strong { font-size: 26px; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
#sertifikatView .srt-kpi span { color: var(--srt-dim); font-size: 13px; font-weight: 650; }
#sertifikatView .srt-offline { position: sticky; top: calc(var(--device-nav-height, 0px) + var(--device-safe-top, 0px) + 8px); z-index: 25; margin-bottom: 12px; padding: 10px 16px; border-radius: 14px; background: var(--srt-warn-bg); color: var(--srt-warn); font-weight: 700; }
#sertifikatView .srt-card { padding: 20px; border-radius: 20px; background: var(--srt-card); min-width: 0; }
#sertifikatView .srt-card + .srt-card { margin-top: 14px; }
#sertifikatView .srt-card.is-redup { opacity: 0.7; }
:is(#sertifikatView, #srtPublik) .srt-hint { color: var(--srt-dim); font-size: 13.5px; margin: 6px 0; max-width: 78ch; }
#sertifikatView .srt-warn { margin-top: 8px; padding: 10px 14px; border-radius: 12px; background: var(--srt-warn-bg); color: var(--srt-warn); font-weight: 600; font-size: 13.5px; }
#sertifikatView .srt-warn ul { margin: 4px 0 0; padding-left: 20px; font-weight: 550; }
#sertifikatView .srt-warn + .srt-siap { margin-top: 12px; }
#sertifikatView .srt-warn-teks { color: var(--srt-warn); font-weight: 650; }
#sertifikatView .srt-redup { color: var(--srt-dim); }
#sertifikatView .srt-error, #srtPublik .srt-error { padding: 14px 18px; border-radius: 16px; background: var(--srt-x-bg); color: var(--srt-x); font-weight: 600; }
#sertifikatView .srt-error button { margin-left: 8px; }
#sertifikatView .srt-empty { display: grid; gap: 12px; justify-items: start; padding: 32px 24px; border-radius: 20px; background: var(--srt-card); }
#sertifikatView .srt-empty h2 { font-size: 22px; margin: 0; }
#sertifikatView .srt-empty-kecil { padding: 24px; background: var(--srt-fill); color: var(--srt-dim); }
#sertifikatView .srt-langkah { display: grid; gap: 6px; padding-left: 22px; }
#sertifikatView .srt-skeleton { display: grid; gap: 8px; }
#sertifikatView .srt-skeleton span { height: 72px; border-radius: 18px; background: var(--srt-card); animation: srt-pulse 1.4s ease-in-out infinite; }
@keyframes srt-pulse { 50% { opacity: 0.55; } }
:is(#sertifikatView, #srtPublik) .srt-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; background: var(--srt-fill); color: var(--srt-dim); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
:is(#sertifikatView, #srtPublik) .srt-chip.is-ok { background: var(--srt-ok-bg); color: var(--srt-ok); }
:is(#sertifikatView, #srtPublik) .srt-chip.is-x { background: var(--srt-x-bg); color: var(--srt-x); }
:is(#sertifikatView, #srtPublik) .srt-chip.is-warn { background: var(--srt-warn-bg); color: var(--srt-warn); }

/* ── Daftar acara ── */
#sertifikatView .srt-list { display: grid; gap: 10px; padding: 0; list-style: none; }
#sertifikatView .srt-acara { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px 10px 10px; border-radius: 20px; background: var(--srt-card); }
#sertifikatView .srt-acara-buka { flex: 1 1 280px; display: grid; justify-content: start; justify-items: start; gap: 2px; min-height: 60px; padding: 10px 14px; border-radius: 16px !important; background: transparent; text-align: left; }
#sertifikatView .srt-acara-nama { font-size: 17px; font-weight: 750; letter-spacing: -0.01em; }
#sertifikatView .srt-acara-sub { color: var(--srt-dim); font-weight: 550; font-size: 13.5px; }
#sertifikatView .srt-acara-aksi { display: flex; gap: 6px; margin-left: auto; }

/* ── Langkah ── */
/* Bilah langkah menempel di bawah navigasi SIGAPP sebagai lapisan material tembus pandang: isi bergulir di bawahnya
   (apple-design §12). #appShell memakai overflow-x:hidden yang mematikan sticky; selama modul ini aktif diganti clip
   (memotong sama, tetapi bukan wadah gulir). */
#appShell:has(#sertifikatView.active) { overflow-x: clip; }
#sertifikatView .srt-steps {
  position: sticky; top: calc(var(--device-nav-height, 0px) + var(--device-safe-top, 0px) + 8px); z-index: 20;
  display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--srt-fill-2) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
}
#sertifikatView .srt-steps::-webkit-scrollbar { display: none; }
#sertifikatView .srt-steps button { flex: 1 0 auto; gap: 8px; background: transparent; color: var(--srt-dim); white-space: nowrap; }
#sertifikatView .srt-steps button[aria-selected="true"] { background: var(--srt-card); color: var(--srt-ink); }
#sertifikatView .srt-step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--srt-fill-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
#sertifikatView .srt-steps button[aria-selected="true"] .srt-step-n { background: var(--srt-accent); color: var(--srt-on-accent); }
#sertifikatView .srt-steps button.is-selesai .srt-step-n { background: var(--srt-ok-bg); color: var(--srt-ok); }
#sertifikatView .srt-steps button.is-selesai[aria-selected="true"] .srt-step-n { background: var(--srt-accent); color: var(--srt-on-accent); }
#sertifikatView .srt-step-n svg { width: 14px; height: 14px; stroke-width: 3; }
/* Jalur Cepat (pola CV Study in Saudi): satu kalimat dan satu tombol menuju pekerjaan berikutnya. */
#sertifikatView .srt-jalur { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 16px; padding: 12px 12px 12px 18px; border-radius: 18px; background: color-mix(in srgb, var(--srt-accent) 10%, var(--srt-card)); }
#sertifikatView .srt-jalur p { display: grid; gap: 2px; max-width: 72ch; font-size: 14px; font-weight: 600; }
#sertifikatView .srt-jalur .srt-label { color: var(--srt-accent); }
#sertifikatView .srt-jalur.is-selesai { justify-content: flex-start; gap: 8px; padding: 12px 18px; background: var(--srt-ok-bg); color: var(--srt-ok); font-weight: 650; }
/* Panel masuk dari arah langkah: maju dari kanan, mundur dari kiri (petunjuk arah, apple-design §7–8). */
#sertifikatView .srt-panel.is-maju { animation: srt-dari-kanan 280ms var(--srt-ease) both; }
#sertifikatView .srt-panel.is-mundur { animation: srt-dari-kiri 280ms var(--srt-ease) both; }
@keyframes srt-dari-kanan { from { opacity: 0; transform: translateX(24px); } }
@keyframes srt-dari-kiri { from { opacity: 0; transform: translateX(-24px); } }
#sertifikatView .srt-step-c { font-size: 12px; font-weight: 700; color: var(--srt-dim); font-variant-numeric: tabular-nums; }
#sertifikatView .srt-next { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }

/* ── Data acara ── */
#sertifikatView .srt-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
#sertifikatView .srt-span2 { grid-column: 1 / -1; }
#sertifikatView .srt-contoh { padding: 14px 16px; border-radius: 16px; background: var(--srt-fill); }
#sertifikatView .srt-contoh strong { font-variant-numeric: tabular-nums; }

/* ── Panitia ── */
#sertifikatView .srt-add { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 12px 0 6px; }
#sertifikatView .srt-add button { justify-content: flex-start; gap: 12px; min-height: 64px; padding: 10px 16px; border-radius: 18px !important; text-align: left; }
#sertifikatView .srt-add svg { width: 24px; height: 24px; color: var(--srt-accent); }
#sertifikatView .srt-add small { display: block; color: var(--srt-dim); font-weight: 550; font-size: 12.5px; }
#sertifikatView .srt-tabelkepala { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
#sertifikatView .srt-tabelkepala h2 { margin: 0; }
#sertifikatView .srt-tabelkepala p strong { font-size: 22px; letter-spacing: -0.02em; }
#sertifikatView .srt-alat { display: flex; flex-wrap: wrap; gap: 8px; }
#sertifikatView .srt-cari input { min-width: 240px; }
#sertifikatView .srt-massal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 8px 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--srt-accent) 12%, var(--srt-card)); }
#sertifikatView .srt-massal button { min-height: 36px; padding: 6px 14px; background: var(--srt-card); }
#sertifikatView .srt-massal strong { margin-right: 4px; }
#sertifikatView .srt-scroll { overflow: auto; max-height: calc(100dvh - 180px); border-radius: 16px; background: var(--srt-card); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#sertifikatView .srt-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
#sertifikatView .srt-table th, #sertifikatView .srt-table td { padding: 4px 5px; border-bottom: 1px solid var(--srt-line); text-align: left; vertical-align: middle; }
#sertifikatView .srt-table thead th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; background: var(--srt-fill); font-size: 12.5px; font-weight: 700; white-space: nowrap; border-bottom: 0; }
#sertifikatView .srt-table tbody tr:last-child > * { border-bottom: 0; }
#sertifikatView .srt-table td input:not([type="checkbox"]) { width: 100%; min-width: 120px; min-height: 38px; padding: 6px 10px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; font-size: 14px; }
#sertifikatView .srt-table td input:not([type="checkbox"]):hover { background: var(--srt-fill); }
#sertifikatView .srt-table td input:not([type="checkbox"]):focus { background: var(--srt-fill); border-color: color-mix(in srgb, var(--srt-accent) 55%, transparent); outline: none; }
#sertifikatView .srt-table td input.srt-in-nama { min-width: 210px; font-weight: 650; }
#sertifikatView .srt-table td input[data-a="jabatan"] { min-width: 180px; }
#sertifikatView .srt-table td input[data-a="noWa"] { min-width: 140px; }
#sertifikatView .srt-table td input.is-kosong { background: var(--srt-x-bg); }
#sertifikatView .srt-table td input.is-salah { color: var(--srt-x); text-decoration: wavy underline; text-underline-offset: 3px; }
#sertifikatView .srt-table .srt-cb { width: 40px; text-align: center; }
#sertifikatView .srt-table .srt-cb input { width: 18px; height: 18px; accent-color: var(--srt-accent); }
#sertifikatView .srt-table .srt-no { width: 48px; color: var(--srt-dim); font-variant-numeric: tabular-nums; text-align: right; padding-right: 10px; }
#sertifikatView .srt-table .srt-st { white-space: nowrap; }
#sertifikatView .srt-table tr.is-cabut td input { text-decoration: line-through; color: var(--srt-dim); }
#sertifikatView .srt-table .srt-kosong { padding: 24px; text-align: center; color: var(--srt-dim); }
#sertifikatView .srt-table tbody tr:is(:hover, :focus-within) > td { background: var(--app-hover, color-mix(in srgb, var(--srt-ink) 3%, var(--srt-card))); }
#sertifikatView .srt-nomor { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }
#sertifikatView .srt-aksi-bagi { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
#sertifikatView .srt-table-bagikan td { padding: 8px; }
#sertifikatView tr.is-dikirim td { color: var(--srt-dim); }

/* ── Desain ── */
#sertifikatView .srt-desain { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
#sertifikatView .srt-pratinjau { position: sticky; top: 12px; min-width: 0; }
#sertifikatView .srt-kanvas-wrap { position: relative; width: 100%; border-radius: 6px; overflow: hidden; background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(15, 30, 20, 0.14); /* taste-skill-ignore: kertas sertifikat */ }
#sertifikatView .srt-kanvas-wrap canvas { display: block; width: 100%; height: 100%; }
#sertifikatView .srt-kanvas-kosong { position: absolute; inset: 12% 18%; display: grid; place-items: center; padding: 16px; border: 2px dashed #9aa79f; border-radius: 16px; color: #46524b; text-align: center; font-weight: 650; background: rgba(255, 255, 255, 0.85); }
#sertifikatView .srt-overlay { position: absolute; inset: 0; }
#sertifikatView .srt-kotak { position: absolute; border: 1.5px dashed transparent; border-radius: 4px; cursor: grab; touch-action: none; }
#sertifikatView .srt-kotak:hover { border-color: rgba(47, 111, 78, 0.55); background: rgba(47, 111, 78, 0.05); }
#sertifikatView .srt-kotak.is-aktif { border: 2px solid #2f6f4e; background: rgba(47, 111, 78, 0.07); }
#sertifikatView .srt-kotak:active { cursor: grabbing; }
#sertifikatView .srt-kotak:focus-visible { outline: 3px solid rgba(47, 111, 78, 0.6); outline-offset: 1px; }
#sertifikatView .srt-pnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
#sertifikatView .srt-pnav-nama { flex: 1 1 160px; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sertifikatView .srt-cek-hasil { margin-top: 10px; padding: 12px 16px; border-radius: 14px; background: var(--srt-warn-bg); color: var(--srt-ink); font-size: 14px; }
#sertifikatView .srt-cek-hasil ul { margin-top: 6px; padding-left: 18px; }
#sertifikatView .srt-ok-teks { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--srt-ok); font-weight: 650; }
#sertifikatView .srt-props { display: grid; gap: 14px; min-width: 0; }
#sertifikatView .srt-props .srt-card + .srt-card { margin-top: 0; }
#sertifikatView .srt-props .srt-card { display: grid; gap: 10px; }
#sertifikatView .srt-props h2 { margin: 0; }
#sertifikatView .srt-pilihan2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#sertifikatView .srt-pilihan2 button { display: grid; justify-content: start; justify-items: start; gap: 2px; min-height: 64px; padding: 10px 14px; border: 2px solid transparent; border-radius: 16px !important; text-align: left; }
#sertifikatView .srt-pilihan2 button small { color: var(--srt-dim); font-weight: 550; font-size: 12.5px; }
#sertifikatView .srt-pilihan2 button[aria-pressed="true"] { border-color: var(--srt-accent); background: color-mix(in srgb, var(--srt-accent) 9%, var(--srt-card)); }
#sertifikatView .srt-unggah { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 16px; border: 2px dashed color-mix(in srgb, var(--srt-accent) 45%, transparent); border-radius: 16px; color: var(--srt-accent); font-weight: 700; cursor: pointer; }
#sertifikatView .srt-unggah:hover { background: color-mix(in srgb, var(--srt-accent) 7%, transparent); }
#sertifikatView .srt-unggah-besar { min-height: 120px; margin: 14px 0; flex-direction: column; font-size: 16px; }
#sertifikatView .srt-unggah-besar svg { width: 32px; height: 32px; }
#sertifikatView .srt-unggah-kecil { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; background: var(--srt-fill); font-weight: 650; cursor: pointer; }
#sertifikatView .srt-tips { font-size: 13.5px; }
#sertifikatView .srt-tips summary { cursor: pointer; font-weight: 650; color: var(--srt-accent); }
#sertifikatView .srt-tips ol { display: grid; gap: 4px; margin-top: 8px; padding-left: 20px; color: var(--srt-dim); }
#sertifikatView .srt-elemen { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
#sertifikatView .srt-elemen button { min-height: 36px; padding: 6px 13px; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
#sertifikatView .srt-elemen button[aria-pressed="true"] { background: var(--srt-accent); color: var(--srt-on-accent); }
#sertifikatView .srt-tambah-el { display: flex; flex-wrap: wrap; gap: 6px; }
#sertifikatView .srt-sisip { display: flex; flex-wrap: wrap; gap: 4px; }
#sertifikatView .srt-kode { min-height: 30px; padding: 3px 9px; font: 600 12px/1.2 ui-monospace, Menlo, monospace; }

/* ── Terbit & unduh ── */
#sertifikatView .srt-ringkas { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0 14px; padding: 0; list-style: none; color: var(--srt-dim); font-weight: 600; }
#sertifikatView .srt-ringkas strong { color: var(--srt-ink); font-size: 22px; letter-spacing: -0.02em; margin-right: 4px; font-variant-numeric: tabular-nums; }
#sertifikatView .srt-masalah { margin-bottom: 14px; padding: 12px 16px; border-radius: 14px; background: var(--srt-x-bg); color: var(--srt-x); font-weight: 600; }
#sertifikatView .srt-masalah ul { margin-top: 4px; padding-left: 20px; }
#sertifikatView .srt-siap { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; color: var(--srt-ok); font-weight: 650; }
#sertifikatView .srt-siap svg { margin-top: 2px; }
#sertifikatView .srt-fs { margin: 0 0 12px; padding: 0; border: 0; }
#sertifikatView .srt-fs legend { margin-bottom: 2px; font-size: 13px; font-weight: 700; color: var(--srt-dim); }
#sertifikatView .srt-field-pendek { max-width: 320px; margin-bottom: 14px; }

/* ── Bagikan ── */
#sertifikatView .srt-progres-kirim, #sertifikatView .srt-bar-progres { height: 10px; margin: 6px 0 8px; border-radius: 999px; background: var(--srt-fill-2); overflow: hidden; }
#sertifikatView .srt-progres-kirim span, #sertifikatView .srt-bar-progres span { display: block; height: 100%; border-radius: inherit; background: var(--srt-accent); transition: width 240ms var(--srt-ease); }
#sertifikatView .srt-berikut { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; padding: 14px 14px 14px 18px; border-radius: 18px; background: var(--srt-fill); }
#sertifikatView .srt-berikut > div { flex: 1 1 220px; display: grid; gap: 1px; min-width: 0; }
#sertifikatView .srt-berikut strong { font-size: 18px; letter-spacing: -0.01em; }
#sertifikatView .srt-berikut span { color: var(--srt-dim); font-size: 13.5px; }
#sertifikatView .srt-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em !important; }
#sertifikatView .srt-tombol-baris { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ── Modal, sibuk, toast ── */
/* Dialog native di top layer. Masuk: membesar dari 96% + redup; keluar: jalur yang sama dibalik, lebih singkat. */
#sertifikatView dialog.srt-dialog { padding: 0; border: 0; margin: auto; max-width: none; max-height: none; overflow: visible; background: transparent; color: var(--srt-ink); }
#sertifikatView dialog.srt-dialog::backdrop { background: rgba(10, 20, 14, 0.45); animation: srt-redup 220ms ease both; }
#sertifikatView dialog.srt-dialog.is-tutup::backdrop { animation: srt-terang 180ms ease both; }
#sertifikatView .srt-modal {
  display: grid; gap: 12px; width: min(720px, calc(100vw - 24px)); max-height: min(88dvh, 900px); overflow: auto;
  padding: 22px; border-radius: 22px; background: var(--srt-card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); /* taste-skill-ignore: dialog mengambang */
  animation: srt-muncul 280ms var(--srt-ease) both;
}
#sertifikatView dialog.is-kecil .srt-modal { width: min(480px, calc(100vw - 24px)); }
#sertifikatView dialog.is-tutup .srt-modal { animation: srt-hilang 180ms cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes srt-muncul { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
@keyframes srt-hilang { to { opacity: 0; transform: scale(0.97) translateY(6px); } }
@keyframes srt-redup { from { opacity: 0; } }
@keyframes srt-terang { to { opacity: 0; } }
#sertifikatView .srt-primary-bahaya { background: var(--srt-x); color: #ffffff; }
[data-theme="dark"] #sertifikatView .srt-primary-bahaya { color: #2a0d09; }
#sertifikatView .srt-modal h2 { margin: 0; font-size: 20px; }
#sertifikatView .srt-modal-kaki { position: sticky; bottom: -22px; display: flex; justify-content: flex-end; gap: 8px; margin: 4px -22px -22px; padding: 12px 22px 18px; background: var(--srt-card); }
#sertifikatView .srt-pilih-list { display: grid; gap: 2px; max-height: 42dvh; overflow: auto; padding: 4px; border-radius: 14px; background: var(--srt-fill); list-style: none; }
#sertifikatView .srt-pilih-list label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
#sertifikatView .srt-pilih-list label:hover { background: var(--srt-card); }
#sertifikatView .srt-pilih-list label.is-ada { opacity: 0.55; cursor: default; }
#sertifikatView .srt-pilih-list input { width: 18px; height: 18px; accent-color: var(--srt-accent); flex: none; }
#sertifikatView .srt-pilih-list span { display: grid; min-width: 0; }
#sertifikatView .srt-pilih-list small { color: var(--srt-dim); font-size: 12.5px; }
#sertifikatView .srt-impor-ringkas { display: flex; flex-wrap: wrap; gap: 6px; }
#sertifikatView .srt-impor-tabel { max-height: 36dvh; background: var(--srt-fill); }
#sertifikatView .srt-impor-tabel td { padding: 7px 8px; font-size: 13.5px; }
#sertifikatView .srt-impor-tabel tr.is-galat td { color: var(--srt-x); }
#sertifikatView .srt-impor-tabel tr.is-ganda td { color: var(--srt-dim); }
#sertifikatView .srt-impor-tabel tr.is-peringatan td:last-child { color: var(--srt-warn); font-weight: 600; }
#sertifikatView .srt-sibuk { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(10, 20, 14, 0.4); }
#sertifikatView .srt-sibuk-kotak { display: grid; gap: 12px; justify-items: center; width: min(440px, 100%); padding: 24px; border-radius: 22px; background: var(--srt-card); text-align: center; font-weight: 650; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); /* taste-skill-ignore */ }
#sertifikatView .srt-sibuk-kotak .srt-bar-progres { width: 100%; }
#sertifikatView .srt-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--srt-fill-2); border-top-color: var(--srt-accent); animation: srt-putar 0.8s linear infinite; }
@keyframes srt-putar { to { transform: rotate(360deg); } }
#sertifikatView .srt-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80; display: flex; align-items: center; gap: 12px; min-height: 48px;
  max-width: calc(100vw - 32px); padding: 6px 6px 6px 18px; border-radius: 16px;
  background: var(--srt-ink); color: var(--srt-card); font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22); /* taste-skill-ignore: toast mengambang */
  opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: transform 300ms var(--srt-ease), opacity 200ms ease;
}
#sertifikatView .srt-toast.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#sertifikatView .srt-toast:not(:has(button)) { padding-right: 18px; }
#sertifikatView .srt-toast button { min-height: 36px; padding: 6px 14px; background: color-mix(in srgb, var(--srt-card) 18%, transparent); color: inherit; }
#sertifikatView .srt-toast.is-galat { background: var(--srt-x); color: #ffffff; }
[data-theme="dark"] #sertifikatView .srt-toast.is-galat { color: #2a0d09; }

@media (prefers-reduced-motion: reduce) {
  /* Tanpa geser/skala: perpindahan menjadi pudar singkat. */
  #sertifikatView *, #srtPublik * { transition-duration: 1ms !important; }
  #sertifikatView .srt-panel.is-maju, #sertifikatView .srt-panel.is-mundur, #sertifikatView .srt-modal, #sertifikatView dialog.is-tutup .srt-modal { animation: srt-redup 160ms ease both !important; }
  #sertifikatView dialog.is-tutup .srt-modal { animation-name: srt-terang !important; }
  #sertifikatView .srt-skeleton span, #srtPublik .srt-skeleton span, #sertifikatView .srt-spinner { animation-duration: 2.4s !important; }
}
@media (prefers-reduced-transparency: reduce) {
  #sertifikatView .srt-steps { background: var(--srt-fill-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  #sertifikatView .srt-steps, #sertifikatView .srt-card, #sertifikatView .srt-modal { outline: 1px solid var(--srt-line); }
}
@media (max-width: 980px) {
  #sertifikatView .srt-desain { grid-template-columns: minmax(0, 1fr); }
  #sertifikatView .srt-pratinjau { position: static; }
}
@media (max-width: 640px) {
  #sertifikatView .srt-shell { padding: 12px 16px 120px; }
  #sertifikatView .srt-form, #sertifikatView .srt-dua, #sertifikatView .srt-pilihan2 { grid-template-columns: minmax(0, 1fr); }
  #sertifikatView .srt-card { padding: 16px; }
  #sertifikatView .srt-cari input { min-width: 0; }
  #sertifikatView .srt-steps button { padding-inline: 12px; }
  #sertifikatView .srt-step-l { font-size: 13px; }
  #sertifikatView .srt-acara-aksi { width: 100%; justify-content: flex-end; }
  #sertifikatView .srt-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* HP: dialog menjadi lembar dari bawah; menutup turun lewat jalur yang sama. */
  #sertifikatView dialog.srt-dialog { width: 100%; margin: auto 0 0; }
  #sertifikatView .srt-modal, #sertifikatView dialog.is-kecil .srt-modal { width: 100%; max-height: 92dvh; padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; animation-name: srt-lembar-naik; }
  #sertifikatView dialog.is-tutup .srt-modal { animation: srt-lembar-turun 200ms cubic-bezier(0.4, 0, 1, 1) both; }
  #sertifikatView .srt-modal-kaki { margin: 4px -18px calc(-18px - env(safe-area-inset-bottom, 0px)); padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px)); bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); }
  #sertifikatView .srt-modal-kaki > button { flex: 1 1 auto; }
  #sertifikatView .srt-jalur > button { width: 100%; }
}
@keyframes srt-lembar-naik { from { transform: translateY(100%); } }
@keyframes srt-lembar-turun { to { transform: translateY(100%); } }

/* ── Halaman publik sertifikat.html ── */
#srtPublik { min-height: 100vh; min-height: 100dvh; background: var(--srt-bg); }
#srtPublik .srt-pub { max-width: 920px; margin: 0 auto; padding: 18px 20px 64px; }
#srtPublik .srt-pub-kop { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-weight: 700; }
#srtPublik .srt-pub-kop img { width: 40px; height: 40px; border-radius: 10px; }
#srtPublik .srt-pub-kop small { display: block; font-weight: 500; color: var(--srt-dim); }
#srtPublik .srt-pub-status { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 20px; background: var(--srt-card); }
#srtPublik .srt-pub-status svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; stroke-width: 2.6; }
#srtPublik .srt-pub-status h1 { margin: 0; font-size: clamp(22px, 4vw, 28px); line-height: 1.15; letter-spacing: -0.02em; }
#srtPublik .srt-pub-status p { color: var(--srt-dim); font-weight: 550; }
#srtPublik .srt-pub-status.is-ok svg { background: var(--srt-ok-bg); color: var(--srt-ok); }
#srtPublik .srt-pub-status.is-x svg { background: var(--srt-x-bg); color: var(--srt-x); }
#srtPublik .srt-pub-status.is-x h1 { color: var(--srt-x); }
#srtPublik .srt-pub-data { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin-top: 12px; padding: 18px 20px; border-radius: 20px; background: var(--srt-card); }
#srtPublik .srt-pub-data dt { color: var(--srt-dim); font-weight: 600; font-size: 14px; }
#srtPublik .srt-pub-data dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
#srtPublik .srt-pub-kertas { margin-top: 16px; border-radius: 6px; overflow: hidden; background: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(15, 30, 20, 0.14); /* taste-skill-ignore: kertas */ }
#srtPublik .srt-pub-kertas canvas { display: block; width: 100%; height: auto; }
#srtPublik .srt-pub-aksi { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#srtPublik .srt-pub-cari { display: grid; gap: 12px; margin-top: 12px; padding: 20px; border-radius: 20px; background: var(--srt-card); }
#srtPublik .srt-pub-cari form { display: flex; flex-wrap: wrap; gap: 10px; }
#srtPublik .srt-pub-cari input { flex: 1 1 220px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
#srtPublik .srt-pub-kaki { margin-top: 28px; color: var(--srt-dim); font-size: 13px; }
#srtPublik .srt-skeleton span { display: block; height: 96px; margin-top: 12px; border-radius: 20px; background: var(--srt-card); animation: srt-pulse 1.4s ease-in-out infinite; }
@media (max-width: 560px) {
  #srtPublik .srt-pub { padding: 14px 16px 48px; }
  #srtPublik .srt-pub-data { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  #srtPublik .srt-pub-data dd { margin-bottom: 8px; }
  #srtPublik .srt-pub-aksi button { flex: 1 1 auto; }
}
