/* ==========================================================================
   SIEPUB — tema tampilan baru
   Dimuat paling akhir, menimpa gaya Materialize lama tanpa mengubah logika view.
   Warna: teal tinta (identitas), emas songket (aksen), warna per sumber data.
   ========================================================================== */
:root {
  --ink: #0F3D3E;          /* teal tinta — header, tombol utama */
  --ink-2: #155456;
  --gold: #C8962E;         /* emas songket — aksen aktif */
  --gold-soft: #F6EBD3;
  --bg: #F3F6F5;
  --surface: #FFFFFF;
  --text: #17211F;
  --muted: #5D6B68;
  --line: #DCE3E1;
  --line-2: #EBF0EE;
  --scopus: #D9601A;
  --wos: #5B4BB7;
  --gs: #2F6FDE;
  --ok: #1F8A5B;
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Dasar ---------- */
html { font-size: 15px; }
html, body.sp-body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body.sp-body { line-height: 1.55; }
body.sp-body, body.sp-body p, body.sp-body td, body.sp-body li,
body.sp-body input, body.sp-body button, body.sp-body select, body.sp-body .btn,
body.sp-body h1, body.sp-body h2, body.sp-body h3, body.sp-body h4, body.sp-body h5, body.sp-body h6 {
  font-family: var(--font);
}
body.sp-body h4, body.sp-body h5, body.sp-body h6 { color: var(--text); letter-spacing: -0.01em; }
body.sp-body a { color: var(--ink-2); }
body.sp-body a:hover { color: var(--gold); }
body.sp-body :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
body.sp-body font { font-family: inherit; }
body.sp-body font[size] { font-size: .93rem; }
body.sp-body font[color="grey"] { color: var(--muted); }
body.sp-body font[color="red"] { color: var(--wos); font-weight: 600; }
body.sp-body font[color="#216f86"] { color: var(--scopus); font-weight: 600; }
body.sp-body font[color="#3897F0"] { color: var(--gs); font-weight: 600; }
body.sp-body font[color="#068765"] { color: var(--ink); font-weight: 600; font-size: 1.02rem; }
body.sp-body font[color="orange"] { color: var(--gold); }
.animate { animation: none !important; opacity: 1 !important; }
.content-wrapper-before { display: none !important; }

.sp-skip {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--gold); color: #fff !important; padding: 8px 14px; border-radius: 8px;
}
.sp-skip:focus { left: 12px; }

