/* ============================================================
   Monitor Tender — "Dokumen resmi yang hidup"
   Design system: bahasa visual dokumen pengadaan Indonesia
   (kop, angka tabular, hairline formulir, cap status)
   menyatu dengan data interface modern.
   Distilasi: anthropics/frontend-design, vercel/web-design-guidelines,
   leonxlnx/taste-skill, pbakaus/impeccable, emilkowalski/emil-design-eng
   ============================================================ */
:root {
  --paper: #FAF9F6;
  --paper-2: #F2EFE8;
  --card: #FFFFFF;
  --ink: #1B2433;
  --navy: #0D2458;
  --navy-deep: #0A1C48;
  --accent: #B85C0A;
  --amber: #FF9014;
  --line: #E2DCCB;
  --line-soft: #ECE7D9;
  --muted: #5D6572;
  --faint: #8A8FA0; /* tidak untuk body text */
  --ok: #1C7A4B; --ok-bg: #E9F5EE;
  --warn: #9A6200; --warn-bg: #FBF3DC;
  --bad: #B3261E; --bad-bg: #FBEBE9;
  --info: #1D5FBF; --info-bg: #E9F1FD;
  --neutral-bg: #EFF0F3;
  --radius: 14px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--navy); color: #fff; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: #C9C2B2; border-radius: 6px; border: 2px solid var(--paper-2); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 28px; padding-bottom: 64px; min-height: 70vh; }

h1, h2, h3 { color: var(--navy-deep); letter-spacing: -0.02em; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 8px; }
h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 12px; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--navy); }
.muted { color: var(--muted); }
/* Strip catatan kecil: banner cakupan data / error filter (B1, B2, B5) */
.note-strip { font-size: .82rem; color: var(--muted); background: var(--info-bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px;
  margin: 4px 2px 12px; font-variant-numeric: tabular-nums; }
.note-strip.warn { background: var(--warn-bg); }
.note-strip.err { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.footnote { font-size: .8rem; color: var(--muted); margin: 10px 2px 0; }
.sub { color: var(--muted); font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
.r { text-align: right; font-variant-numeric: tabular-nums; }
code, .mono { font-family: var(--mono); font-size: 0.88em; }

/* ---------- Topbar: kop dokumen ---------- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar::after { /* garis ganda ala kop surat resmi */
  content: ""; display: block; height: 3px;
  border-top: 2px solid var(--navy); border-bottom: 1px solid var(--navy);
  opacity: 0.9;
}
.topbar-in { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 32px; width: auto; display: block; }
.brand-div { width: 1px; height: 26px; background: var(--line); }
.brand-name { font-weight: 800; color: var(--navy-deep); font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; }
.nav-search { margin-left: auto; }
.nav-search form { display: flex; align-items: center; gap: 8px; background: var(--paper-2); border: 1px solid transparent; border-radius: 999px; padding: 7px 14px; }
.nav-search form:focus-within { border-color: var(--navy); background: #fff; }
.nav-search input { border: 0; background: none; outline: none; font: inherit; font-size: 0.9rem; width: 200px; color: var(--ink); }
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.92rem;
  padding: 8px 14px; border-radius: 8px;
}
.mainnav a.active { color: var(--navy-deep); background: var(--paper-2); }
@media (hover: hover) and (pointer: fine) {
  .mainnav a:hover { color: var(--navy-deep); background: var(--paper-2); }
  .mainnav a { transition: background 160ms ease-out, color 160ms ease-out; }
}

/* ---------- Masthead dokumen (home) ---------- */
.doc-head {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 36px 40px 32px;
  position: relative;
  overflow: hidden;
}
.doc-head::before { /* pita aksen tipis, bukan gradien blok */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(var(--amber), var(--accent));
}
.doc-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.doc-kop .doc-no { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.doc-head h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 6px; }
.doc-head .lead { color: var(--muted); max-width: 62ch; margin: 0 0 20px; font-size: 1.02rem; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; border-top: 1px solid var(--line-soft); padding-top: 14px; font-size: 0.88rem; color: var(--muted); }
.doc-meta b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* SATU elemen berani: angka tabular raksasa */
.giant {
  font-weight: 800; color: var(--navy-deep);
  font-size: clamp(72px, 13vw, 128px);
  line-height: 1; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin: 4px 0 2px;
}
.giant-sub { color: var(--muted); font-size: 1rem; margin-bottom: 18px; }
.giant-sub b { color: var(--ink); }
.giant-cats { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-bottom: 18px; font-size: 0.88rem; color: var(--muted); }
.giant-cats b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Ledger: strip statistik ala buku besar, bukan kartu kembar */
.ledger {
  display: flex; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); margin-top: 20px; overflow: hidden;
}
.ledger-item { flex: 1 1 200px; padding: 18px 24px; }
.ledger-item + .ledger-item { border-left: 1px solid var(--line-soft); }
.ledger-item .l-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 2px; }
.ledger-item .l-num { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; font-size: 1.9rem; line-height: 1.15; }
.ledger-item.hero-stat .l-num { font-size: 2.6rem; }
.ledger-item .l-sub { font-size: 0.8rem; color: var(--muted); }
a.ledger-item { color: inherit; text-decoration: none; }
a.ledger-item:hover { background: var(--paper-2); }
a.ledger-item:hover .l-num { color: var(--accent); }
/* Kartu insight: pola ledger-item sebagai panel mandiri */
a.insight-card { color: inherit; text-decoration: none; display: block; }
a.insight-card:hover { background: var(--paper-2); }
a.insight-card:hover .l-num { color: var(--accent); }
a.insight-card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.insight-card .l-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 2px; }
.insight-card .l-num { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; font-size: 2.2rem; line-height: 1.15; }
.insight-card h3 { margin: 8px 0 6px; font-size: 1.02rem; line-height: 1.35; }
.insight-card .insight-sub { font-size: 0.85rem; color: var(--muted); margin: 0; line-height: 1.5; }
.insight-card .link-more { font-size: 0.85rem; }
.giant-link { text-decoration: none; color: inherit; display: inline-block; }
.giant-link:hover .giant { color: var(--accent); }

