/* PEMENANGAN — gaya D (Tabler) dengan warna resmi GELORA */
:root, [data-bs-theme=light] {
  --tblr-primary: #0b5394;
  --tblr-primary-rgb: 11, 83, 148;
  --tblr-primary-fg: #ffffff;
  --tblr-primary-darken: #08406f;
  --tblr-link-color: #0b5394;
  --tblr-link-color-rgb: 11, 83, 148;
  --tblr-link-hover-color: #08406f;
  --pmn-langit: #29c1f4;
  --pmn-merah: #ec1c24;
}
.btn-primary { --tblr-btn-bg: #0b5394; --tblr-btn-border-color: #0b5394; --tblr-btn-hover-bg: #08406f; --tblr-btn-hover-border-color: #08406f; --tblr-btn-active-bg: #08406f; }
.bg-gelora { background: #0b5394 !important; }
.bg-langit { background: #29a3d6 !important; }
.text-gelora { color: #0b5394 !important; }

/* ---------- menu sisi bergradasi ---------- */
.navbar-vertical.sisi-premium {
  background:
    radial-gradient(140% 45% at 0% 0%, rgba(41,193,244,.34) 0%, rgba(41,193,244,0) 60%),
    radial-gradient(90% 35% at 100% 100%, rgba(236,28,36,.14) 0%, rgba(236,28,36,0) 70%),
    linear-gradient(180deg, #11427A 0%, #0B2E57 48%, #061A34 100%);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.08);
  --tblr-navbar-color: #c9d6e8;
  --tblr-navbar-active-color: #ffffff;
  --tblr-navbar-hover-color: #ffffff;
}
@media (min-width: 992px) {
  .navbar-vertical.sisi-premium { min-height: 100vh; }
}
.sisi-premium .navbar-brand { padding: .75rem 0; }
.merek { display: flex; align-items: center; gap: .7rem; color: #fff !important; text-decoration: none; }
/* identitas DPW GELORA RIAU · PEMENANGAN 2029 APP (perbaikan 17) */
.merek-ubin { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.05) 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 6px 18px rgba(0,0,0,.25); }
.merek-ubin img { height: 44px; width: auto; display: block; }
.merek-teks { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.merek-judul { font-weight: 800; font-size: .9375rem; letter-spacing: .08em; color: #fff; white-space: nowrap; }
.merek-sub { font-weight: 600; font-size: .6875rem; letter-spacing: .1em; color: #f0883e; margin-top: .3rem; white-space: nowrap; }
.sisi-premium .merek-wadah { display: block; width: 100%; padding-bottom: .9rem; margin-bottom: .25rem; border-bottom: 1px solid rgba(255,255,255,.14); }
@media (max-width: 991.98px) {
  .sisi-premium .merek-wadah { width: auto; border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
  .merek-ubin { width: 40px; height: 40px; border-radius: 10px; } .merek-ubin img { height: 33px; }
  .merek-judul { font-size: .875rem; letter-spacing: .1em; } .merek-sub { font-size: .625rem; letter-spacing: .12em; margin-top: .15rem; }
}
/* halaman masuk */
.merek-besar { display: inline-flex; flex-direction: column; align-items: center; gap: .9rem; }
.merek-besar img { height: 150px; width: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.35)); }
.merek-besar .merek-judul { font-size: 1.5rem; letter-spacing: .18em; }
.merek-besar .merek-sub { font-size: .9375rem; letter-spacing: .2em; margin-top: 0; }
.judul-grup { display: block; font-size: .6875rem; font-weight: 600; letter-spacing: .08em; color: #9fb4cf; padding: 1rem .75rem .35rem; }
.sisi-premium .nav-item.active > .nav-link,
.sisi-premium .nav-link[aria-current=page] {
  background: linear-gradient(90deg, rgba(41,193,244,.38) 0%, rgba(41,193,244,.10) 100%);
  box-shadow: inset 2px 0 0 #29c1f4, inset 0 1px 0 rgba(255,255,255,.12);
  border-radius: 6px; color: #fff; font-weight: 600;
}
.sisi-premium .nav-link { border-radius: 6px; min-height: 40px; }
.sisi-premium .nav-link:hover { background: rgba(255,255,255,.06); }
.avatar-inisial { background-color: #dbe8f5; color: #0b5394; font-weight: 600; }
.avatar[style*="background-image"] { background-size: cover; background-position: center; }

.bilah-atas { background: #fff; border-bottom: 1px solid var(--tblr-border-color); }

/* ---------- menu bawah HP ---------- */
@media (max-width: 991.98px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .page-header { margin-top: .75rem; }
}
.menu-bawah {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--tblr-border-color);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center;
}
.menu-bawah a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #667382; text-decoration: none; font-size: 11px; font-weight: 500; min-height: 48px; justify-content: center; }
.menu-bawah a.aktif { color: #0b5394; font-weight: 600; }
.menu-bawah .tombol-lapor { color: #c0141b; font-weight: 600; }
.kotak-lapor { width: 42px; height: 32px; border-radius: 8px; background: #ec1c24; color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(236,28,36,.3); }

/* ---------- komponen ---------- */
.angka-besar { font-size: 1.125rem; font-weight: 700; }
.angka-raksasa { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.tumpuk { display: flex; height: 14px; border-radius: 4px; overflow: hidden; background: var(--tblr-bg-surface-secondary, #eef1f5); position: relative; }
.tumpuk > span { display: block; height: 100%; border-right: 2px solid #fff; }
.tumpuk-wadah { position: relative; padding-top: 1.25rem; }
.garis-ambang { position: absolute; top: 0; bottom: -4px; border-left: 2px dashed #ec1c24; }
.garis-ambang > b { position: absolute; top: 0; right: 4px; white-space: nowrap; font-size: .75rem; color: #b4121a; transform: translateX(0); }
.titik { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.tabel-gulir { overflow-x: auto; }
.table th a { color: inherit; }
.stepper { display: inline-flex; border: 1px solid var(--tblr-border-color); border-radius: 6px; overflow: hidden; }
.stepper button { width: 44px; height: 44px; border: 0; background: #f6f8fb; font-size: 1.25rem; color: #49566c; }
.stepper button + input, .stepper input + button { border-left: 1px solid var(--tblr-border-color); }
.stepper input { width: 72px; border: 0; text-align: center; font-weight: 600; font-size: 1rem; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pilih-kegiatan .form-selectgroup-label { min-height: 40px; display: flex; align-items: center; }
.btn, .form-control, .form-select { min-height: 40px; }
@media (max-width: 575.98px) {
  .btn, .form-control, .form-select { min-height: 44px; }
  .page-title { font-size: 1.125rem; }
}
.radar-label { font-size: 11px; fill: #49566c; }
.label-estimasi { font-size: .6875rem; font-weight: 600; letter-spacing: .03em; }
@media print { .menu-bawah, .navbar-vertical, .bilah-atas { display: none !important; } }

/* ---------- tabel rapat: satu baris data = satu baris tulisan (perbaikan 11) ---------- */
.table > :not(caption) > * > * { padding: .4rem .6rem; vertical-align: middle; }
.table.card-table > :not(caption) > * > *:first-child { padding-left: 1rem; }
.table.card-table > :not(caption) > * > *:last-child { padding-right: 1rem; }
.table thead th { white-space: nowrap; font-size: .6875rem; letter-spacing: .04em; padding-top: .55rem; padding-bottom: .55rem; }
.table td { line-height: 1.35; }
.table .form-control-sm, .table .form-select-sm { min-height: 28px; height: 28px; padding-top: 0; padding-bottom: 0; line-height: 1.2; }
.table .btn-sm { min-height: 26px; height: 26px; padding: 0 .45rem; line-height: 1; font-size: .75rem; }
.table .btn-icon.btn-sm { width: 26px; padding: 0; }
.table .btn-icon.btn-sm .icon { width: 16px; height: 16px; }
.table td form.d-inline { margin: 0; }
.sel-singkat { white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.badge.label-estimasi { font-size: .625rem; padding: .1rem .3rem; vertical-align: middle; }
.table .badge { font-size: .6875rem; padding: .15rem .45rem; }

/* ---------- nomor urut (perbaikan 2): dihitung di server, lanjut dari offset halaman ---------- */
.table th.kol-no, .table td.kol-no { width: 1%; white-space: nowrap; text-align: right; color: #667382; font-variant-numeric: tabular-nums; }

/* ---------- baris jumlah (perbaikan 6) ---------- */
.table tfoot tr.baris-jumlah > * { font-weight: 700; background: #f1f5fa; border-top: 2px solid #c9d6e8; white-space: nowrap; }
.table tfoot tr.baris-jumlah .ket-jumlah { font-weight: 400; color: #667382; font-size: .75rem; }

/* ---------- tab aktif biru GELORA (perbaikan 5) ---------- */
.nav-tabs { border-bottom: 2px solid #0b5394; gap: 2px; }
.nav-tabs .nav-link { color: #49566c; background: #eef1f5; border: 1px solid transparent; border-radius: 6px 6px 0 0; margin-bottom: 0; font-weight: 500; }
.nav-tabs .nav-link:hover { color: #0b5394; background: #dbe8f5; border-color: transparent; }
.nav-tabs .nav-link.active, .nav-tabs .nav-link.active:hover { color: #fff; background: #0b5394; border-color: #0b5394; font-weight: 600; }
.sakelar-mode .btn.active { background: #0b5394; color: #fff; border-color: #0b5394; }

/* ---------- peta ---------- */
.peta-svg { width: 100%; height: auto; display: block; background: #f6f8fb; border-radius: 6px; }
.peta-svg path { stroke: #fff; stroke-width: .8; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.peta-svg .batas-kab { fill: none; stroke: #182433; stroke-width: 1.4; pointer-events: none; }
.peta-svg a:hover path, .peta-svg a:focus path { fill: #8b7fd4 !important; }
.peta-svg .redup { fill: #e3e8ef !important; }
.peta-svg .tanpa-data { fill: url(#arsir) !important; }
.peta-svg .label { font-size: 13px; font-weight: 600; fill: #182433; paint-order: stroke; stroke: #fff; stroke-width: 3px; pointer-events: none; }
.legenda { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .8125rem; }
.legenda .kotak { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
@media (max-width: 575.98px) { .peta-svg .label { display: none; } }

.table thead th.kol-instrumen { white-space: normal; max-width: 84px; line-height: 1.2; }

/* daftar nama caleg sebagai lencana, tidak ada yang tersembunyi (perbaikan 19) */
.lencana-caleg { display: inline-flex; gap: .25rem; flex-wrap: nowrap; align-items: center; }
.lencana-caleg .badge { font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
@media (max-width: 1199.98px) {
  .table > :not(caption) > * > * { padding-left: .4rem; padding-right: .4rem; }
  .table thead th { letter-spacing: .02em; }
}
@media (max-width: 1199.98px) { .lencana-caleg .badge { max-width: 84px; } }