/* ---------- Header ---------- */
.sp-header {
  position: sticky; top: 0; z-index: 990;
  background-color: var(--ink);
  /* motif belah ketupat songket: kisi garis emas yang sangat halus */
  background-image:
    repeating-linear-gradient(45deg, rgba(200,150,46,.13) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(-45deg, rgba(200,150,46,.13) 0 1px, transparent 1px 16px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.sp-topbar {
  max-width: 1440px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.sp-brand { display: flex; align-items: center; gap: 14px; color: #fff !important; text-decoration: none; }
.sp-brand-plate {
  background: #fff; border-radius: 10px; padding: 6px 10px; display: inline-flex; line-height: 0;
  box-shadow: inset 0 -3px 0 var(--gold);
}
.sp-brand-plate img { height: 34px; width: auto; }
.sp-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.sp-brand-text strong { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.sp-brand-text span { color: rgba(255,255,255,.72); font-size: .85rem; }
.sp-menu-toggle {
  display: none; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px; padding: 8px 12px; font: 600 .9rem var(--font); cursor: pointer;
}
.sp-menu-toggle:hover { background: rgba(255,255,255,.18); }

.sp-nav { background: rgba(0,0,0,.18); border-top: 1px solid rgba(255,255,255,.08); }
.sp-nav ul {
  max-width: 1440px; margin: 0 auto; padding: 0 16px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.sp-nav ul::-webkit-scrollbar { display: none; }
.sp-nav li { flex: 0 0 auto; list-style: none; float: none; }
.sp-nav ul, .sp-nav li, .sp-nav a { height: auto; line-height: 1.3; }
.sp-nav a {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 12px 12px 11px; color: rgba(255,255,255,.78) !important;
  font-weight: 500; font-size: .92rem; text-decoration: none;
  border-bottom: 3px solid transparent;
}
.sp-nav a i { font-size: 19px; opacity: .8; display: inline-block; height: auto; line-height: 1; float: none; margin: 0; }
.sp-nav a:hover { color: #fff !important; background: rgba(255,255,255,.06); }
.sp-nav a.is-active { color: #fff !important; border-bottom-color: var(--gold); font-weight: 700; }
.sp-nav a.is-active i { color: var(--gold); opacity: 1; }

/* ---------- Kerangka halaman ---------- */
#main.sp-main { padding: 28px 0 40px; min-height: calc(100vh - 220px); }
#main.sp-main > .row { max-width: 1440px; margin: 0 auto; }
#main .container { width: 100% !important; max-width: none; padding: 0 12px; }
#main .section { padding-top: 0; }
#main .row { margin-bottom: 0; }

/* ---------- Kartu ---------- */
body.sp-body .card {
  background: var(--surface);
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  margin: 0 0 20px;
  overflow: hidden;
}
body.sp-body .card .card-content { padding: 22px 24px; }
body.sp-body .card-title,
body.sp-body .card .card-content .card-title {
  font-size: 1.45rem !important; font-weight: 700 !important; line-height: 1.25 !important;
  color: var(--text); margin-bottom: 4px !important; letter-spacing: -.02em;
}
body.sp-body .medium-small { color: var(--muted); font-size: .9rem; margin: 2px 0; }
body.sp-body .card-border-gray { border-color: var(--line) !important; }

/* Kartu skor dashboard (sebelumnya gradien mencolok) */
body.sp-body .card[class*="gradient-45deg"] {
  background: var(--surface) !important;
  color: var(--text) !important;
  position: relative;
  min-height: 0 !important;
}
body.sp-body .card[class*="gradient-45deg"]::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sp-accent, var(--ink));
}
body.sp-body .card.gradient-45deg-light-blue-cyan { --sp-accent: var(--ink-2); }
body.sp-body .card.gradient-45deg-red-pink        { --sp-accent: #B5453B; }
body.sp-body .card.gradient-45deg-amber-amber     { --sp-accent: var(--gold); }
body.sp-body .card.gradient-45deg-green-teal      { --sp-accent: var(--ok); }
body.sp-body .card[class*="gradient-45deg"] .white-text,
body.sp-body .card[class*="gradient-45deg"] p,
body.sp-body .card[class*="gradient-45deg"] h5 { color: var(--text) !important; }
body.sp-body .card[class*="gradient-45deg"] .padding-4 { padding: 20px 22px 18px 26px !important; }
body.sp-body .card[class*="gradient-45deg"] h5 {
  font-size: 1.9rem !important; white-space: nowrap; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
body.sp-body .card[class*="gradient-45deg"] .no-margin { color: var(--muted) !important; font-size: .88rem; }
body.sp-body .card[class*="gradient-45deg"] .col.s7 p { font-weight: 700; font-size: .95rem; margin-top: 10px; }
body.sp-body .background-round {
  background: var(--gold-soft) !important; color: var(--ink) !important;
  border-radius: 10px !important; padding: 9px !important; font-size: 22px !important;
}
body.sp-body .card[class*="gradient-45deg"] .background-round { background: color-mix(in srgb, var(--sp-accent) 12%, white) !important; color: var(--sp-accent) !important; }

/* Blok profil (detail penulis/fakultas/prodi) */
body.sp-body .card .card-image,
body.sp-body .profile-card .card-image { display: none; }
body.sp-body #profile-page-header .card-image { display: none; }
body.sp-body .gradient-45deg-blue-grey-blue-grey:not(.btn):not(.card) {
  background: var(--ink) !important;
}
body.sp-body .card-panel { border-radius: var(--radius-sm); box-shadow: none; border: 1px solid var(--line); }

/* Tombol pintasan (Scopus Documents, WoS Documents, ...) di halaman detail */
body.sp-body a.card-panel, body.sp-body .card-panel.hoverable { transition: border-color .15s, background .15s; }
body.sp-body .card-panel.hoverable:hover { border-color: var(--gold); background: #FFFCF5; box-shadow: none; }

/* ---------- Form & tombol ---------- */
body.sp-body input[type=text]:not(.browser-default),
body.sp-body input[type=search]:not(.browser-default),
body.sp-body input[type=number]:not(.browser-default) {
  height: 44px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid var(--line) !important; border-radius: 10px;
  background: #FBFCFC; box-shadow: none !important; font-size: 1rem; margin: 8px 0 12px;
}
body.sp-body input[type=text]:not(.browser-default):focus {
  border-color: var(--ink-2) !important; background: #fff;
  box-shadow: 0 0 0 3px rgba(21,84,86,.15) !important;
}
body.sp-body select.browser-default, body.sp-body select {
  border: 1px solid var(--line); border-radius: 10px; height: 44px; padding: 0 10px; background: #FBFCFC;
}
body.sp-body .btn, body.sp-body .btn-large, body.sp-body .btn-small {
  border-radius: 10px !important; box-shadow: none !important; text-transform: none !important;
  font-weight: 600; letter-spacing: 0; height: 44px; line-height: 44px; padding: 0 18px;
  background: var(--ink) !important; color: #fff !important; margin: 8px 4px 8px 0;
}
body.sp-body .btn:hover { background: var(--ink-2) !important; }
body.sp-body .btn i.right { margin-left: 8px; }
body.sp-body .btn i { font-size: 20px; }
body.sp-body .btn.white { background: #fff !important; border: 1px solid var(--line) !important; padding: 0 10px !important; }
body.sp-body .btn.white:hover { border-color: var(--ok) !important; }
body.sp-body .btn[disabled], body.sp-body .btn.disabled {
  background: var(--gold-soft) !important; color: #7A5A12 !important; opacity: 1;
}
body.sp-body .card-content form { display: block; overflow: hidden; margin: 14px -12px 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
body.sp-body .card-content form .col { padding-top: 0 !important; }

/* ---------- Paginasi ---------- */
body.sp-body ul.pagination {
  display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; padding: 0;
  border: 0 !important; background: none;
}
body.sp-body ul.pagination li {
  height: auto; border-radius: 9px; background: transparent !important; border: 1px solid var(--line) !important;
}
body.sp-body ul.pagination li a {
  display: block; min-width: 38px; height: 38px; line-height: 38px; padding: 0 10px;
  font-size: .95rem; color: var(--text) !important; text-align: center;
}
body.sp-body ul.pagination li:hover { border-color: var(--ink-2) !important; }
body.sp-body ul.pagination li.active { background: var(--ink) !important; border-color: var(--ink) !important; }
body.sp-body ul.pagination li.active a { color: #fff !important; }

/* ---------- Tabel & daftar dokumen ---------- */
body.sp-body table { border-collapse: separate; border-spacing: 0; }
body.sp-body table tr { border-bottom: 0; }
body.sp-body table td, body.sp-body table th {
  border-bottom: 1px solid var(--line-2); padding: 16px 12px; vertical-align: top; font-size: .95rem;
}
body.sp-body table th { color: var(--muted); font-weight: 600; font-size: .85rem; background: #F8FAF9; }
body.sp-body table.highlight > tbody > tr:hover, body.sp-body table tbody tr:hover { background: #FAFCFB; }
body.sp-body table td h6 { margin: 0 0 6px; font-size: .85rem; }
body.sp-body table td h6 font[color="orange"] {
  display: inline-block; background: var(--gold-soft); color: #7A5A12; font-weight: 700;
  padding: 2px 9px; border-radius: 999px;
}
body.sp-body .wostable td { padding: 6px 8px; }
body.sp-body .striped tbody tr:nth-child(odd) { background: #F8FAF9; }

/* ---------- Daftar penulis ---------- */
.sp-author-list { list-style: none; margin: 4px 0 0; padding: 0; }
.sp-author {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line-2);
}
.sp-author:last-child { border-bottom: 0; }
.sp-avatar {
  width: 64px; height: 64px; object-fit: cover; border-radius: 14px;
  background: #E3ECEA; border: 1px solid var(--line);
}
.sp-author-name { display: inline-block; font-weight: 700; font-size: 1.05rem; color: var(--text) !important; }
.sp-author-name:hover { color: var(--ink-2) !important; text-decoration: underline; text-underline-offset: 3px; }
.sp-author-meta { color: var(--muted); font-size: .88rem; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-chip {
  display: inline-flex; align-items: baseline; gap: 5px; font-size: .82rem; font-variant-numeric: tabular-nums;
  padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.5;
}
.sp-chip b { font-weight: 700; }
.sp-chip--wos { color: var(--wos); background: #F3F1FC; }
.sp-chip--scopus { color: var(--scopus); background: #FDF2EA; }
.sp-chip--gs { color: var(--gs); background: #EEF3FD; }
.sp-scores { display: grid; grid-template-columns: repeat(4, minmax(78px, auto)); gap: 4px 20px; margin: 0; text-align: right; }
.sp-scores dt { color: var(--muted); font-size: .75rem; font-weight: 500; }
.sp-scores dd { margin: 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sp-scores div:first-child dd { color: var(--ink); }
.sp-extlink { font-size: .85rem; font-weight: 600; }
.sp-empty { padding: 28px 4px; color: var(--muted); }

/* ---------- Grafik ---------- */
body.sp-body canvas { max-width: 100%; }
body.sp-body .progress { background: var(--line-2); border-radius: 999px; }
body.sp-body .progress .indeterminate { background: var(--gold); }
body.sp-body .ct-label { font-family: var(--font); }

/* ---------- Footer ---------- */
.sp-footer { background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.sp-footer-inner {
  max-width: 1440px; margin: 0 auto; padding: 18px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* Sembunyikan sisa elemen template lama */
.sidenav-main, .sidenav-trigger, #horizontal-nav, .page-topbar { display: none !important; }

/* ---------- Responsif ---------- */
@media (max-width: 992px) {
  .sp-menu-toggle { display: inline-flex; }
  .sp-brand-text span { display: none; }
  .sp-nav { display: none; }
  .sp-nav.is-open { display: block; }
  .sp-nav ul { flex-direction: column; padding: 6px 12px 12px; }
  .sp-nav a { border-bottom: 0; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; }
  .sp-nav a.is-active { border-left-color: var(--gold); background: rgba(255,255,255,.06); }
  .sp-author { grid-template-columns: 56px 1fr; }
  .sp-avatar { width: 56px; height: 56px; }
  .sp-scores { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); text-align: left; background: #F8FAF9; padding: 10px 12px; border-radius: 10px; }
}
@media (max-width: 600px) {
  html { font-size: 14.5px; }
  .sp-topbar { padding: 10px 16px; }
  .sp-brand-plate img { height: 28px; }
  .sp-brand-text strong { font-size: .95rem; }
  #main.sp-main { padding-top: 16px; }
  #main .container { padding: 0 4px; }
  body.sp-body .card .card-content { padding: 18px 16px; }
  body.sp-body .card[class*="gradient-45deg"] h5 { font-size: 1.7rem !important; }
  body.sp-body table td { padding: 12px 6px; }
  body.sp-body table td[width] { width: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Kartu profil (penulis / fakultas / prodi) ---------- */
#profile-card { padding: 22px 12px 12px; }
#profile-card .card:not(.card-hover) {
  border: 0 !important; background: transparent !important; overflow: visible; margin: 0 0 12px;
}
#profile-card p.konten, #profile-card p.kontenmobile { line-height: 1.5; margin: 0 0 2px; color: var(--muted); }
#profile-card p.konten:first-child a, #profile-card p.konten b, #profile-card p.kontenmobile b {
  color: var(--text); font-weight: 700; font-size: 1.08rem;
}
#profile-card img#google-photo {
  background: #E3ECEA !important; padding: 0 !important; border-radius: 14px !important;
  width: 85px; height: 85px !important; object-fit: cover; border: 1px solid var(--line);
}
#profile-card .card.card-hover { margin: 0 0 16px; border-radius: 12px !important; transition: border-color .15s, background-color .15s; }
#profile-card .card.card-hover .card-content { padding: 16px 10px; }
#profile-card .card.card-hover a { color: var(--text); font-weight: 600; font-size: .92rem; display: block; }
#profile-card .card.card-hover p { margin: 6px 0 0 !important; line-height: 1.35; }
#profile-card .card.card-hover i { color: var(--ink-2) !important; font-size: 26px !important; }
#profile-card .card.card-hover:hover { border-color: var(--gold) !important; background: #FFFCF5; }
#profile-card .card.selectaktif { background: var(--ink) !important; border-color: var(--ink) !important; }
#profile-card .card.selectaktif a, #profile-card .card.selectaktif i { color: #fff !important; }
#profile-card .card.selectaktif i { color: var(--gold) !important; }
@media (max-width: 992px) { #profile-card img#google-photo { width: 96px; height: 96px !important; } }
@media (max-width: 992px) {
  #profile-card img#google-photo { width: 96px !important; margin: 0 auto; display: block; }
  #profile-card .col.l2 { width: 50% !important; padding: 0 6px; }
  #profile-card .col.l2:has(.konten), #profile-card .col.l2:has(.kontenmobile) { width: 100% !important; }
  #profile-card .card.card-hover .card-content { padding: 12px 6px; }
}
@media (max-width: 600px) {
  body.sp-body .card[class*="gradient-45deg"] { margin-bottom: 12px; }
  body.sp-body .card[class*="gradient-45deg"] .padding-4 { padding: 14px 16px 12px 20px !important; }
  body.sp-body .card[class*="gradient-45deg"] .background-round { display: none; }
  body.sp-body .card[class*="gradient-45deg"] .col.s7 p { margin-top: 6px; }
}
footer.sp-footer { padding-left: 0 !important; margin: 0 !important; }
body.sp-body table.bordered td, body.sp-body table.bordered th,
body.sp-body table[border] td, body.sp-body table[border] th,
body.sp-body table td, body.sp-body table th { border-left: 0 !important; border-right: 0 !important; border-top: 0 !important; border-color: var(--line-2) !important; }
body.sp-body table { border: 0 !important; }
body.sp-body table thead th, body.sp-body table tr:first-child th { border-bottom: 1px solid var(--line) !important; }
body.sp-body table td > a, body.sp-body table td > font > a { font-weight: 600; }

/* ==========================================================================
   Dashboard v2 — gauge, benchmark, sankey, radar, pivot
   ========================================================================== */
.db { display: flex; flex-direction: column; gap: 20px; }
.db .card.db-card { margin: 0; padding: 22px 24px 20px; overflow: visible; }
.db-head { margin-bottom: 14px; }
.db-head h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; letter-spacing: -.015em; color: var(--text); line-height: 1.3; }
.db-head p { margin: 0; color: var(--muted); font-size: .9rem; max-width: 68ch; }
.db-head--row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-start; justify-content: space-between; }
.db-head--row > div:first-child { min-width: 0; flex: 1 1 340px; }

/* Skor SINTA: strip angka ringkas */
.db-kpis {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.db-kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-left: 1px solid var(--line-2); min-width: 0; }
.db-kpi:first-child { border-left: 0; }
.db-kpi-label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.db-kpi strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.15; }
.db-kpi-sub { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.db-kpi:nth-child(-n+4) strong { color: var(--ink); }

/* Gauge */
.db-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.db-gauge { margin: 0; text-align: center; }
.db-gauge-chart { height: 170px; }
.db-gauge figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: -18px; }
.db-gauge figcaption strong { font-weight: 700; font-size: .95rem; color: var(--text); }
.db-gauge figcaption span { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* Kontrol segmen */
.db-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.db-seg button {
  border: 0; background: transparent; color: var(--muted); font: 600 .85rem var(--font);
  padding: 7px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.db-seg button:hover { color: var(--text); background: rgba(255,255,255,.7); }
.db-seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(15,61,62,.12), inset 0 -2px 0 var(--gold); }

.db-chart { width: 100%; }
.db-chart--bench { height: 420px; }
.db-chart--sankey { height: 440px; }
.db-chart--radar { height: 380px; }
.db-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; }

/* Chip radar */
.db-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.db-chips button {
  --chip: transparent;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: 600 .8rem var(--font); padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.db-chips button::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--chip); border: 1px solid var(--line); }
.db-chips button[aria-pressed="true"] { color: var(--text); border-color: var(--text); }
.db-chips button[aria-pressed="true"]::before { border-color: var(--chip); }

/* Pivot */
.db-pivot-tools { display: flex; gap: 16px; margin: 0 0 8px; }
.db-link { border: 0; background: none; padding: 0; color: var(--ink-2); font: 600 .88rem var(--font); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.db-link:hover { color: var(--gold); text-decoration-color: currentColor; }
.db-pivot-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
body.sp-body table.db-pivot { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; }
body.sp-body table.db-pivot th, body.sp-body table.db-pivot td { padding: 8px 10px; font-size: .88rem; vertical-align: middle; border-bottom: 1px solid var(--line-2) !important; }
body.sp-body table.db-pivot thead th { position: sticky; top: 0; background: #F8FAF9; color: var(--muted); font-weight: 600; font-size: .8rem; z-index: 1; }
body.sp-body table.db-pivot tbody tr:hover { background: transparent; }
body.sp-body table.db-pivot tbody tr:hover > * { box-shadow: inset 0 9999px 0 rgba(200,150,46,.06); }
.db-pivot .pv-name { text-align: left; font-weight: 500; color: var(--text); min-width: 280px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.db-pivot thead .pv-name { background: #F8FAF9; z-index: 2; }
.db-pivot .pv-num { text-align: right; font-variant-numeric: tabular-nums; width: 76px; white-space: nowrap; background: rgba(31, 110, 104, var(--a, 0)); }
.db-pivot .pv-dark { color: #fff; }
.db-pivot .pv-total { font-weight: 700; background: #F8FAF9; border-left: 1px solid var(--line) !important; }
.db-pivot .pv-all th, .db-pivot .pv-all td { font-weight: 700; background: #F3F6F5; }
.db-pivot .pv-l1 .pv-name { font-weight: 700; }
.db-pivot .pv-l2 .pv-name { padding-left: 34px; }
.db-pivot .pv-l3 .pv-name { padding-left: 62px; font-weight: 400; }
.db-pivot .pv-l3 .pv-name a { color: var(--text); }
.db-pivot .pv-l3 .pv-name a:hover { color: var(--ink-2); text-decoration: underline; }
.db-pivot .pv-code { color: var(--muted); font-weight: 500; font-size: .8rem; margin-left: 4px; }
.db-pivot .pv-empty { color: var(--muted); font-style: italic; padding-left: 34px; }
.pv-tog { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.pv-caret { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 4px; background: var(--line-2); position: relative; transition: transform .15s; }
.pv-caret::after { content: ""; position: absolute; left: 5px; top: 4px; border: 4px solid transparent; border-left: 5px solid var(--ink); border-right: 0; }
.pv-tog[aria-expanded="true"] .pv-caret { transform: rotate(90deg); }
.pv-tog:hover .pv-caret { background: var(--gold-soft); }
.pv-flash > * { animation: pvflash 1.6s ease-out; }
@keyframes pvflash { from { box-shadow: inset 0 9999px 0 rgba(200,150,46,.35); } to { box-shadow: inset 0 9999px 0 rgba(200,150,46,0); } }
.db-foot { color: var(--muted); font-size: .82rem; margin: 10px 0 0; max-width: 90ch; }

@media (max-width: 1200px) {
  .db-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .db-kpi:nth-child(4) { border-left: 0; }
  .db-kpi:nth-child(n+4) { border-top: 1px solid var(--line-2); }
  .db-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .db .card.db-card { padding: 18px 14px; }
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-kpi { padding: 12px 14px; }
  .db-kpi:nth-child(odd) { border-left: 0; }
  .db-kpi:nth-child(4) { border-left: 1px solid var(--line-2); }
  .db-kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .db-kpi strong { font-size: 1.3rem; }
  .db-gauges { grid-template-columns: minmax(0, 1fr); }
  .db-gauge-chart { height: 150px; }
  .db-chart--bench { height: 400px; }
  .db-chart--sankey { height: 520px; }
  .db-pivot .pv-name { min-width: 200px; }
}

/* ==========================================================================
   Panel grafik bersama (detail fakultas/prodi/dosen, analisis, benchmark)
   ========================================================================== */
.sp-unit { display: flex; flex-direction: column; gap: 20px; padding: 0 12px; }
.sp-chart-msg { color: var(--muted); font-size: .9rem; padding: 24px 4px; margin: 0; }
.sp-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.sp-kpi { display: flex; flex-direction: column; gap: 1px; padding: 14px 16px; border-left: 1px solid var(--line-2); border-top: 1px solid var(--line-2); margin: 0 0 -1px -1px; min-width: 0; }
.sp-kpi span { color: var(--muted); font-size: .78rem; font-weight: 600; }
.sp-kpi strong { font-size: 1.45rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); line-height: 1.2; }
.sp-kpi em { font-style: normal; color: var(--muted); font-size: .76rem; line-height: 1.35; letter-spacing: 0; }
.sp-kpi.is-up em { color: var(--ink-2); font-weight: 600; }
.sp-kpi.is-up em::before { content: "▲ "; color: var(--gold); font-size: .7em; }

.sp-chart-grid { display: grid; gap: 20px; }
.sp-chart-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-chart-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.sp-body .card.sp-chart-card { margin: 0; padding: 18px 20px 14px; overflow: visible; }
.sp-chart-head h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 2px; color: var(--text); letter-spacing: -.01em; line-height: 1.35; }
.sp-chart-head p { font-size: .82rem; color: var(--muted); margin: 0 0 8px; line-height: 1.45; }
.sp-chart { height: 230px; width: 100%; }
.sp-chart-card--trend .sp-chart { height: 200px; }
.sp-chart-card--wide .sp-chart { height: 240px; }
.sp-detail #profile-card { margin-bottom: 20px; }

@media (max-width: 1100px) { .sp-chart-grid--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) {
  .sp-unit { padding: 0 4px; }
  .sp-chart-grid--3, .sp-chart-grid--2 { grid-template-columns: minmax(0, 1fr); }
  .sp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-kpi strong { font-size: 1.2rem; }
}

/* ---------- Analisis & Benchmark ---------- */
.sp-select { display: inline-flex; flex-direction: column; gap: 4px; min-width: 220px; }
.sp-select span { font-size: .78rem; font-weight: 600; color: var(--muted); }
body.sp-body .sp-select select {
  display: block; width: 100%; height: 42px; padding: 0 36px 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230F3D3E' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none; appearance: none; font: 600 .9rem var(--font); color: var(--text); cursor: pointer;
}
body.sp-body .sp-select select:focus { border-color: var(--ink-2); outline: 3px solid rgba(21,84,86,.15); }
#an .sp-kpis { margin-top: 6px; }
.bm-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.an-src h3 { font-size: .95rem; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.an-cited { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.an-cited li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.an-cited li:last-child { border-bottom: 0; }
.an-cited-n { text-align: right; line-height: 1.1; }
.an-cited-n strong { display: block; font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.an-cited-n span { font-size: .72rem; color: var(--muted); }
.an-cited-t { font-size: .88rem; line-height: 1.4; color: var(--text); min-width: 0; }
.an-cited-t a { color: var(--text); font-weight: 600; }
.an-cited-t a:hover { color: var(--ink-2); text-decoration: underline; }
.an-cited-t > span { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.an-q { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; background: var(--ink); }
.an-q--Q2 { background: #2F7C78; } .an-q--Q3 { background: #6FB3AB; color: var(--text); } .an-q--Q4 { background: #B9DDD6; color: var(--text); }
.bm-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.bm-sort:hover, .bm-sort.is-on { color: var(--ink); }
body.sp-body table.bm-table th, body.sp-body table.bm-table td { white-space: nowrap; }
.bm-table .pv-name { min-width: 240px; }
.bm-table .pv-name a { color: var(--text); font-weight: 600; }
.bm-table .pv-name a:hover { color: var(--ink-2); text-decoration: underline; }
.bm-table .bm-rank { color: var(--muted); width: 40px; }
.bm-table .bm-fak { color: var(--muted); font-size: .8rem; font-weight: 600; }
.bm-table td.is-sorted { background: #FBF6EA; }
.bm-table td.bm-up { color: var(--ink); font-weight: 700; }
.bm-table thead th.bm-col-fak { min-width: 0; position: static; }
@media (max-width: 700px) { .sp-select { min-width: 0; width: 100%; } .bm-filters { width: 100%; } }

@media (max-width: 640px) { #bm-scatter { height: 380px !important; } }
