/* Halaman Laporan Publik (/laporan) */

:root {
  --lp-ink: #0f172a;
  --lp-text: #334155;
  --lp-muted: #64748b;
  --lp-line: #e2e8f0;
  --lp-bg: #f4f7fb;
  --lp-blue: #004282;
  --lp-blue-2: #0b63c5;
  --lp-radius: 16px;
  --lp-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);

  --tahap-belum: #94a3b8;
  --tahap-awal: #f97316;
  --tahap-proses: #eab308;
  --tahap-separuh: #3b82f6;
  --tahap-akhir: #14b8a6;
  --tahap-selesai: #16a34a;
}

.tahap-bg-belum   { background: var(--tahap-belum); }
.tahap-bg-awal    { background: var(--tahap-awal); }
.tahap-bg-proses  { background: var(--tahap-proses); }
.tahap-bg-separuh { background: var(--tahap-separuh); }
.tahap-bg-akhir   { background: var(--tahap-akhir); }
.tahap-bg-selesai { background: var(--tahap-selesai); }

.tahap-text-belum   { color: var(--tahap-belum) !important; }
.tahap-text-awal    { color: #ea580c !important; }
.tahap-text-proses  { color: #ca8a04 !important; }
.tahap-text-separuh { color: #2563eb !important; }
.tahap-text-akhir   { color: #0d9488 !important; }
.tahap-text-selesai { color: #15803d !important; }

.lp-muted { color: var(--lp-muted); }
.min-w-0 { min-width: 0; }

/* ── Hero ── */
.lp-hero {
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(255,255,255,.10) 0%, transparent 60%),
    linear-gradient(135deg, #002d5c 0%, #004282 55%, #0b63c5 100%);
  color: #fff;
  padding: 2.75rem 0 4.5rem;
}

.lp-hero h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .75rem;
  color: #fff;
}

.lp-hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  max-width: 560px;
  margin-bottom: .9rem;
}

.lp-hero-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 14px;
  padding: .35rem .35rem .35rem 1rem;
  margin-top: 1.4rem;
  max-width: 560px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.lp-hero-search > i { color: var(--lp-muted); }

.lp-hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: .65rem .75rem;
  font-size: 1rem;
  color: var(--lp-ink);
  background: transparent;
}

.lp-hero-search button {
  border: 0;
  border-radius: 10px;
  background: #f59e0b;
  color: #fff;
  font-weight: 700;
  padding: .65rem 1.4rem;
}

.lp-hero-search button:hover { background: #d97706; }

/* ── Page ── */
.lp-page {
  background: var(--lp-bg);
  padding: 0 0 3.5rem;
  color: var(--lp-text);
}

.lp-page > .container { margin-top: -2.75rem; }

.lp-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.25rem 0 1rem;
}

.lp-page > .container > .lp-block-head:first-child {
  background: #fff;
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  padding: 1rem 1.25rem;
  margin-top: 0;
  align-items: center;
}

.lp-h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--lp-ink);
  margin: 0 0 .15rem;
}

.lp-h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lp-ink);
  margin: 0;
  display: flex;
  align-items: center;
  gap: .55rem;
}

.lp-h3 > i { color: var(--lp-blue-2); }

.lp-link-reset {
  white-space: nowrap;
  font-weight: 700;
  font-size: .85rem;
  color: var(--lp-blue-2);
}

.lp-card {
  background: #fff;
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  padding: 1.25rem 1.35rem;
}

.lp-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
  margin-bottom: 1rem;
}

/* ── Bars ── */
.lp-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: visible;
}

.lp-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  min-width: 0;
  transition: width .6s ease;
}

.lp-bar-lg { height: 10px; }

.lp-target {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--lp-ink);
  border-radius: 2px;
  opacity: .55;
  transform: translateX(-1px);
}

/* ── KPI ── */
.lp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.lp-kpi {
  background: #fff;
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.lp-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: .35rem;
}

