/* =========================================================
   SIM-SPBU v2 — tema ala SAP Fiori (Horizon)
   shell bar putih, navigasi samping per fungsi, launchpad ubin
   ========================================================= */
:root {
  --bg: #f5f6f7;
  --kartu: #ffffff;
  --teks: #1d2d3e;
  --teks-2: #556b82;
  --garis: #d9d9d9;
  --garis-halus: #e5e5e5;
  --biru: #0070f2;
  --biru-tua: #0064d9;
  --biru-muda: #ebf8ff;
  --hijau: #256f3a;
  --merah: #aa0808;
  --oranye: #e76500;
  --radius: 12px;
  --bayang: 0 0 .125rem rgba(34,53,72,.2), 0 .125rem .25rem rgba(34,53,72,.2);
  --bayang-hover: 0 0 .125rem rgba(34,53,72,.2), 0 .5rem 1rem rgba(34,53,72,.15);

  --bs-body-font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Roboto, Arial, sans-serif;
  --bs-body-color: var(--teks);
  --bs-body-bg: var(--bg);
  --bs-border-color: var(--garis-halus);
  --bs-link-color: var(--biru);
  --bs-link-color-rgb: 0, 112, 242;
  --bs-link-hover-color: var(--biru-tua);
  --bs-primary: var(--biru);
  --bs-primary-rgb: 0, 112, 242;
  --bs-secondary-color: var(--teks-2);
}
body { background: var(--bg); color: var(--teks); font-size: 14px; }
h1, h2, h3, h4, h5 { font-weight: 700; color: var(--teks); }
h4 { font-size: 1.35rem; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.text-secondary, .text-muted, .form-text { color: var(--teks-2) !important; }
.text-danger { color: var(--merah) !important; }
.text-success { color: var(--hijau) !important; }
.kecil { font-size: .75rem; }
.judul-kecil { font-size: .8125rem; font-weight: 700; color: var(--teks-2); margin-bottom: .5rem; }
.posisi-rel { position: relative; }

/* ---------- Shell bar ---------- */
.shell {
  position: sticky; top: 0; z-index: 1030; height: 52px; background: #fff;
  display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
  box-shadow: 0 0 .125rem rgba(34,53,72,.2), 0 .125rem .25rem rgba(34,53,72,.12);
}
.shell-merek { display: flex; align-items: center; gap: .55rem; color: var(--teks); font-weight: 700; font-size: 1rem; }
.shell-merek:hover { text-decoration: none; }
.logo-kotak { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #0070f2, #0040b0); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.shell-spbu { font-size: .8125rem; color: var(--teks-2); padding-left: .75rem; border-left: 1px solid var(--garis); }
.shell-cari { position: relative; flex: 1; max-width: 560px; margin: 0 auto; display: flex; align-items: center; gap: .5rem;
  background: #eff1f2; border-radius: 18px; padding: 0 .9rem; height: 36px; color: var(--teks-2); border: 1px solid transparent; }
.shell-cari:focus-within { background: #fff; border-color: var(--biru); box-shadow: 0 0 0 3px rgba(0,112,242,.15); }
.shell-cari input { border: 0; background: transparent; outline: none; flex: 1; font-size: .875rem; color: var(--teks); min-width: 0; }
.shell-cari kbd { background: #fff; color: var(--teks-2); border: 1px solid var(--garis); font-size: .7rem; padding: 0 .35rem; }
.shell-kanan { display: flex; align-items: center; gap: .35rem; }
.shell-btn { border: 0; background: transparent; width: 36px; height: 36px; border-radius: 8px; color: var(--teks-2);
  display: inline-flex; align-items: center; justify-content: center; }
.shell-btn:hover { background: #eaecee; color: var(--teks); }
.lencana { position: absolute; top: 2px; right: 1px; background: var(--merah); color: #fff; border-radius: 9px; font-size: .65rem;
  min-width: 16px; height: 16px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.avatar-btn { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #d1efff; color: #0040b0; font-weight: 700; }
.notif-menu { min-width: 300px; } .akun-menu { min-width: 250px; }
.dropdown-menu { border: 0; border-radius: 12px; padding: .35rem; box-shadow: var(--bayang-hover); font-size: .875rem; }
.dropdown-item { border-radius: 8px; padding: .45rem .75rem; display: flex; align-items: center; gap: .5rem; }
.dropdown-item:hover { background: #eaecee; text-decoration: none; }

/* ---------- Tata letak & navigasi samping ---------- */
.tata-letak { display: flex; min-height: calc(100vh - 52px); }
.sidenav { width: 248px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--garis-halus); }
@media (min-width: 992px) {
  .sidenav { position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
}
.sidenav-isi { padding: .75rem .5rem 2rem; }
.sn-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border-radius: 8px; color: var(--teks);
  font-size: .875rem; margin-bottom: 1px; }
.sn-item:hover { background: #eaecee; text-decoration: none; color: var(--teks); }
.sn-item.aktif { background: var(--biru-muda); color: var(--biru-tua); font-weight: 600; box-shadow: inset 3px 0 0 var(--biru); }
.sn-sub { padding-left: 2.6rem; }
.sn-grup summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; margin-top: .35rem;
  font-weight: 700; font-size: .8125rem; color: var(--teks-2); cursor: pointer; border-radius: 8px; }
.sn-grup summary::-webkit-details-marker { display: none; }
.sn-grup summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.sn-grup[open] summary::after { transform: rotate(45deg); }
.sn-grup summary:hover { background: #f2f3f4; }
.konten { flex: 1; min-width: 0; padding: 1.25rem 1.5rem 2rem; }
@media (max-width: 575.98px) { .konten { padding: 1rem; } }
.remah { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .8125rem; color: var(--teks-2); margin-bottom: .75rem; }
.remah svg { opacity: .6; }

/* ---------- Launchpad ---------- */
.lp-judul { font-size: 1.5rem; font-weight: 700; margin-bottom: .15rem; }
.lp-tab { display: flex; gap: .25rem; border-bottom: 1px solid var(--garis); margin: 1rem 0 1.25rem; overflow-x: auto; }
.lp-tab a { padding: .6rem 1rem; color: var(--teks-2); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; font-size: .875rem; }
.lp-tab a:hover { color: var(--teks); text-decoration: none; }
.lp-tab a.aktif { color: var(--biru); border-bottom-color: var(--biru); }
.lp-seksi { margin-bottom: 2rem; scroll-margin-top: 70px; }
.lp-seksi h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: .85rem; display: flex; align-items: center; gap: .5rem; }
.ubin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 1rem; }
.ubin { background: #fff; border-radius: 16px; box-shadow: var(--bayang); padding: 1rem; min-height: 176px; display: flex; flex-direction: column;
  color: var(--teks); transition: box-shadow .15s, transform .15s; }
.ubin:hover { box-shadow: var(--bayang-hover); text-decoration: none; color: var(--teks); transform: translateY(-1px); }
.ubin-judul { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.ubin-ket { font-size: .75rem; color: var(--teks-2); margin-top: .25rem; }
.ubin-bawah { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.ubin-ikon { color: var(--biru); }
.ubin-kpi { font-size: 1.6rem; font-weight: 300; color: var(--teks); line-height: 1; text-align: right; }
.ubin-kpi small { display: block; font-size: .7rem; color: var(--teks-2); font-weight: 400; margin-top: .2rem; }
.ubin-kpi.negatif { color: var(--merah); } .ubin-kpi.positif { color: var(--hijau); } .ubin-kpi.kritis { color: var(--oranye); }

/* ---------- Kartu, tabel, form ---------- */
.card { border: 0; border-radius: var(--radius); background: var(--kartu); box-shadow: var(--bayang); overflow: hidden; }
.card-header { background: #fff; border-bottom: 1px solid var(--garis-halus); font-weight: 700; font-size: .95rem; padding: .85rem 1.1rem; }
.card-body { padding: 1.1rem; }
.stat .nilai { font-size: 1.5rem; font-weight: 300; }
.stat .label { color: var(--teks-2); font-size: .8125rem; }
.table { --bs-table-bg: transparent; margin-bottom: 0; font-size: .8125rem; }
.table > :not(caption) > * > * { padding: .55rem .75rem; border-bottom-color: var(--garis-halus); }
.table thead th { background: #fff; color: var(--teks-2); font-weight: 700; white-space: nowrap; border-bottom: 1px solid var(--garis); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #eaecee; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--garis); background: #fafbfb; }
.table-warning > * { --bs-table-bg: #fff8d6 !important; }
.table-danger > * { --bs-table-bg: #ffeaf4 !important; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.form-control, .form-select { border-radius: 8px; border-color: #bcc3ca; padding: .45rem .7rem; font-size: .875rem; }
.form-control:focus, .form-select:focus { border-color: var(--biru); box-shadow: 0 0 0 3px rgba(0,112,242,.15); }
.form-control-sm, .form-select-sm { padding: .3rem .55rem; font-size: .8125rem; }
.form-label { color: var(--teks-2); }
.btn { border-radius: 8px; font-weight: 600; padding: .45rem 1rem; font-size: .875rem; }
.btn-sm { padding: .25rem .65rem; font-size: .8rem; }
.btn-lg { padding: .65rem 1.25rem; }
.btn-primary { background: var(--biru); border-color: var(--biru); }
.btn-primary:hover, .btn-primary:focus { background: var(--biru-tua); border-color: var(--biru-tua); }
.btn-dark { background: #1d2d3e; border-color: #1d2d3e; }
.btn-success { background: var(--hijau); border-color: var(--hijau); }
.btn-outline-primary { color: var(--biru); border-color: var(--biru); }
.btn-outline-primary:hover { background: var(--biru); border-color: var(--biru); }
.btn-outline-secondary { color: var(--biru); border-color: #bcc3ca; background: #fff; }
.btn-outline-secondary:hover, .btn-outline-secondary.active { background: #eaecee; color: var(--biru-tua); border-color: #bcc3ca; }
.btn-outline-success { color: var(--hijau); border-color: var(--hijau); }
.btn-outline-success:hover { background: var(--hijau); border-color: var(--hijau); }
.btn-outline-warning { color: var(--oranye); border-color: var(--oranye); background: #fff; }
.btn-outline-warning:hover { background: var(--oranye); border-color: var(--oranye); color: #fff; }
.btn-outline-danger { color: var(--merah); border-color: var(--merah); }
.btn-outline-danger:hover { background: var(--merah); border-color: var(--merah); }
.btn-group > .btn { margin-right: .35rem; border-radius: 8px !important; }

/* ---------- Status (ala Fiori object status) ---------- */
.badge { border-radius: 6px; font-weight: 600; padding: .3em .6em; }
.badge-buka, .bg-success { background: #f5fae5 !important; color: var(--hijau) !important; border: 1px solid #b8d9a2; }
.badge-tutup, .bg-secondary { background: #f5f6f7 !important; color: var(--teks-2) !important; border: 1px solid var(--garis); }
.bg-warning { background: #fff8d6 !important; color: #a93e00 !important; border: 1px solid #ffc933; }
.bg-danger { background: #ffeaf4 !important; color: var(--merah) !important; border: 1px solid #ff8ab9; }
.alert { border: 0; border-radius: 10px; border-left: 4px solid; }
.alert-info { background: #e1f4ff; color: #0040b0; border-left-color: var(--biru); }
.alert-warning { background: #fff8d6; color: #a93e00; border-left-color: var(--oranye); }
.alert-danger { background: #ffeaf4; color: var(--merah); border-left-color: var(--merah); }
.alert-success { background: #f5fae5; color: var(--hijau); border-left-color: #30914c; }
.progress { height: .5rem; border-radius: 4px; background: #e5e5e5; }
.progress-bar.bg-success { background: #30914c !important; border: 0; }
.progress-bar.bg-warning { background: #e76500 !important; border: 0; }
.progress-bar.bg-danger { background: #d20a0a !important; border: 0; }

/* ---------- Ringkasan label = nilai ---------- */
.ringkas { border-radius: var(--radius); background: var(--kartu); box-shadow: var(--bayang); overflow: hidden; }
.ringkas .baris { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--garis-halus); font-size: .875rem; }
.ringkas .baris:last-child { border-bottom: 0; }
.ringkas .baris .nilai { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ringkas .baris.utama { background: #f5f6f7; font-weight: 700; }
.ringkas .baris.utama .nilai { font-size: 1.1rem; }
.ringkas .baris .sub { display: block; font-size: .75rem; color: var(--teks-2); font-weight: 400; }

/* ---------- Kaki halaman ---------- */
.kaki { margin-top: 2.5rem; }
.info-login { text-align: right; color: var(--teks-2); font-size: .75rem; font-weight: 600; margin-bottom: 1rem; }
.user-online { border-top: 1px solid var(--garis); padding-top: .85rem; }
.avatar { position: relative; width: 32px; height: 32px; border-radius: 50%; background: #d1efff; color: #0040b0;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.avatar i { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #30914c; border: 2px solid var(--bg); }
.hak-cipta { color: var(--teks-2); font-size: .75rem; margin-top: 1.25rem; padding-top: .75rem; border-top: 1px solid var(--garis-halus); }

/* ---------- Pencarian ---------- */
.hasil-grup { margin-bottom: 1.25rem; }
.hasil-app { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.hasil-app a { background: #fff; border-radius: 12px; box-shadow: var(--bayang); padding: .75rem .9rem; display: flex; gap: .7rem; align-items: center; color: var(--teks); }
.hasil-app a:hover { box-shadow: var(--bayang-hover); text-decoration: none; }
mark { background: #fff3b8; padding: 0 .1em; border-radius: 3px; }

/* ---------- Grafik batang ---------- */
.grafik-wrap { overflow-x: auto; }
.grafik { width: 100%; min-width: 520px; height: auto; display: block; max-height: 280px; }
.grafik .sumbu { stroke: var(--garis); stroke-width: 1; }
.grafik .isi { fill: #89d1ff; }
.grafik .isi.hari-ini { fill: var(--biru); }
.grafik .hit { fill: transparent; }
.grafik .batang:hover .isi { fill: var(--biru); }
.grafik .label { font-size: 9px; fill: var(--teks-2); }

.form-grid input { min-width: 110px; }

/* Tabel isi meter: di HP setiap selang jadi kartu kecil */
@media (max-width: 767.98px) {
  .tabel-hp thead { display: none; }
  .tabel-hp tr { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--garis-halus); }
  .tabel-hp td { display: block; border: 0 !important; padding: 0 !important; }
  .tabel-hp td.judul-hp { grid-column: 1 / -1; font-size: 1.05rem; }
  .tabel-hp td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--teks-2); }
  .tabel-hp td.num { text-align: left; }
  .tabel-hp input.akhir { border-color: var(--biru); }
  .info-login { text-align: left; }
  .stat .nilai { font-size: 1.15rem; white-space: nowrap; }
  .ubin-grid { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .ubin { min-height: 140px; padding: .8rem; }
}

@media print {
  .shell, .sidenav, .no-print, .btn, .kaki, .remah { display: none !important; }
  body { background: #fff; }
  .konten { padding: 0; }
  .card, .ringkas { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------- Pencarian global ---------- */
.cari-besar { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: 12px; box-shadow: var(--bayang); padding: .4rem .5rem .4rem 1rem; max-width: 720px; color: var(--teks-2); }
.cari-besar input { flex: 1; border: 0; outline: 0; font-size: 1rem; background: transparent; color: var(--teks); min-width: 0; }
.daftar-hasil { background: #fff; border-radius: 12px; box-shadow: var(--bayang); overflow: hidden; }
.daftar-hasil > a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; color: var(--teks); border-bottom: 1px solid #e5e8eb; }
.daftar-hasil > a:last-child { border-bottom: 0; }
.daftar-hasil > a:hover { background: #eaf3ff; text-decoration: none; }
.daftar-hasil > a svg { color: var(--teks-2); flex-shrink: 0; }
mark { background: #fff3b8; color: inherit; padding: 0 .1em; border-radius: 3px; }
.saran-cari { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(29,45,62,.18); max-height: 70vh; overflow: auto; z-index: 1060; display: none; }
.saran-cari.tampil { display: block; }
.saran-cari .sc-grup { font-size: .72rem; font-weight: 700; color: var(--teks-2); padding: .6rem 1rem .2rem; text-transform: uppercase; letter-spacing: .03em; }
.saran-cari a { display: block; padding: .45rem 1rem; color: var(--teks); }
.saran-cari a small { display: block; color: var(--teks-2); }
.saran-cari a:hover, .saran-cari a.pilih { background: #eaf3ff; text-decoration: none; }
.saran-cari .sc-semua { border-top: 1px solid #e5e8eb; font-weight: 600; color: var(--biru); }
.judul-hal { margin-bottom: 1rem; }
.shell-cari { min-width: 0; }
.shell > :not(.shell-cari) { flex-shrink: 0; }
@media (max-width: 575.98px) { .shell { gap: .5rem; padding: 0 .6rem; } .shell-cari { padding: 0 .7rem; } .saran-cari { position: fixed; top: 56px; left: 8px; right: 8px; } }
