/* Portal Monev Legislator — Desain B (Korporat Biru Modern) */
:root {
  --navy: #14213D; --navy-2: #1E2E52; --blue: #1F4E99; --sky: #9EC2FF;
  --bg: #F1F4F9; --card: #FFFFFF; --ink: #14213D; --muted: #4A5468; --line: #DDE3EE; --soft: #E6ECF5;
  --good: #1E6B3A; --good-bg: #E3F0E8; --warn: #B4440E; --warn-bg: #FDE8DA; --orange: #E8833A;
  --radius: 20px; --shadow: 0 6px 20px rgba(20, 33, 61, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }

/* Header */
.topbar { background: var(--navy); color: #F4F7FB; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: 1 1 220px; }
.brand:hover { color: inherit; }
.logo { width: 58px; height: 42px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; }
.logo img { width: 48px; height: auto; display: block; }
.brand b { display: block; font-size: 17px; }
.brand small { color: var(--sky); font-size: 13px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: #C9D8F0; text-decoration: none; padding: 9px 14px; border-radius: 10px; font-size: 15px; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a[aria-current="page"] { background: var(--blue); color: #fff; font-weight: 700; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #C9D8F0; }
.who .chip { background: var(--navy-2); padding: 6px 12px; border-radius: 999px; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--sky); font: inherit; font-size: 13px; cursor: pointer; padding: 6px; text-decoration: underline; }

/* Layout */
.wrap { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
main.wrap { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.pagehead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; color: var(--blue); letter-spacing: 2px; text-transform: uppercase; }
.pagehead h1 { font-size: 34px; font-weight: 800; margin-top: 6px; }
.lead { margin: 6px 0 0; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 24px; }
.row > .main { flex: 999 1 560px; min-width: 0; align-self: flex-start; }
.row > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 20px; font-weight: 800; }
.card .sub { margin: 4px 0 16px; font-size: 14px; color: var(--muted); }
.dark { background: var(--navy); color: #F4F7FB; box-shadow: none; }
.dark .sub { color: #C9D8F0; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.tablebox table { min-width: 640px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.kpi .l { font-size: 14px; color: var(--muted); }
.kpi .v { font-size: 36px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 13px; color: var(--muted); }
.kpi.dark { background: var(--navy); }
.kpi.dark .l { color: var(--sky); }
.kpi.dark .s { color: #C9D8F0; }
.v.good { color: var(--good); } .v.warn { color: var(--warn); } .v.blue { color: var(--blue); }

/* Bars */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) 140px; gap: 12px; align-items: center; font-size: 15px; }
.bar-row a { color: var(--ink); text-decoration: none; font-weight: 600; }
.bar-row a:hover { color: var(--blue); text-decoration: underline; }
.track { height: 14px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.fill { height: 100%; border-radius: 999px; background: var(--blue); }
.fill.low { background: var(--orange); }
.bar-row .num { text-align: right; font-size: 14px; color: var(--muted); }
.bar-row .num b { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Alerts */
.alerts { display: flex; flex-direction: column; gap: 10px; }
.alert { background: var(--navy-2); border-radius: 14px; padding: 12px 16px; text-decoration: none; color: #C9D8F0; display: block; }
.alert:hover { color: #fff; background: #26386163; }
.alert b { display: block; font-size: 26px; color: #FFB37A; }
.alert b.cool { color: var(--sky); }

/* Tables */
.tablebox { position: relative; overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #EEF2F8; vertical-align: top; }
th { background: #F6F8FC; color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
tbody tr:hover { background: #F8FAFE; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-weight: 700; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* Chips */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: #9A3A0B; }
.chip.info { background: var(--soft); color: var(--blue); }
.chip.dim { background: #EEF0F4; color: var(--muted); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select { font: inherit; font-size: 15px; padding: 9px 12px; border-radius: 10px; border: 1px solid #C9D3E3; background: #fff; color: var(--ink); min-height: 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 700; padding: 10px 18px; min-height: 44px; border-radius: 10px; border: 0; background: var(--blue); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--navy); color: #fff; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #C9D3E3; }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg a { padding: 8px 12px; border-radius: 999px; border: 1px solid #C9D3E3; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink); background: #fff; }
.seg a[aria-current="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Profile */
.hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.avatar { width: 104px; height: 104px; border-radius: 26px; background: var(--blue); display: grid; place-items: center; font-size: 36px; font-weight: 800; color: #fff; flex: none; }
.hero .info { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.hero h1 { font-size: 32px; font-weight: 800; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tags span { background: var(--navy-2); padding: 5px 12px; border-radius: 999px; font-size: 13px; }
.scorebox { background: #fff; color: var(--ink); border-radius: 18px; padding: 18px 24px; text-align: center; min-width: 190px; }
.scorebox .big { font-size: 42px; font-weight: 800; }
.indlist { display: flex; flex-direction: column; gap: 8px; }
.ind { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: #F6F8FC; }
.ind .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.ind .dot.ok { background: var(--good-bg); color: var(--good); }
.ind .dot.no { background: var(--warn-bg); color: #9A3A0B; }
.ind .t { flex: 1; font-weight: 600; }
.ind .k { font-size: 13px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.meter { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; margin: 10px 0 6px; }
.meter > div { height: 100%; background: var(--blue); border-radius: 999px; }

/* Steps (PAW) */
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.step { flex: 1 1 110px; padding: 8px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; background: #EEF0F4; color: var(--muted); text-align: center; }
.step.done { background: var(--good-bg); color: var(--good); }
.step.now { background: var(--blue); color: #fff; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--navy); }
.login .card { max-width: 440px; width: 100%; text-align: center; padding: 36px; }
.loginlogo { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 18px; }
.login h1 { font-size: 24px; }
.login p { color: var(--muted); }
.notice { padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: #7A2E08; font-size: 14px; }
.notice.info { background: var(--soft); color: var(--navy); }
.foot { font-size: 13px; color: var(--muted); }
.empty { padding: 28px; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
  .pagehead h1 { font-size: 26px; }
  .bar-row { grid-template-columns: 1fr 90px; }
  .bar-row .track { grid-column: 1 / -1; order: 3; }
  .grid2 { grid-template-columns: 1fr; }
  .kpi .v { font-size: 30px; }
  .who .chip { display: none; }
}
@media print {
  .topbar, .filters, .noprint { display: none !important; }
  body { background: #fff; }
  .card, .kpi { box-shadow: none; border: 1px solid var(--line); }
}

/* ===== Halaman publik ===== */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.h2 { font-size: 26px; font-weight: 800; margin-top: 6px; }
.h3 { font-size: 20px; font-weight: 800; margin: 8px 0 14px; }
.muted { color: var(--muted); font-weight: 400; }
.pubhero { background: var(--navy); color: #F4F7FB; border-radius: 28px; padding: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.pubhero-text { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pubhero h1 { font-size: 42px; font-weight: 800; line-height: 1.12; }
.pubhero p { margin: 0; color: #C9D8F0; font-size: 17px; }
.pubsearch { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.pubsearch input { flex: 1 1 260px; border: 0; min-height: 52px; font-size: 16px; }
.pubsearch .btn { min-height: 52px; padding: 0 24px; background: var(--sky); color: var(--navy); }
.pubsearch .btn:hover { background: #fff; color: var(--navy); }
.pubhero-stats { flex: 1 1 300px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pubhero-stats div { background: var(--navy-2); border-radius: 18px; padding: 18px; }
.pubhero-stats b { display: block; font-size: 30px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pubhero-stats span { font-size: 13px; color: #C9D8F0; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pcard { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.pcard:hover { border-color: var(--sky); color: var(--ink); transform: translateY(-1px); }
.pav { width: 52px; height: 52px; border-radius: 14px; background: var(--soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; flex: none; }
.pbody { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; }
.pbody b { font-size: 16px; }
.pbody .tag { align-self: flex-start; margin-top: 6px; background: var(--soft); color: var(--blue); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wcard { background: var(--card); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; border: 1px solid transparent; }
.wcard:hover { border-color: var(--sky); color: var(--ink); }
.wcard b { font-size: 17px; }
.wcard strong { font-size: 22px; color: var(--blue); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.dl div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.dl dt { font-size: 13px; color: var(--muted); }
.dl dd { margin: 2px 0 0; font-weight: 700; }
.plist { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plist li { display: flex; flex-direction: column; font-size: 14px; }
.plist span { color: var(--muted); font-size: 13px; }
.pubfoot { background: var(--navy); color: #C9D8F0; margin-top: 24px; font-size: 14px; }
.pubfoot .wrap { display: flex; flex-wrap: wrap; gap: 16px 48px; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; }
.pubfoot b { color: #fff; }
.pubfoot .wrap > div:last-child { max-width: 520px; }
body.pub main.wrap { gap: 32px; }
@media (max-width: 720px) {
  .pubhero { padding: 24px; border-radius: 20px; }
  .pubhero h1 { font-size: 30px; }
  .dl { grid-template-columns: 1fr; }
}

/* Jurnal Aleg */
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.tagrow .tag { margin-top: 0; }
.jc { font-size: 12px; font-weight: 700; color: var(--good); background: var(--good-bg); padding: 3px 9px; border-radius: 999px; }
.jcta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.jcta span { color: #C9D8F0; font-size: 14px; }
.jbtn { background: #FFFFFF; color: var(--navy); }
.jbtn:hover { background: var(--sky); color: var(--navy); }
.jrank { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: j; }
.jrank li { display: grid; grid-template-columns: 28px minmax(0, 1.4fr) minmax(0, 2fr) 96px; align-items: center; gap: 12px; counter-increment: j; }
.jrank li::before { content: counter(j); font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.jrank a { display: flex; flex-direction: column; text-decoration: none; min-width: 0; }
.jrank a b { color: var(--ink); overflow-wrap: anywhere; }
.jrank a span { color: var(--muted); font-size: 13px; }
.jrank .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.jrank .num b { color: var(--ink); font-size: 16px; }
.jrank .fill { background: var(--good); }
@media (max-width: 640px) { .jrank li { grid-template-columns: 24px minmax(0, 1fr) auto; } .jrank .track { display: none; } }

/* Foto profil */
.pav, .avatar, .athumb, .fotoprev { overflow: hidden; }
.pav img, .avatar img, .athumb img, .fotoprev img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Admin */
.notice.good { background: var(--good-bg); color: var(--good); font-weight: 600; }
.kpi .v small { font-size: 16px; color: var(--muted); font-weight: 600; }
.admintable td { vertical-align: middle; }
.admintable .r { text-align: right; font-variant-numeric: tabular-nums; }
.acell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acell div { display: flex; flex-direction: column; min-width: 0; }
.acell a { text-decoration: none; color: var(--ink); }
.acell a:hover b { color: var(--blue); }
.acell span { color: var(--muted); font-size: 13px; }
.athumb { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--blue); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.adminform { display: flex; flex-direction: column; gap: 20px; }
.fotobox { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 16px; }
.fotoprev { width: 160px; height: 160px; border-radius: 28px; background: var(--soft); color: var(--blue); display: grid; place-items: center; font-size: 52px; font-weight: 800; flex: none; border: 1px solid var(--line); }
.fotoctl { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; flex: 1 1 240px; }
.fotoctl:focus-within label.btn { outline: 3px solid var(--sky); outline-offset: 2px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--warn); font-weight: 600; cursor: pointer; }
.howto { margin: 14px 0 0; padding-left: 20px; color: var(--muted); line-height: 1.7; font-size: 14px; }
.formgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.formgrid label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink); min-width: 0; }
.formgrid .wide { grid-column: 1 / -1; }
.formgrid input, .formgrid textarea { font: inherit; font-weight: 400; font-size: 15px; padding: 10px 12px; border: 1px solid #C9D3E3; border-radius: 10px; background: #fff; color: var(--ink); width: 100%; min-width: 0; }
.formgrid input:invalid:not(:placeholder-shown) { border-color: var(--warn); }
#f-jumlah { max-width: 220px; }
.formgrid .muted { font-weight: 400; }
.formgrid small { font-weight: 400; color: var(--muted); font-size: 12px; }
.savebar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
@media (max-width: 640px) { .fotoprev { width: 120px; height: 120px; font-size: 40px; } }

/* Akses pengguna */
.aksestable td { vertical-align: middle; }
.aksesrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.tgl { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.tgl input { width: 18px; height: 18px; accent-color: var(--blue); }
.newuser { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.newuser select { font: inherit; font-weight: 400; font-size: 15px; padding: 10px 12px; border: 1px solid #C9D3E3; border-radius: 10px; background: #fff; color: var(--ink); }
.formgrid .tgl { flex-direction: row; font-weight: 600; }

/* Peta */
.peta { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.peta figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; font-size: 15px; }
.peta-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.peta-leg span { display: inline-flex; align-items: center; gap: 6px; }
.peta-leg i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; background: var(--blue); }
.peta-leg i.warn { background: var(--orange); }
.peta-leg i.good { background: var(--good); }
.peta-leg i.dim { background: #B8C3D6; }
.peta-scroll { overflow-x: auto; border-radius: 14px; background: #EAF1FB; -webkit-overflow-scrolling: touch; }
.peta svg { display: block; width: 100%; height: auto; }
.peta .land { fill: #FFFFFF; stroke: #C9D6EA; stroke-width: 1.2; stroke-linejoin: round; }
.peta .b { stroke: #FFFFFF; stroke-width: 2; fill-opacity: .82; transition: fill-opacity .15s; }
.peta .b.blue { fill: var(--blue); }
.peta .b.warn { fill: var(--orange); }
.peta .b.good { fill: var(--good); }
.peta .b.dim { fill: #B8C3D6; fill-opacity: 1; }
.peta .b.hl { fill: var(--orange); fill-opacity: 1; stroke: var(--navy); stroke-width: 3; }
.peta a:hover .b, .peta a:focus .b { fill-opacity: 1; stroke: var(--navy); }
.peta a:focus { outline: none; }
.peta a:focus-visible .b { stroke: var(--navy); stroke-width: 4; }
.peta text { fill: #FFFFFF; font-size: 15px; font-weight: 800; text-anchor: middle; pointer-events: none; font-family: inherit; }
.peta .hl-label { fill: var(--navy); font-size: 22px; paint-order: stroke; stroke: #FFFFFF; stroke-width: 5px; }
.peta-hint { margin: 0; font-size: 12px; color: var(--muted); }
.peta.kecil .peta-scroll { background: #EAF1FB; }
@media (max-width: 720px) {
  .peta:not(.kecil) svg { width: 720px; max-width: none; }
  .peta:not(.kecil) text { font-size: 17px; }
}
@media (min-width: 721px) { .peta-hint { display: none; } }
.prose { max-width: 820px; display: flex; flex-direction: column; gap: 8px; }
.prose p { margin: 0; line-height: 1.65; color: #2A3550; }

/* Tunggakan nominal */
a.kpi-link,a.kpi-link *{text-decoration:none!important;color:inherit;display:block}
a.kpi-link .v{color:#fff}
a.kpi-link:hover,a.kpi-link:focus-visible{outline:2px solid var(--blue,#2563eb);outline-offset:2px}
table tfoot th{border-top:2px solid currentColor;font-weight:700;padding-top:10px}
.seg+.seg{margin-left:0}

/* PDF laporan */
.actions{display:flex;flex-wrap:wrap;gap:8px}
.kpi .pdfbtn{margin-top:12px;display:inline-block}