.tone-blue  { background: #e0edff; color: #1d4ed8; }
.tone-green { background: #dcfce7; color: #15803d; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-bg-green { background: #22c55e; }
.tone-bg-amber { background: #f59e0b; }

.lp-kpi-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--lp-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.lp-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--lp-ink);
  line-height: 1.15;
  margin-bottom: .2rem;
}

.lp-kpi-of {
  font-size: 1rem;
  font-weight: 700;
  color: var(--lp-muted);
  margin-left: .3rem;
}

.lp-kpi-note {
  font-size: .8rem;
  color: var(--lp-muted);
  margin-top: .2rem;
}

.lp-kpi-ring {
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.lp-ring {
  --p: 0;
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(var(--tahap-separuh) calc(var(--p) * 1%), #eef2f7 0);
  display: grid;
  place-items: center;
}

.lp-ring span {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: baseline;
  justify-content: center;
  padding-top: 21px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--lp-ink);
}

.lp-ring small { font-size: .8rem; font-weight: 700; color: var(--lp-muted); }

/* ── Sebaran ── */
.lp-sebaran { margin-top: 1rem; }

.lp-stack {
  display: flex;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  gap: 2px;
  background: #fff;
}

.lp-stack > span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: .85rem;
  min-width: 28px;
}

.lp-legend {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .5rem;
  margin-top: 1rem;
}

.lp-legend-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  background: #f8fafc;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  padding: .5rem .65rem;
}

.lp-legend-label { flex: 1; color: var(--lp-text); }
.lp-legend-item strong { color: var(--lp-ink); }

.lp-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ── Wilayah ── */
.lp-wilayah-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.lp-wilayah.lp-wilayah-all {
  background: linear-gradient(135deg, #004282 0%, #0b63c5 100%);
  color: rgba(255,255,255,.85);
}

.lp-wilayah.lp-wilayah-all:hover { color: rgba(255,255,255,.85); border-color: #93c5fd; }
.lp-wilayah.lp-wilayah-all.is-active { border-color: #f59e0b; background: linear-gradient(135deg, #004282 0%, #0b63c5 100%); }
.lp-wilayah-all .lp-wilayah-name,
.lp-wilayah-all .lp-wilayah-pct { color: #fff; }
.lp-wilayah-all .lp-bar { background: rgba(255,255,255,.2); }
.lp-wilayah-all .lp-bar > span { background: #fff; }
.lp-wilayah-all .lp-wilayah-meta { color: rgba(255,255,255,.8); }
.lp-wilayah-all .lp-wilayah-flag { background: #f59e0b; }

.lp-wilayah {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  padding: 1rem 1.15rem;
  color: var(--lp-text);
  text-decoration: none !important;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}

.lp-wilayah:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  color: var(--lp-text);
}

.lp-wilayah.is-active {
  border-color: var(--lp-blue-2);
  background: #f5f9ff;
}

.lp-wilayah.is-empty { opacity: .65; }

.lp-wilayah-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
}

.lp-wilayah-name {
  font-weight: 800;
  color: var(--lp-ink);
  font-size: .95rem;
  line-height: 1.3;
}

.lp-wilayah-pct {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.lp-wilayah-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
  font-size: .78rem;
  color: var(--lp-muted);
}

.lp-wilayah-meta i { margin-right: .3rem; opacity: .8; }

.lp-wilayah-flag {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--lp-blue-2);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: .15rem .55rem;
}

/* ── Peringkat ── */
.lp-rank-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
}

.lp-rank.is-top .lp-rank-icon { background: #dcfce7; color: #15803d; }
.lp-rank.is-bottom .lp-rank-icon { background: #ffedd5; color: #c2410c; }

.lp-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lp-rank-list li {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .7rem 0;
}

.lp-rank-list li + li { border-top: 1px solid #f1f5f9; }

.lp-rank-no {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--lp-text);
  font-weight: 800;
  font-size: .82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lp-rank.is-top li:first-child .lp-rank-no { background: #fde68a; color: #92400e; }

.lp-rank-body { flex: 1; min-width: 0; }

.lp-rank-top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}

.lp-rank-name {
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  font-weight: 700;
  color: var(--lp-ink);
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-rank-name:hover { color: var(--lp-blue-2); text-decoration: underline; }

.lp-rank-meta {
  font-size: .76rem;
  color: var(--lp-muted);
  margin-top: .3rem;
}

/* ── Daftar sekolah ── */
.lp-table-card { padding: 0; overflow: hidden; }

.lp-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--lp-line);
  background: #fbfcfe;
}

.lp-search {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  padding: 0 .85rem;
}

.lp-search i { color: var(--lp-muted); }

.lp-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: .6rem 0;
  font-size: .92rem;
  background: transparent;
}

.lp-search:focus-within,
.lp-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
  outline: 0;
}

.lp-select {
  flex: 0 1 auto;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  background: #fff;
  padding: .55rem .75rem;
  font-size: .88rem;
  color: var(--lp-text);
  max-width: 100%;
}

.lp-btn-primary {
  border: 0;
  border-radius: 10px;
  background: var(--lp-blue);
  color: #fff;
  font-weight: 700;
  padding: .55rem 1.2rem;
}

.lp-btn-primary:hover { background: #002d5c; }

.lp-tabs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--lp-line);
}

.lp-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.lp-tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--lp-text);
  background: #f1f5f9;
  text-decoration: none !important;
}