/* Searchbar */
.searchbar { display: flex; gap: 8px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 6px 6px 18px; max-width: 640px; }
.searchbar:focus-within { border-color: var(--navy); }
.searchbar input { flex: 1; border: 0; outline: none; font: inherit; font-size: 1rem; background: none; color: var(--ink); min-width: 0; }
.searchbar input::placeholder { color: var(--faint); }
.btn, .searchbar button {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--navy); color: #fff; border: 0; border-radius: 9px;
  padding: 11px 26px; font-size: 0.95rem;
  display: inline-block; line-height: 1.5; text-align: center;
  text-decoration: none; max-width: 100%;
}
@media (hover: hover) and (pointer: fine) {
  .btn, .searchbar button { transition: transform 160ms ease-out, background 160ms ease-out; }
  .btn:hover, .searchbar button:hover { background: var(--navy-deep); transform: translateY(-1px); }
  .btn:active, .searchbar button:active { transform: translateY(0) scale(0.98); }
}

/* ---------- Sections ---------- */
.section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 700; font-size: 0.9rem; text-decoration: none; border-bottom: 2px solid var(--amber); padding-bottom: 1px; }
@media (hover: hover) and (pointer: fine) {
  .link-more { transition: color 160ms ease-out, border-color 160ms ease-out; }
  .link-more:hover { color: var(--accent); border-color: var(--accent); }
}

