/* =========================================================
   SIM-SPBU — gaya bersih ala situs Apple
   (putih & abu muda, teks gelap, aksen biru, sudut membulat)
   ========================================================= */
:root {
  --bg: #f5f5f7;
  --kartu: #ffffff;
  --teks: #1d1d1f;
  --teks-2: #6e6e73;
  --garis: #d2d2d7;
  --garis-halus: #e8e8ed;
  --biru: #0071e3;
  --biru-tua: #0066cc;
  --hijau: #248a3d;
  --merah: #d70015;
  --oranye: #b25000;
  --radius: 18px;

  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", 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-tua);
  --bs-link-color-rgb: 0, 102, 204;
  --bs-link-hover-color: var(--biru-tua);
  --bs-primary: var(--biru);
  --bs-primary-rgb: 0, 113, 227;
  --bs-secondary-color: var(--teks-2);
  --bs-success-rgb: 36, 138, 61;
  --bs-danger-rgb: 215, 0, 21;
}
body { background: var(--bg); color: var(--teks); font-size: 15px; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: -.02em; color: var(--teks); }
h4 { font-size: 1.6rem; }
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: .8rem; font-weight: 600; color: var(--teks-2); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem; }

/* ---------- Menu atas: kaca buram ---------- */
.nav-kaca {
  background: rgba(214, 214, 219, .95);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  padding-top: .2rem; padding-bottom: .2rem;
}
.nav-kaca .merek { font-weight: 700; font-size: 1.05rem; color: var(--teks); letter-spacing: -.02em; }
.nav-kaca .nav-link { font-size: .8rem; color: #1d1d1f; padding: .55rem .6rem !important; }
.nav-kaca .nav-link:hover { color: var(--biru); text-decoration: none; }
.nav-kaca .dropdown-toggle::after { border-top-width: .28em; vertical-align: .15em; opacity: .5; }
.akun-pill { background: rgba(255, 255, 255, .75); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); border-radius: 980px; padding: .3rem .8rem !important; }
.dropdown-menu { border: 0; border-radius: 14px; padding: .4rem; box-shadow: 0 10px 40px rgba(0, 0, 0, .12); font-size: .88rem; }
.dropdown-item { border-radius: 8px; padding: .45rem .75rem; }
.dropdown-item:hover { background: var(--bg); text-decoration: none; }

/* ---------- Kartu & panel ---------- */
.card { border: 0; border-radius: var(--radius); background: var(--kartu); box-shadow: 0 2px 12px rgba(0, 0, 0, .04); overflow: hidden; }
.card-header { background: var(--kartu); border-bottom: 1px solid var(--garis-halus); font-weight: 600; font-size: 1rem; padding: 1rem 1.25rem; }
.card-body { padding: 1.25rem; }
.card > .table-responsive, .card > table { margin: 0; }
.stat .nilai { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; }
.stat .label { color: var(--teks-2); font-size: .8rem; }

