:root {
  --dnp-navy: #1b2a5b; --dnp-blue: #2f5bea; --dnp-bg: #eef4fb; --dnp-line: #e3eaf5;
  --st-baru: #2f5bea; --st-proses: #f39c12; --st-selesai: #2e9e4f; --st-ditolak: #e0413b;
  --bs-primary: var(--dnp-blue); --bs-primary-rgb: 47, 91, 234;
  --bs-body-color: var(--dnp-navy); --bs-link-color: var(--dnp-blue); --bs-link-color-rgb: 47, 91, 234;
  --shadow: 0 6px 20px rgba(27, 42, 91, .08);
  --teks-2: #4a5677; /* teks pendamping: 7:1 di putih */
  /* Dashboard: warna identitas bidang (validate_palette.js light: CVD/normal lolos; kontras <3:1 untuk
     pia/pansops/teknik ditebus label nilai di ujung batang). Kartu angka: langkah gelap, ikon putih >=4.5:1. */
  --c-pllp: #2f5bea; --c-pkp: #eb6834; --c-pia: #1baf7a; --c-pansops: #eda100; --c-teknik: #e87ba4; --c-kobu: #a9bdf6;
  --c-kpi-ungu: #6250d6; --c-kpi-toska: #0f7f5c; --c-kpi-magenta: #b8406f; --c-kpi-oranye: #b4530a;
}
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(../vendor/inter/inter-400.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500 600; font-display: swap; src: url(../vendor/inter/inter-600.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(../vendor/inter/inter-700.woff2) format("woff2"); }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .9375rem; color: var(--dnp-navy); background: var(--dnp-bg); }
::selection { background: #cfdcfb; color: var(--dnp-navy); }
.btn-primary { --bs-btn-bg: var(--dnp-blue); --bs-btn-border-color: var(--dnp-blue); --bs-btn-hover-bg: #2549c9; --bs-btn-hover-border-color: #2549c9;
  --bs-btn-active-bg: #1f3fae; --bs-btn-active-border-color: #1f3fae; box-shadow: 0 6px 16px rgba(47, 91, 234, .25); }
.btn-outline-primary { --bs-btn-color: var(--dnp-blue); --bs-btn-border-color: var(--dnp-blue); --bs-btn-hover-bg: var(--dnp-blue); --bs-btn-hover-border-color: var(--dnp-blue); }
.text-primary { color: var(--dnp-blue) !important; }
.form-control:focus, .form-select:focus { border-color: #8aa6f3; box-shadow: 0 0 0 .2rem rgba(47, 91, 234, .15); }

/* Login */
.auth-body { min-height: 100vh; display: flex; flex-direction: column;
  background: var(--dnp-bg) url(../img/bg-hero.jpg) center top / cover no-repeat; }
.auth { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 3rem; align-items: center;
  width: min(1080px, 100%); margin: 0 auto; padding: 3rem 1.5rem; }
.auth__intro { max-width: 520px; text-shadow: 0 1px 14px rgba(255, 255, 255, .9); }
.auth__brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.auth__title { font-size: clamp(1.85rem, 1.2rem + 2vw, 2.6rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .85rem; text-wrap: balance; }
.auth__sapa { display: block; font-size: clamp(1rem, .9rem + .3vw, 1.15rem); font-weight: 600; letter-spacing: 0; color: #33416b; margin-bottom: .35rem; }
.auth__lead { font-size: 1.0625rem; line-height: 1.55; color: #2c3a63; margin: 0; }
.auth__card { border: 0; border-radius: 1rem; box-shadow: 0 20px 50px rgba(27, 42, 91, .15); background: rgba(255, 255, 255, .96); }
.auth__judul { font-size: 1.375rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .25rem; }
.auth__sub { font-size: .875rem; color: var(--teks-2); margin-bottom: 1.5rem; }
.auth__card .form-label { font-size: .875rem; font-weight: 600; margin-bottom: .35rem; }
.auth__card .input-group-text, .auth__card .input-group .btn { border-color: var(--bs-border-color); background: #f4f7fd; color: var(--teks-2); }
.auth__card .form-control { caret-color: var(--dnp-blue); }
.auth__card .form-control[aria-invalid="true"] { border-color: #d63a35; }
.auth__card .input-group .btn:hover { background: #e7eefb; color: var(--dnp-navy); }
.auth__card .input-group .btn:focus-visible { position: relative; z-index: 5; box-shadow: 0 0 0 .2rem rgba(47, 91, 234, .3); }
.auth__card .btn-primary:focus-visible { box-shadow: 0 0 0 .2rem #fff, 0 0 0 .35rem var(--dnp-blue); }
.auth__card .btn-primary { --bs-btn-disabled-bg: var(--dnp-blue); --bs-btn-disabled-border-color: var(--dnp-blue); --bs-btn-disabled-opacity: .8; }
.auth__galat { display: flex; gap: .5rem; align-items: flex-start; padding: .65rem .85rem; margin-bottom: 1.25rem;
  font-size: .875rem; line-height: 1.45; color: #a12622; background: #fdeeed; border: 1px solid #f6c9c6; border-radius: .6rem; }
.auth__galat i { margin-top: .1rem; }
.auth__caps { margin-top: .4rem; font-size: .8125rem; font-weight: 600; color: #8a5a00; }
.auth__bantu { font-size: .8125rem; color: var(--teks-2); text-align: center; margin: 1.5rem 0 0; }
.auth__footer { text-align: center; padding: 1rem 1.5rem 1.25rem; font-size: .8rem; color: var(--teks-2); }
/* Tablet & HP: satu kolom sempit di tengah, kartu tidak melebar penuh. */
@media (max-width: 991.98px) {
  .auth { grid-template-columns: minmax(0, 440px); justify-content: center; align-content: center; gap: 1.75rem; padding: 2.5rem 1rem 1.5rem; }
  .auth__brand { margin-bottom: 1.25rem; }
  .auth__lead { display: none; }
}

/* ===== Kerangka ===== */
.min-w-0 { min-width: 0; }
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; background: #fff; }
.shell__main { position: relative; display: flex; flex-direction: column; min-width: 0;
  background: #fff url(../img/bg-hero.jpg) right top / 100% auto no-repeat; }
.page { flex: 1; padding: 1rem 2rem 2rem; }
.page__kepala { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1.5rem; }
.page__judul { font-size: clamp(1.4rem, 1.1rem + .9vw, 1.85rem); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 0 0 .25rem; text-wrap: balance; }
.page__sub { margin: 0; color: var(--teks-2); }
.bagian__judul { font-size: 1.125rem; font-weight: 700; margin: 0; }
@media (max-width: 991.98px) {
  .shell { grid-template-columns: 1fr; }
  .shell__main { background-image: linear-gradient(rgba(247, 250, 255, .55), rgba(247, 250, 255, .55)), url(../img/bg-hero.jpg);
    background-size: auto 560px; }
  .page { padding: 1rem; }
}

/* Sidebar */
.sidebar { background: #fff; border-right: 1px solid var(--dnp-line); padding: 1.25rem .85rem 1rem; display: flex; flex-direction: column; gap: 1rem;
  font-size: .875rem; scrollbar-width: thin; scrollbar-color: #d5ddee transparent; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
@media (max-width: 991.98px) { .sidebar { --bs-offcanvas-width: 280px; } }
.sidebar__brand { display: flex; align-items: center; gap: .65rem; padding: 0 .5rem .25rem; }
.sidebar__brand img { flex: 0 0 auto; }
.sidebar__nama { font-size: .875rem; font-weight: 700; line-height: 1.25; }
.sidebar__menu { margin: 0; padding: 0 0 .75rem; }
.sidebar__menu + .sidebar__menu { padding-top: .75rem; border-top: 1px solid var(--dnp-line); }
.sidebar__link { display: flex; align-items: center; gap: .7rem; padding: .5rem .65rem; border-radius: .6rem; color: var(--dnp-navy);
  text-decoration: none; font-weight: 500; line-height: 1.3; transition: background .15s, color .15s; }
.sidebar__link:hover { background: #f0f4fd; color: var(--dnp-blue); }
.sidebar__link.is-active, .sidebar__link[aria-expanded="true"] { background: #e8effd; color: var(--dnp-blue); font-weight: 600; }
.sidebar__link > .bi:first-child { flex: 0 0 auto; font-size: 1.05rem; width: 1.25rem; text-align: center; }
.sidebar__caret { margin-left: auto; font-size: .7rem; transition: transform .2s; }
.sidebar__link[aria-expanded="true"] .sidebar__caret { transform: rotate(180deg); }
.sidebar__sub { margin: .15rem 0 .25rem 1.25rem; padding-left: .75rem; border-left: 1px solid #dbe4f5; }
.sidebar__sub a { display: block; padding: .35rem .55rem; border-radius: .5rem; color: var(--teks-2); text-decoration: none; font-size: .8125rem; line-height: 1.35; }
.sidebar__sub a:hover { background: #f0f4fd; color: var(--dnp-blue); }
.sidebar__help { margin-top: auto; background: #f4f7fd; border-radius: .9rem; padding: 1rem; text-align: center; }
.sidebar__help > .bi { font-size: 1.6rem; color: var(--dnp-blue); }
.sidebar__help-judul { font-weight: 600; margin-top: .25rem; }
.sidebar__help small { color: var(--teks-2); font-size: .8rem; line-height: 1.45; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: .75rem; padding: 1rem 2rem .5rem; }
.topbar__search { display: flex; align-items: center; gap: .25rem; background: rgba(255, 255, 255, .92); border-radius: .9rem;
  padding: .2rem .9rem; width: min(440px, 100%); box-shadow: 0 2px 10px rgba(27, 42, 91, .08); color: #6b7a99; cursor: text; }
.topbar__search input { font-size: .875rem; }
.topbar__user { display: flex; align-items: center; gap: .5rem; color: var(--dnp-navy); text-decoration: none; font-weight: 600; font-size: .875rem;
  background: rgba(255, 255, 255, .9); border-radius: 2rem; padding: .25rem .8rem .25rem .25rem; box-shadow: 0 2px 10px rgba(27, 42, 91, .08); }
.topbar__avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #dfe8fb; color: var(--dnp-blue); font-size: 1rem; }
@media (max-width: 991.98px) { .topbar { padding: 1rem 1rem .25rem; } }

/* Footer */
.footer { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: 1rem 2rem 1.25rem; color: var(--teks-2); }
@media (max-width: 991.98px) { .footer { padding: 1rem; } .footer nav { margin-left: 0 !important; } }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--dnp-blue); }

/* ===== Komponen ===== */
.card { border: 0; border-radius: 1rem; box-shadow: var(--shadow); }

.stat { display: flex; align-items: center; gap: .9rem; height: 100%; background: rgba(255, 255, 255, .95); border-radius: 1rem;
  padding: 1rem 1.15rem; box-shadow: var(--shadow); }
/* Lima kartu angka: 3 + 2 di bawah 1600px, sebaris di atasnya (label panjang pecah 4 baris kalau dipaksa). */
@media (min-width: 1600px) { .row > .stat-kol5 { flex: 1 0 0%; width: auto; } }
.stat__icon { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.45rem; color: #fff; }
.stat__num { font-size: 1.65rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: .875rem; font-weight: 600; line-height: 1.3; margin-bottom: .1rem; }
.stat small { font-size: .78rem; line-height: 1.35; }
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .stat { gap: .7rem; padding: .9rem; }
  .stat__icon { width: 44px; height: 44px; font-size: 1.2rem; }
  .stat__num { font-size: 1.45rem; }
}
@media (max-width: 575.98px) {
  /* Dua kartu angka per baris di HP: ikon di atas angka supaya angkanya tetap besar. */
  .stat { flex-direction: column; align-items: flex-start; gap: .55rem; padding: .9rem; }
  .stat__icon { width: 38px; height: 38px; font-size: 1.05rem; }
  .stat__num { font-size: 1.4rem; }
  .stat__label { font-size: .8125rem; }
}

/* ===== Dashboard pimpinan ===== */
.sidebar__grup { padding: 0 .65rem .35rem; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--teks-2); }
.sidebar__sub a.is-active { background: #e8effd; color: var(--dnp-blue); font-weight: 600; }
.widget { background: #fff; border-radius: 1rem; box-shadow: var(--shadow); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; }
.widget__judul { font-size: 1rem; font-weight: 600; margin: 0; }
.widget__sub { font-size: .8rem; color: var(--teks-2); }
.widget__sub:empty { display: none; }
.widget .widget__isi { margin-top: .75rem; flex: 1; }
/* Grafik pendek di samping grafik panjang: ditaruh di tengah kartu, bukan menggantung di atas ruang kosong. */
.widget .widget__isi:has(> .widget__grafik) { display: flex; flex-direction: column; justify-content: center; }
.widget .widget__isi.placeholder-glow .placeholder { display: block; height: 1.5rem; margin-bottom: .5rem; border-radius: .4rem; }
.widget__grafik { position: relative; }
.widget__tabel { max-height: 440px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c9d3e6 transparent; }
.widget__tabel table { font-size: .875rem; font-variant-numeric: tabular-nums; }
.widget__tabel thead th { position: sticky; top: 0; background: #fff; color: var(--teks-2); font-size: .8rem; font-weight: 600; }
.widget__kaki { display: block; margin-top: .75rem; font-size: .75rem; color: var(--teks-2); }
.widget__kaki--basi { color: #8a5a00; }
.widget__kaki--basi::before { content: "\F33B"; font-family: bootstrap-icons; margin-right: .3rem; }
.widget__pesan { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: .75rem; background: #f4f7fd; color: var(--teks-2); }
.widget__pesan > .bi { font-size: 1.25rem; line-height: 1.2; color: #8494b8; }
.widget__pesan strong { display: block; font-weight: 600; color: var(--dnp-navy); font-size: .9rem; }
.widget__pesan small { display: block; margin-top: .1rem; }
.dasbor__segar { display: inline-flex; align-items: center; gap: .4rem; margin: -.75rem 0 1rem; padding: .3rem .75rem; border-radius: .75rem;
  background: rgba(255, 255, 255, .85); font-size: .8rem; color: #42507a; font-variant-numeric: tabular-nums; }
.page .breadcrumb { margin: 0; padding: .3rem .8rem; border-radius: .75rem; background: rgba(255, 255, 255, .85); font-size: .85rem; }
.page .breadcrumb a { color: var(--dnp-blue); text-decoration: none; }
.page .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page .breadcrumb-item.active { color: #42507a; }
@media (max-width: 575.98px) { .page .breadcrumb { display: none; } } /* di HP posisi sudah terlihat dari judul + menu */
.widget__kaki:empty { display: none; }
.stat--dasbor .stat__icon { background: var(--ikon, var(--dnp-blue)); }
.stat--dasbor .stat__num { min-height: 1.8rem; }
.stat--dasbor .stat__num .placeholder { width: 5ch; height: 1.5rem; border-radius: .4rem; }
.stat--dasbor .stat__label { margin: 0; }
.stat--dasbor .widget__kaki { margin-top: .2rem; }
.stat--tautan { position: relative; transition: box-shadow .15s, transform .15s; }
.stat--tautan:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(27, 42, 91, .12); }
.stat--tautan .stat__label a { color: inherit; text-decoration: none; }
.stat--tautan:hover .stat__label a { color: var(--dnp-blue); }
.stat--tautan .stretched-link:focus-visible { outline: none; }
.stat--tautan:has(.stretched-link:focus-visible) { box-shadow: 0 0 0 .2rem #fff, 0 0 0 .35rem var(--dnp-blue); }
.stat__panah { position: absolute; top: .85rem; right: .9rem; font-size: .8rem; color: var(--teks-2); }
.stat--tautan:hover .stat__panah { color: var(--dnp-blue); }
/* Tiba dari kartu angka: grafik tujuan tidak menempel ke tepi atas dan ditandai sebentar. */
[id^="w-"] { scroll-margin-top: 1.5rem; }
.widget:target { animation: sorot 2.4s ease-out; }
@keyframes sorot { from { box-shadow: 0 0 0 .2rem rgba(47, 91, 234, .45), var(--shadow); } to { box-shadow: 0 0 0 .2rem rgba(47, 91, 234, 0), var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .stat--tautan, .stat--tautan:hover { transition: none; transform: none; } .widget:target { animation: none; outline: 2px solid var(--dnp-blue); } }

.unit { display: flex; gap: 1rem; align-items: center; height: 100%; padding: 1rem 1.25rem; border-radius: 1rem; background: #fff; box-shadow: var(--shadow);
  color: var(--dnp-navy); text-decoration: none; }
.unit:hover { color: var(--dnp-blue); }
.unit > .bi { font-size: 1.6rem; color: var(--dnp-blue); }
.unit__nama { display: block; font-size: .9rem; font-weight: 600; line-height: 1.3; }