/* Panel dokumen */
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.panel-pad { padding: 20px 24px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Rank list: nomor urut tabular + bar tipis TANPA track */
.rank-list { list-style: none; margin: 6px 0 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 4px; border-bottom: 1px solid var(--line-soft); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li.has-link { display: block; padding: 0; }
.rank-list a.rank-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: baseline; padding: 11px 4px; color: inherit; text-decoration: none; border-radius: 8px; }
.rank-list a.rank-row:hover { background: var(--paper-2); }
.rank-list a.rank-row:hover .rank-label { color: var(--accent); }
.rank-list a.rank-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rank-num { font-family: var(--mono); font-size: 1.05rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rank-label { font-weight: 600; color: var(--ink); font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rank-val { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.rank-bar { grid-column: 2 / 4; height: 3px; background: none; margin-top: -4px; }
.rank-bar i { display: block; height: 3px; border-radius: 2px; background: var(--navy); }
.rank-bar.amber i { background: var(--amber); }

/* Rows: SATU hairline bawah antar row */
.rows { list-style: none; margin: 0; padding: 0; }
.row-item { border-bottom: 1px solid var(--line-soft); }
.row-item:last-child { border-bottom: 0; }
.row-link { display: flex; justify-content: space-between; gap: 16px; padding: 15px 4px; text-decoration: none; color: inherit; align-items: baseline; }
.row-title { font-weight: 700; color: var(--navy-deep); font-size: 1rem; line-height: 1.45; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 5px; font-size: 0.85rem; color: var(--muted); }
.row-side { text-align: right; flex-shrink: 0; }
.row-hps { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-deadline { display: block; font-size: 0.8rem; color: var(--warn); font-weight: 700; margin-top: 3px; white-space: nowrap; }
.row-deadline.soon { color: var(--bad); }
@media (hover: hover) and (pointer: fine) {
  .row-link { transition: background 160ms ease-out; }
  .row-link:hover { background: var(--paper); }
  .row-link:hover .row-title { color: var(--accent); }
  .row-title { transition: color 160ms ease-out; }
}
mark { background: #FDE9C8; color: inherit; border-radius: 3px; padding: 0 2px; }

/* Cap/stempel status */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; font-weight: 700; line-height: 1;
  padding: 6px 11px; border-radius: 7px;
  border: 1.5px solid currentColor; background: #fff; white-space: nowrap;
}
.pill.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok); }
.pill.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn); }
.pill.bad { color: var(--bad); background: var(--bad-bg); border-color: var(--bad); }
.pill.info { color: var(--info); background: var(--info-bg); border-color: var(--info); }
.pill.neutral { color: var(--muted); background: var(--neutral-bg); border-color: #C9CDD6; }

/* Deadline list */
.deadline-list { list-style: none; margin: 0; padding: 0; }
.deadline-list li { border-bottom: 1px solid var(--line-soft); }
.deadline-list li:last-child { border-bottom: 0; }
.dl-link { display: flex; gap: 14px; align-items: center; padding: 13px 4px; text-decoration: none; color: inherit; }
.dl-cal { flex-shrink: 0; width: 52px; text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 6px 0; background: var(--paper); }
.dl-cal .d { display: block; font-weight: 800; font-size: 1.25rem; color: var(--navy-deep); font-variant-numeric: tabular-nums; line-height: 1.1; }
.dl-cal .m { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.dl-body { flex: 1; min-width: 0; }
.dl-title { font-weight: 700; color: var(--navy-deep); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dl-sub { font-size: 0.85rem; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .dl-link { transition: background 160ms ease-out; }
  .dl-link:hover { background: var(--paper); }
  .dl-link:hover .dl-title { color: var(--accent); }
  .dl-title { transition: color 160ms ease-out; }
}

/* ---------- Detail: blok dokumen ---------- */
.crumb { font-size: 0.87rem; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--navy); text-decoration: underline; }
.detail-head { margin-bottom: 20px; }
.detail-head .stamps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-head h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); margin: 0 0 6px; }
.detail-id { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
/* Fakta kunci ala kolom formulir resmi */
.fact-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden; margin-bottom: 20px;
}
.fact { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.fact:nth-child(3n+2) { border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.fact:nth-last-child(-n+3) { border-bottom: 0; }
.f-label { font-size: 0.78rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.f-val { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.f-val.big { font-size: 1.3rem; color: var(--navy-deep); letter-spacing: -0.02em; }
.block { margin-bottom: 20px; }
.win-card { border-left: 5px solid var(--ok); }
.win-name { font-size: 1.25rem; font-weight: 800; color: var(--navy-deep); margin: 6px 0 2px; }
.win-price { font-size: 1.9rem; font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; margin-top: 10px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 7px 16px; margin: 0; font-size: 0.93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Timeline */
.timeline { list-style: none; margin: 8px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 30px; border-left: 2px solid var(--line); margin-left: 7px; }
.timeline li:last-child { padding-bottom: 2px; }
.timeline .t-dot { position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--faint); }
.timeline li.done .t-dot { background: var(--ok); border-color: var(--ok); }
.timeline li.now .t-dot { background: var(--amber); border-color: var(--accent); box-shadow: 0 0 0 4px var(--warn-bg); }
.timeline .t-name { font-weight: 700; color: var(--navy-deep); }
.timeline .t-date { font-size: 0.83rem; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Tabel data */
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th { text-align: left; font-size: 0.78rem; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--line); }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.r, table.data th.r { font-variant-numeric: tabular-nums; }

/* ---------- Pencarian ---------- */
.search-hero { padding: 28px 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.chip {
  font: inherit; font-size: 0.87rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 16px;
}
.chip.on { border-color: var(--navy); color: var(--navy-deep); background: var(--paper-2); }
@media (hover: hover) and (pointer: fine) {
  .chip { transition: border-color 160ms ease-out, color 160ms ease-out; }
  .chip:hover { border-color: var(--navy); color: var(--navy-deep); }
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.filters select, .filters input, .inp {
  font: inherit; font-size: 0.92rem; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  max-width: 220px;
}
.filters select:focus, .filters input:focus, .inp:focus { outline: none; border-color: var(--navy); }
.inp { width: 100%; }

/* ---------- Leaderboard ---------- */
.lb-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
.lb-row:last-child { border-bottom: 0; }
.lb-rank { font-weight: 800; font-size: 1.7rem; color: var(--navy); opacity: 0.28; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.lb-row:nth-child(1) .lb-rank, .lb-row:nth-child(2) .lb-rank, .lb-row:nth-child(3) .lb-rank { opacity: 1; color: var(--accent); }
.lb-name { font-weight: 700; color: var(--navy-deep); }
.lb-bar { height: 3px; margin-top: 7px; }
.lb-bar i { display: block; height: 3px; border-radius: 2px; background: var(--amber); }
.lb-val { text-align: right; }
.lb-val b { display: block; font-variant-numeric: tabular-nums; color: var(--navy-deep); }
.lb-val span { font-size: 0.82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-btn {
  font: inherit; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 10px; padding: 10px 20px;
}
.tab-btn.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .tab-btn { transition: all 160ms ease-out; }
  .tab-btn:not(.on):hover { border-color: var(--navy); color: var(--navy-deep); }
}

/* ---------- Login ---------- */
.login-card { max-width: 440px; margin: 48px auto; }
.login-card .panel-pad { padding: 36px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--card); margin-top: 40px; }
.foot::before { content: ""; display: block; height: 3px; border-top: 2px solid var(--navy); border-bottom: 1px solid var(--navy); opacity: 0.9; }
.foot-in { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }
.foot-logo { height: 26px; width: auto; }
.foot-lines { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }
.foot-lines b { color: var(--ink); font-variant-numeric: tabular-nums; }
.foot-tag { font-weight: 700; color: var(--navy-deep); }
.foot-meta { text-align: right; font-size: 0.85rem; color: var(--muted); }


/* ---------- Proof band (cermin proof strip suaradata.store) ---------- */
.proof-band { background: var(--paper-2); border-top: 1px solid var(--line); margin-top: 40px; }
.proof-band-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 28px; }
.pb-num { font-family: var(--mono); font-weight: 800; font-size: clamp(28px, 4vw, 40px);
  color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pb-label { font-weight: 700; font-size: 0.9rem; color: var(--ink); margin-top: 2px; }
.pb-sub { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.pb-src { text-align: center; font-size: 0.8rem; color: var(--muted); padding: 18px 16px 26px; margin: 0; }
.pb-src a { color: var(--accent); font-weight: 700; }
@media (max-width: 640px) { .proof-band-in { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- Empty / error ---------- */
.empty { text-align: center; padding: 48px 24px; }
.empty h3 { margin: 0 0 6px; }
.empty p { color: var(--muted); margin: 0 0 16px; }
.err-wrap { text-align: center; padding: 80px 24px; }
.err-code { font-size: 4rem; font-weight: 800; color: var(--navy); opacity: 0.2; font-variant-numeric: tabular-nums; }

/* ---------- Admin (fungsi dipertahankan, visual diselaraskan) ---------- */
.admin-table-wrap { overflow-x: auto; }
/* Tabel ramah ponsel: scroll horizontal di dalam panel,
   halaman tidak ikut bergeser. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Motion: hemat & bermakna ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
/* satu momen entrance: masthead angka */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.doc-head .giant { animation: rise 420ms cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .fact-strip { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3n+2) { border-left: 0; border-right: 0; }
  .fact:nth-child(2n) { border-left: 1px solid var(--line-soft); }
  .fact:nth-last-child(-n+3) { border-bottom: 1px solid var(--line-soft); }
  .fact:nth-last-child(-n+2) { border-bottom: 0; }
  .nav-search { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 20px; }
  .topbar-in { height: 60px; gap: 12px; }
  .brand-logo { height: 26px; }
  .brand-name { font-size: 0.92rem; }
  .mainnav a { padding: 8px 10px; font-size: 0.85rem; white-space: nowrap; }
  .mainnav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mainnav::-webkit-scrollbar { display: none; }
  .brand-name { white-space: nowrap; }
  .doc-head { padding: 24px 20px; }
  .ledger-item { flex: 1 1 45%; padding: 14px 16px; }
  .ledger-item:nth-child(3) { border-left: 0; }
  .ledger-item:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .ledger-item .l-num { font-size: 1.4rem; }
  .ledger-item.hero-stat .l-num { font-size: 1.7rem; }
  .fact-strip { grid-template-columns: 1fr; }
  .fact:nth-child(2n) { border-left: 0; }
  .fact { border-bottom: 1px solid var(--line-soft) !important; }
  .fact:last-child { border-bottom: 0 !important; }
  .row-link { flex-direction: column; gap: 6px; }
  .row-side { text-align: left; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 8px; }
  .lb-row { grid-template-columns: 44px 1fr; }
  .lb-val { grid-column: 2; text-align: left; display: flex; gap: 12px; align-items: baseline; }
  .search-hero { padding: 20px; }
  .foot-in { flex-direction: column; }
  .foot-meta { text-align: left; }
  .btn, .searchbar button, .chip, .tab-btn { min-height: 44px; }
}

/* compat v1: kelas lama yang masih dipakai sebagian template */
:root { --font-display: var(--font); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.kpis { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.kpi { flex: 1 1 200px; padding: 18px 24px; }
.kpi + .kpi { border-left: 1px solid var(--line-soft); }
.k-label { font-size: 0.85rem; color: var(--muted); }
.k-num { font-weight: 800; color: var(--navy-deep); font-variant-numeric: tabular-nums; font-size: 1.9rem; }
.k-sub { font-size: 0.8rem; color: var(--muted); }
.block { margin-bottom: 20px; }
.block-sub { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }
.count { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.e-icon { margin-bottom: 12px; }
.btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
@media (hover:hover) and (pointer:fine) { .btn.ghost:hover { border-color: var(--navy); background: var(--paper-2); } }

/* ============================================================
   Insight v1 + polish visual (2026-10-06)
   - profil perusahaan/instansi, tren 12 bulan, win rate
   - top-3 istimewa, anchor nav detail, empty state, count-up
   ============================================================ */

/* Leaderboard: link nama + win rate + top-3 istimewa */
.lb-name a { color: var(--navy-deep); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .lb-name a { transition: color 160ms ease-out; }
  .lb-name a:hover { color: var(--accent); }
}
.wr { display: block; font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px; }
.lb-row.top3 .lb-rank { font-size: 2.4rem; opacity: 1; color: var(--accent); }
.lb-row.top3 .lb-bar { height: 5px; margin-top: 8px; }
.lb-row.top3 .lb-bar i { height: 5px; }
.lb-row.top3:first-child { background: var(--paper-2); border-radius: 10px; }
.lb-row.top3:first-child .lb-rank { color: var(--accent); }

/* Tren 12 bulan: bar chart CSS-only */
.trend { margin-top: 20px; }
.trend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.trend-head h2 { margin: 0; }
.bars { display: flex; gap: 4px; height: 128px; border-bottom: 1px solid var(--line); padding-top: 18px; box-sizing: border-box; }
.bar-col { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.bar-track { flex: 1; display: flex; align-items: flex-end; }
.bar-track i { display: block; position: relative; width: 58%; max-width: 28px; margin: 0 auto; background: var(--navy); opacity: 0.82; border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-track i.top { background: var(--amber); opacity: 1; }
.bar-m { text-align: center; font-size: 0.68rem; color: var(--muted); font-weight: 700; padding-top: 6px; white-space: nowrap; }
a.bar-col { text-decoration: none; cursor: pointer; }
a.bar-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.bar-v { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font-size: 0.62rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
a.bar-col:hover .bar-v { color: var(--accent); }
.bar-now { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); font-size: 0.55rem; color: var(--muted); white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .bar-track i { transition: background 160ms ease-out, opacity 160ms ease-out; }
  .bar-col:hover .bar-track i { background: var(--accent); opacity: 1; }
}

/* Anchor nav halaman detail */
.anchor-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.anchor-nav a {
  font-size: 0.85rem; font-weight: 700; color: var(--muted); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; background: var(--card);
}
@media (hover: hover) and (pointer: fine) {
  .anchor-nav a { transition: color 160ms ease-out, border-color 160ms ease-out; }
  .anchor-nav a:hover { color: var(--navy-deep); border-color: var(--navy); }
}

/* Empty state: saran keyword */
.saran-kw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
.chip[href] { text-decoration: none; display: inline-block; }

/* Detail: kepadatan mode Operate */
.block { margin-bottom: 18px; }
table.data td { padding: 9px 12px; }
.win-name a { color: var(--navy-deep); text-decoration: none; border-bottom: 2px solid var(--amber); }
@media (hover: hover) and (pointer: fine) {
  .win-name a { transition: color 160ms ease-out, border-color 160ms ease-out; }
  .win-name a:hover { color: var(--accent); border-color: var(--accent); }
}
.f-val a { color: inherit; }
@media (hover: hover) and (pointer: fine) {
  .f-val a:hover { color: var(--accent); }
}
td a { color: var(--navy-deep); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  td a:hover { color: var(--accent); text-decoration: underline; }
}

@media (max-width: 640px) {
  .bars { gap: 2px; height: 110px; }
  .bar-m { font-size: 0.58rem; }
  .bar-v { font-size: 0.52rem; }
  .bar-now { font-size: 0.45rem; white-space: nowrap; line-height: 1.2; }
  .lb-row.top3 .lb-rank { font-size: 1.9rem; }
}

/* Export button size */
.btn.sm { padding: 8px 16px; font-size: 0.85rem; }

/* ===== Faceted filtering — /cari · gaya Tableau: simpel, elegan, presisi ===== */
.cari-top { padding: 22px 24px; margin-bottom: 20px; }
.cari-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.fpanel {
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; padding: 4px 16px 16px;
  position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto;
}
.fpanel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 6px; }
.fpanel-head b { color: var(--navy-deep); font-size: 0.95rem; }
.fpanel-close { display: none; border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.facet { border-top: 1px solid var(--line-soft); padding: 8px 0 10px; }
.facet:first-of-type { border-top: 0; }
.facet summary {
  cursor: pointer; font-weight: 700; color: var(--navy-deep); font-size: 0.8rem;
  letter-spacing: 0.02em; list-style: none; display: flex; align-items: center; gap: 6px;
  padding: 2px 0; user-select: none;
}
.facet summary::-webkit-details-marker { display: none; }
.facet summary::before { content: "▾"; color: var(--muted); font-size: 0.7rem; }
.facet:not([open]) summary::before { content: "▸"; }
.facet summary .fsel { font-weight: 600; color: var(--navy); font-size: 0.75rem; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* Kontrol kompak ala Tableau: radius kecil, border 1px, tanpa dekorasi */
.fchip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px;
  font-size: 0.82rem; color: #333; background: #fff; cursor: pointer;
  transition: border-color 120ms, background 120ms;
}
.fchip:hover { border-color: var(--navy); }
.fchip.on { border-color: var(--navy); background: #eaf0fb; color: var(--navy-deep); font-weight: 600; }
.fchip input { position: absolute; opacity: 0; pointer-events: none; }
.fchip .cnt, .fcheck-item .cnt {
  font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.fchip.on .cnt { color: var(--navy-deep); }
button.fchip { font-family: inherit; }
/* Daftar checkbox presisi */
.fcheck { margin-top: 8px; display: flex; flex-direction: column; gap: 1px; }
.fcheck.scroll { max-height: 216px; overflow-y: auto; border: 1px solid var(--line-soft); border-radius: 6px; padding: 4px; }
.fcheck-item { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; color: #333; }
.fcheck-item:hover { background: var(--paper-2); }
.fcheck-item input { accent-color: var(--navy); width: 15px; height: 15px; flex: none; margin: 0; }
.fcheck-item .fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcheck-item input:checked + .fname { font-weight: 600; color: var(--navy-deep); }
.fgroup { display: flex; flex-direction: column; gap: 1px; margin-bottom: 2px; }
.fgroup-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 2px; }
.fgroup-name { font-size: 0.78rem; font-weight: 600; color: var(--navy); }
.fgroup-name .cnt { color: #98A2B3; font-weight: 400; }
.fgroup-all { border: 1px solid var(--line-soft); background: #fff; border-radius: 4px; font-size: 0.72rem; color: var(--navy); padding: 2px 8px; cursor: pointer; }
.fgroup-all:hover { background: var(--paper-2); }
.flpse-q { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 0.85rem; font-family: inherit; box-sizing: border-box; }
.flpse-q:focus { outline: none; border-color: var(--navy); }
.fhps { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); }
.fhps input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 0.85rem; font-family: inherit; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.fhps input:focus { outline: none; border-color: var(--navy); }
.facet select { width: 100%; margin-top: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; font-size: 0.85rem; font-family: inherit; background: #fff; box-sizing: border-box; }
.fpanel-foot { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.fpanel-scrim { display: none; }
.cari-search { display: flex; gap: 8px; }
.cari-search input { flex: 1; }
#filter-toggle { display: none; white-space: nowrap; }
/* Chip filter aktif yang kalem */
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 4px; }
.achip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: #fff; color: var(--navy-deep); border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 6px 4px 10px; font-size: 0.8rem;
}
.achip .ak { color: var(--muted); font-weight: 600; font-size: 0.75rem; }
.achip .ax { color: var(--muted); border-radius: 4px; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.achip:hover { border-color: var(--navy); }
.achip:hover .ax { color: var(--navy-deep); }
.achip.clear { border-style: dashed; color: var(--muted); }
.pager { display: flex; gap: 6px; justify-content: center; margin: 22px 0 8px; flex-wrap: wrap; }
.pg {
  min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--navy);
  font-size: 0.88rem; font-variant-numeric: tabular-nums; padding: 0 10px; background: #fff;
}
.pg:hover { border-color: var(--navy); }
.pg.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }

@media (max-width: 900px) {
  .cari-layout { display: block; }
  #filter-toggle { display: inline-flex; }
  .fpanel {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 88vw);
    z-index: 80; border-radius: 0; border: 0; border-right: 1px solid var(--line);
    max-height: none; transform: translateX(-105%); transition: transform 220ms ease;
  }
  body.filter-open .fpanel { transform: none; }
  body.filter-open .fpanel-scrim {
    display: block; position: fixed; inset: 0; background: rgba(10,28,72,0.45); z-index: 70;
  }
  .fpanel-close { display: block; }
  .cari-search { flex-wrap: wrap; }
  .cari-search input { flex: 1 1 100%; }
}

/* Pipeline Prospek (2026-10-07) */
.prospek-hook-top{display:flex;justify-content:flex-start;align-items:flex-start;gap:56px;padding:30px 30px 24px;text-decoration:none;color:inherit;flex-wrap:wrap}
.prospek-hook-top:hover{text-decoration:none}
.prospek-hook-nums{display:flex;flex-direction:column;gap:8px;min-width:0}
.prospek-hook-cap{color:var(--muted);font-size:.95rem}
.prospek-hook-pagu{display:flex;flex-direction:column;align-items:flex-start;gap:8px;line-height:1.25}
.prospek-hook-pagu-v{font-size:2rem;font-weight:800;color:var(--navy);font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.prospek-hook-list{border-top:1px solid var(--line-soft)}
.prospek-hook-list .row-link{padding:18px 8px}
.upgrade-panel{border:2px dashed var(--line);text-align:center}
@media(max-width:640px){.prospek-hook-top{flex-direction:column;gap:22px;padding:24px 22px 18px}}

/* Toolbar list /prospek: search + sort di atas hasil (2026-10-07) */
.list-toolbar { display: flex; gap: 10px; margin: 0 0 14px; }
.list-toolbar #f-q { flex: 1; min-width: 0; }
.list-toolbar #f-sort { flex-shrink: 0; max-width: 220px; }
@media (max-width: 560px) {
  .list-toolbar { flex-direction: column; }
  .list-toolbar #f-sort { max-width: none; }
}

/* ---------- Tagbox: multi-keyword chip input (prospek) ---------- */
.tagbox {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 0.92rem; padding: 5px 10px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  max-width: 260px; width: 100%; cursor: text; min-height: 42px; box-sizing: border-box;
}
.tagbox:focus-within { outline: none; border-color: var(--navy); }
.tagbox input[type=text] {
  border: none; outline: none; background: transparent; box-shadow: none;
  font: inherit; color: var(--ink); flex: 1; min-width: 70px; padding: 5px 2px; margin: 0;
}
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--navy); color: #fff; font-size: 0.85rem; font-weight: 600;
  padding: 4px 5px 4px 11px; border-radius: 20px; white-space: nowrap;
}
.tag-x {
  border: none; background: rgba(255,255,255,.28); color: #fff;
  width: 18px; height: 18px; border-radius: 50%; cursor: pointer;
  font-size: 11px; line-height: 1; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.tag-x:hover { background: rgba(255,255,255,.5); }