/* ---------- Tabel ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; font-size: .88rem; }
.table > :not(caption) > * > * { padding: .6rem .75rem; border-bottom-color: var(--garis-halus); }
.table thead th { background: #fbfbfd; color: var(--teks-2); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; border-bottom: 1px solid var(--garis-halus); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f5f5f7; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--garis); }
.table-warning > * { --bs-table-bg: #fff8e6 !important; }
.table-danger > * { --bs-table-bg: #fff0f1 !important; }
.table td.num, .table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Form & tombol ---------- */
.form-control, .form-select { border-radius: 12px; border-color: var(--garis); padding: .55rem .8rem; font-size: .92rem; }
.form-control-sm, .form-select-sm { border-radius: 10px; padding: .35rem .6rem; }
.form-control:focus, .form-select:focus { border-color: var(--biru); box-shadow: 0 0 0 4px rgba(0, 113, 227, .15); }
.form-label { color: var(--teks-2); }
.btn { border-radius: 980px; font-weight: 500; padding: .5rem 1.15rem; font-size: .9rem; }
.btn-sm { padding: .3rem .8rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.5rem; }
.btn-primary { background: var(--biru); border-color: var(--biru); }
.btn-primary:hover, .btn-primary:focus { background: #0077ed; border-color: #0077ed; }
.btn-dark { background: var(--teks); border-color: var(--teks); }
.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(--teks); border-color: var(--garis); background: #fff; }
.btn-outline-secondary:hover, .btn-outline-secondary.active { background: #e8e8ed; color: var(--teks); border-color: var(--garis); }
.btn-outline-success { color: var(--hijau); border-color: var(--hijau); }
.btn-outline-success:hover { background: var(--hijau); border-color: var(--hijau); }
.btn-link { border-radius: 0; }
.btn-group > .btn { border-radius: 980px !important; margin-right: .35rem; }

/* ---------- Badge & alert ---------- */
.badge { border-radius: 980px; font-weight: 500; padding: .35em .75em; }
.badge-buka { background: #e3f3e7; color: var(--hijau); }
.badge-tutup { background: #e8e8ed; color: var(--teks-2); }
.bg-success { background-color: #e3f3e7 !important; color: var(--hijau) !important; }
.bg-warning { background-color: #fff4dc !important; color: var(--oranye) !important; }
.bg-danger { background-color: #ffe5e7 !important; color: var(--merah) !important; }
.bg-secondary { background-color: #e8e8ed !important; color: var(--teks-2) !important; }
.alert { border: 0; border-radius: 14px; }
.alert-info { background: #e8f2fd; color: #0a3d7a; }
.alert-warning { background: #fff4dc; color: #6b4000; }
.alert-danger { background: #ffe5e7; color: #7a000c; }
.alert-success { background: #e3f3e7; color: #135c26; }
.progress { height: .5rem; border-radius: 980px; background: #e8e8ed; }
.progress-bar.bg-success { background: #34c759 !important; }
.progress-bar.bg-warning { background: #ff9f0a !important; }
.progress-bar.bg-danger { background: #ff3b30 !important; }

/* ---------- Ringkasan gaya E-MAGIC (baris label = nilai) ---------- */
.ringkas { border-radius: var(--radius); background: var(--kartu); box-shadow: 0 2px 12px rgba(0, 0, 0, .04); overflow: hidden; }
.ringkas .baris { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--garis-halus); font-size: .92rem; }
.ringkas .baris:last-child { border-bottom: 0; }
.ringkas .baris .nilai { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ringkas .baris.utama { background: #fbfbfd; font-weight: 600; }
.ringkas .baris.utama .nilai { font-size: 1.15rem; }
.ringkas .baris .sub { display: block; font-size: .75rem; color: var(--teks-2); font-weight: 400; }

/* ---------- Footer: info login & user online ---------- */
.info-login { text-align: right; color: var(--teks-2); font-size: .8rem; font-weight: 600; margin: 1rem 0 1.5rem; }
.user-online { border-top: 1px solid var(--garis); padding-top: 1rem; }
.avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(180deg, #8e8e93, #636366); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.avatar i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #34c759; border: 2px solid var(--bg); }
.hak-cipta { color: #86868b; font-size: .75rem; margin-top: 1.5rem; padding-top: .75rem; border-top: 1px solid var(--garis-halus); }

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

/* Tabel isi meter: di HP setiap selang jadi kartu kecil */
@media (max-width: 767.98px) {
  body { font-size: 14px; }
  h4 { font-size: 1.35rem; }
  .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; }
}

@media print {
  .navbar, .no-print, .btn, footer { display: none !important; }
  body { background: #fff; }
  .card, .ringkas { box-shadow: none; border: 1px solid #ccc; }
}
.btn-outline-warning { color: var(--oranye); border-color: #ff9f0a; background: #fff; }
.btn-outline-warning:hover { background: #ff9f0a; border-color: #ff9f0a; color: #fff; }
.btn-outline-danger { color: var(--merah); border-color: var(--merah); }
.btn-outline-danger:hover { background: var(--merah); border-color: var(--merah); }
@media (max-width: 575.98px) {
  .stat .nilai { font-size: 1.15rem; white-space: nowrap; }
  .card-body { padding: 1rem; }
}