.lp-tab span {
  background: #fff;
  border-radius: 999px;
  padding: 0 .45rem;
  font-size: .75rem;
}

.lp-tab:hover { background: #e2e8f0; color: var(--lp-ink); }
.lp-tab.is-active { background: var(--lp-blue); color: #fff; }
.lp-tab.is-active span { color: var(--lp-blue); }

.lp-school-head,
.lp-school {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: .95rem 1.25rem;
}

.lp-school-head {
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--lp-muted);
  background: #f8fafc;
  padding-top: .6rem;
  padding-bottom: .6rem;
}

.lp-school { border-top: 1px solid #f1f5f9; transition: background .15s; }
.lp-school:hover { background: #f8fbff; }

.lp-school-main {
  display: flex;
  gap: .8rem;
  align-items: center;
  min-width: 0;
}

.lp-jenjang {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #334155;
}

.lp-jenjang.jj-paud { background: #fce7f3; color: #be185d; }
.lp-jenjang.jj-sd   { background: #fee2e2; color: #b91c1c; }
.lp-jenjang.jj-smp  { background: #dbeafe; color: #1d4ed8; }
.lp-jenjang.jj-sma  { background: #e0e7ff; color: #4338ca; }
.lp-jenjang.jj-smk  { background: #fef3c7; color: #b45309; }
.lp-jenjang.jj-slb  { background: #dcfce7; color: #15803d; }

.lp-school-name {
  font-weight: 800;
  color: var(--lp-ink);
  font-size: .95rem;
  line-height: 1.3;
}

.lp-school-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .85rem;
  font-size: .78rem;
  color: var(--lp-muted);
  margin-top: .15rem;
}

.lp-school-meta i { margin-right: .3rem; }

.lp-progress-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  font-size: .78rem;
  margin-bottom: .35rem;
}

.lp-progress-top strong { font-size: 1.05rem; font-weight: 800; }

.lp-chip-belum {
  display: inline-flex;
  align-items: center;
  font-size: .8rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: .3rem .75rem;
}

.lp-school-report {
  display: flex;
  flex-direction: column;
  font-size: .8rem;
  line-height: 1.4;
}

.lp-school-report strong { color: var(--lp-ink); font-size: .88rem; }

.lp-btn-detail {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: .85rem;
  border-radius: 10px;
  padding: .5rem 1rem;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.lp-btn-detail:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.lp-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.lp-empty > i {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: .75rem;
  display: block;
}

.lp-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--lp-line);
}

.lp-pages { display: inline-flex; gap: .3rem; flex-wrap: wrap; }

.lp-pg {
  min-width: 36px;
  height: 36px;
  padding: 0 .6rem;
  border-radius: 10px;
  border: 1px solid var(--lp-line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--lp-text);
  text-decoration: none !important;
}

.lp-pg:hover { border-color: #93c5fd; color: var(--lp-blue-2); }
.lp-pg.is-active { background: var(--lp-blue); border-color: var(--lp-blue); color: #fff; }
.lp-pg.is-disabled { pointer-events: none; opacity: .4; }
.lp-pg-gap { align-self: center; color: var(--lp-muted); padding: 0 .2rem; }

/* ── Responsive ── */
@media (max-width: 1199.98px) {
  .lp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-legend { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .lp-wilayah-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-school-head { display: none; }

  .lp-school {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main main"
      "progress progress"
      "report action";
    gap: .75rem;
  }

  .lp-school-main { grid-area: main; }
  .lp-school-progress { grid-area: progress; }
  .lp-school-report { grid-area: report; flex-direction: row; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
  .lp-school-action { grid-area: action; }
}

@media (max-width: 767.98px) {
  .lp-hero { padding: 2rem 0 4rem; }
  .lp-block-head { flex-direction: column; align-items: flex-start; }
  .lp-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-toolbar .lp-select { flex: 1 1 45%; }
  .lp-toolbar #lpSort { flex-basis: 100%; }
  .lp-btn-primary { flex: 1 1 100%; }
}

@media (max-width: 575.98px) {
  .lp-kpi-grid,
  .lp-wilayah-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-kpi-value { font-size: 1.6rem; }
  .lp-hero-search button { padding: .65rem 1rem; }
}
