/* Gaya kaca ala iPhone untuk menu Percakapan, dan hero yang bisa dilipat */
.view.chats {
  background:
    radial-gradient(circle at 12% 18%, #DCD3FF 0, transparent 42%),
    radial-gradient(circle at 88% 28%, #BFE6FF 0, transparent 40%),
    radial-gradient(circle at 46% 100%, #FFDDEA 0, transparent 42%),
    linear-gradient(160deg, #EEF1FB, #F6F1FF);
}
.view.chats .side,
.view.chats .chat,
.view.chats .info {
  background: rgba(255, 255, 255, .42) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
}
.view.chats .side { border-right: 1px solid rgba(255, 255, 255, .6); }
.view.chats .info { border-left: 1px solid rgba(255, 255, 255, .6); }
.view.chats #messages { background: transparent; }
.view.chats .composer-wrap {
  background: rgba(255, 255, 255, .35) !important;
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, .6);
}
.view.chats .composer input[type="text"] {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 22px;
  box-shadow: inset 0 1px 2px rgba(20, 30, 70, .05);
  padding-left: 16px;
}
/* gelembung chat: sederhana, mengikuti warna tema. Admin = gradasi brand, pelanggan = putih dengan garis tipis */
.view.chats .msg.customer .bubble {
  background: #FFFFFF;
  border: 1px solid var(--line, #DDE1F0);
  box-shadow: 0 1px 3px rgba(15, 34, 51, .08);
  color: var(--ink, #1B1F3B);
  border-radius: 18px 18px 18px 6px;
}
.view.chats .msg.admin .bubble {
  background: var(--pu-grad, #5B6CF0);
  border: 0;
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 116, 144, .25);
  border-radius: 18px 18px 6px 18px;
}
html[data-theme="dark"] .view.chats .msg.customer .bubble { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #EEF0FF; box-shadow: none; }
.view.chats .bubble::before { display: none; }
.view.chats .msg-sys { background: rgba(255, 255, 255, .55) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.view.chats .item { border-radius: 16px; margin: 3px 8px; transition: background .2s ease, transform .2s ease, box-shadow .2s ease; }
.view.chats .item:hover { background: rgba(255, 255, 255, .55); transform: translateX(2px); }
.view.chats .item.active { background: rgba(255, 255, 255, .88); box-shadow: 0 8px 20px rgba(40, 50, 110, .10); }

/* hero bisa dilipat: hanya satu baris ringkas */
.chat-hero { background: rgba(255, 255, 255, .42) !important; -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); border: 1px solid rgba(255, 255, 255, .7) !important; box-shadow: 0 10px 28px rgba(40, 50, 110, .10) !important; }
.chat-hero .ch-top { display: flex; align-items: center; gap: 12px; }
.chat-hero .ch-sum { flex: 1; min-width: 0; font-size: 12.5px; color: #4B5577; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.chat-hero .ch-toggle { flex: none; border: 1px solid rgba(8, 145, 178, .35); background: rgba(255, 255, 255, .85); border-radius: 99px; padding: 5px 12px; font-size: 12px; font-weight: 700; color: #0A4F63; cursor: pointer; transition: background .2s, transform .2s; }
.chat-hero .ch-toggle:hover { background: #fff; transform: translateY(-1px); }
.chat-hero .ch-toggle .chev { display: inline-block; transition: transform .3s ease; }
.chat-hero:not(.collapsed) .ch-toggle .chev { transform: rotate(180deg); }
.chat-hero.collapsed { padding: 8px 12px; gap: 0; }
.chat-hero.collapsed .ch-body { display: none; }
.chat-hero:not(.collapsed) .ch-sum { display: none; }
.chat-hero .ch-t h2 { font-size: 16px; }
.chat-hero .ch-date { display: none; }

/* Hero dibuat ringkas tapi tetap terbuka */
.chat-hero { padding: 8px 10px; gap: 6px; margin: 6px 10px 0; }
.chat-hero .ch-top { min-height: 0; }
.chat-hero .ch-t h2 { font-size: 15px; margin: 0; }
.chat-hero .ch-body { gap: 8px; }
.ch-kpis { gap: 6px; }
.ch-kt { padding: 7px 10px; border-radius: 13px; }
.kt-l { font-size: 10.5px; }
.kt-v { font-size: 18px; margin-top: 0; }
.kt-s { font-size: 10px; }
.ch-donut, .ch-queue, .ch-wa, .ch-set { padding: 7px 9px; border-radius: 13px; gap: 4px; }
.ch-donut h4, .ch-queue h4, .ch-wa h4 { font-size: 11px; margin: 0 0 2px; }
.cd-wrap { width: 72px; height: 72px; margin: 0 auto; }
.cd-c b { font-size: 15px; }
.cd-c small { font-size: 9px; }
.cd-leg { gap: 1px; font-size: 10px; margin-top: 4px; }
.ch-queue ul { gap: 5px; }
.cq-top { font-size: 11px; }
.cq-tr { height: 4px; }
.ch-wa { gap: 3px; }
.cw-st { font-size: 11px; }
.cw-num { font-size: 13px; }
.cw-btn { padding: 3px 8px; font-size: 10.5px; }
.ch-set { gap: 4px; }
.cs-row { padding: 4px 7px; border-radius: 10px; }
.cs-t { font-size: 11px; }
.cs-row small { font-size: 9.5px; margin-top: 0; }

/* Hero Percakapan memenuhi lebar area chat (sebelumnya mengikuti lebar isi) */
.chat-hero { grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
.chat-hero .ch-body { width: 100%; min-width: 0; }
.chat-hero .ch-top { width: 100%; }

/* Desktop: header chat dihilangkan, aksinya ada di panel Info */
@media (min-width: 901px) {
  #chatHead { display: none !important; }
  .info-head > button { display: none; }
}
.info-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.info-acts > button { border: 1px solid var(--line); background: rgba(255, 255, 255, .85); border-radius: 99px; padding: 6px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink); cursor: pointer; transition: background .2s, transform .2s; }
.info-acts > button:hover { background: #fff; transform: translateY(-1px); }
.info-acts #chips { width: 100%; }
.info-wait { width: 100%; font-size: 12px; font-weight: 700; color: #C8372D; background: #FDECEA; border-radius: 99px; padding: 5px 11px; text-align: center; }

/* Grid Percakapan: hero di baris atas, panel chat tepat di bawahnya dan tidak naik ke belakang hero */
.view.chats { grid-template-rows: auto minmax(0, 1fr); }
.view.chats > .chat-hero { grid-row: 1; }
.view.chats > .side, .view.chats > .chat { grid-row: 2; min-height: 0; }
/* HP: hero tinggi, jadi area Percakapan bisa di-scroll dan panel chat punya tinggi sendiri di bawahnya */
@media (max-width: 900px) {
  .view.chats { grid-template-rows: auto auto; overflow-y: auto; }
  .view.chats > .side, .view.chats > .chat { min-height: 62vh; }
}

/* Ikon seragam: sidebar 32px (termasuk item sub), ikon di footer 18px. Mode ringkas (nav-mini) tidak diubah. */
.shell:not(.nav-mini) .nav-item .ni-ic, .shell:not(.nav-mini) .nav-item.sub .ni-ic { width: 32px !important; height: 32px !important; }
.shell:not(.nav-mini) .nav-item .ni-ic svg, .shell:not(.nav-mini) .nav-item.sub .ni-ic svg { width: 18px !important; height: 18px !important; }
.nav-foot .tool.ico svg, .nav-foot .theme-sw svg, .nav-foot .out svg { width: 18px; height: 18px; }

/* Hero Billing: kotak KPI sama tinggi dan label sejajar; tiap kotak tetap pakai warnanya sendiri */
.bil-hero .bil-kpi { align-items: stretch; }
.bil-hero .bil-k { min-height: 128px; justify-content: flex-start; }
.bil-hero .bil-k > span { min-height: 2.7em; }
.bil-hero .bil-k > small { margin-top: auto; }
.bil-hero .bil-k .bic { margin-bottom: 8px; }

/* Grafik per halaman Keuangan (warna dari token tema) */
.keu-svg { width: 100%; height: 130px; display: block; }
.keu-grafik-kosong { background: #fff; border: 1px dashed var(--line, #E5E7EB); border-radius: 16px; padding: 18px; color: var(--muted); font-size: 13px; text-align: center; margin: 0; }

/* Tab Sumber dana: kartu saldo per akun */

/* Grafik halaman berada di dalam hero: lebar penuh di bawah tiga kartu */
.keu-hero-baru .keu-grafik, .keu-hero-baru .keu-grafik-kosong { border-radius: 22px; padding: 18px 22px; box-shadow: 0 6px 18px rgba(0, 0, 0, .10); }
.keu-hero .keu-grafik-kosong { color: var(--muted) !important; }

/* Hero Keuangan: gaya sama dengan hero Percakapan (judul, kotak teal solid, kartu kaca gelap) */
.keu-hero-baru { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px 20px !important; border-radius: 22px !important; }
.keu-hero-judul { grid-column: 1 / -1; }
.keu-hero-judul h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.keu-hc { position: relative; overflow: hidden; border-radius: 18px; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.keu-hc.kn, .keu-hc.kt { background: var(--pu-grad); box-shadow: 0 10px 22px rgba(0, 0, 0, .16); }
.keu-hc.kn::after, .keu-hc.kt::after { content: ""; position: absolute; right: -26px; top: -26px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .16); pointer-events: none; }
.keu-hc > * { position: relative; z-index: 1; }
.keu-hc-h { display: flex; align-items: center; gap: 9px; }
.keu-hc-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink, #0F2233); background: var(--ic, rgba(255, 255, 255, .6)); opacity: .92; }
.keu-hc-l { font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .92); }
.keu-hc-v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 2px; }
.keu-hc-grafik { width: 100%; height: auto; margin-top: 4px; display: block; }
.keu-hc-f { font-size: 11.5px; font-weight: 400; color: rgba(255, 255, 255, .85); line-height: 1.5; margin-top: 2px; }
.keu-hc-saldo { background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)); border: 1px solid rgba(255, 255, 255, .16); box-shadow: none; }
.keu-hc-saldo .keu-hc-v { font-size: 40px; font-weight: 900; }
.keu-hc-f2 { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .85); margin-top: -2px; }
.keu-hc-kosong { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 90px; font-size: 12px; color: rgba(255, 255, 255, .8); text-align: center; }
/* Panel grafik di dalam hero: kaca gelap seperti kartu Percakapan */
.keu-hero .keu-grafik, .keu-hero .keu-grafik-kosong { background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)) !important; border: 1px solid rgba(255, 255, 255, .14) !important; box-shadow: none !important; color: #fff !important; }
.keu-hero .keu-grafik .keu-donat-nilai, .keu-hero .keu-grafik-kosong { color: rgba(255, 255, 255, .72) !important; }
.keu-hero .keu-svg text { fill: rgba(255, 255, 255, .72); }
.keu-hero .keu-svg { filter: brightness(1.45) saturate(1.1); }
@media (max-width: 900px) { .keu-hero-baru { grid-template-columns: 1fr; } }

/* Hero lebih ringkas: aksen pembeda masuk/keluar, donat kecil dengan daftar rapat */
.keu-hc.kn { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--st-ok) 55%, #FFFFFF), 0 10px 22px rgba(0, 0, 0, .16); }
.keu-hc.kt { box-shadow: inset 0 3px 0 color-mix(in srgb, var(--st-warn) 60%, #FFFFFF), 0 10px 22px rgba(0, 0, 0, .16); }
.keu-hc-kosong { min-height: 64px; }
.keu-hero .keu-svg { height: 90px; }

/* Tiga kartu hero diselaraskan: gaya sama (teal solid + lingkaran), keterangan sejajar di dasar kartu */
.keu-hc.kn, .keu-hc.kt, .keu-hc.keu-hc-saldo { background: var(--pu-grad); border: 0; box-shadow: 0 10px 22px rgba(0, 0, 0, .16); }
.keu-hc.keu-hc-saldo::after { content: ""; position: absolute; right: -26px; top: -26px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .16); pointer-events: none; }
.keu-hc-f { margin-top: auto; }
.keu-hc-saldo .keu-hc-v { font-size: 40px; }

/* ===== Keuangan: isi semua tab dirapikan (input, tombol, tabel, kartu) — warna dari tema ===== */
#v-keu input:not([type="checkbox"]):not([type="radio"]), #v-keu select, #v-keu textarea {
  font: inherit; font-size: 13.5px; color: var(--ink); background: #fff;
  border: 1px solid var(--line, #DDE1F0); border-radius: 12px; padding: 9px 12px; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease; outline: none;
}
#v-keu input:focus, #v-keu select:focus, #v-keu textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
#v-keu .card { border-radius: 20px; border: 1px solid var(--line, #E5E7EB); box-shadow: 0 4px 16px rgba(15, 34, 51, .05); }
#v-keu .card h3, #v-keu .keu-h4 { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
#v-keu .bbtn { border-radius: 10px; padding: 8px 14px; font-weight: 600; border: 1px solid var(--line, #DDE1F0); background: #fff; color: var(--ink); transition: background .15s, border-color .15s, transform .15s; }
#v-keu .bbtn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
#v-keu .bbtn.primer { background: var(--pu-grad); color: #fff; border-color: transparent; }
#v-keu .bbtn.primer:hover { color: #fff; filter: brightness(1.05); }
#v-keu .bbtn.danger { color: var(--st-bad); border-color: color-mix(in srgb, var(--st-bad) 30%, transparent); background: color-mix(in srgb, var(--st-bad) 5%, #fff); }
#v-keu .bbtn.danger:hover { border-color: var(--st-bad); color: var(--st-bad); }
/* Tabel */
#v-keu .keu-tw { border: 1px solid var(--line, #E5E7EB); border-radius: 16px; overflow: auto; background: #fff; margin: 6px 0 14px; }
#v-keu .keu-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
#v-keu .keu-tbl th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: color-mix(in srgb, var(--brand) 5%, #fff); padding: 10px 12px; border-bottom: 1px solid var(--line, #E5E7EB); white-space: nowrap; }
#v-keu .keu-tbl td { padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); color: var(--ink); vertical-align: middle; }
#v-keu .keu-tbl tbody tr:last-child td { border-bottom: 0; }
#v-keu .keu-tbl tbody tr { transition: background .12s; }
#v-keu .keu-tbl tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, #fff); }
#v-keu .keu-nom-masuk { color: var(--st-ok) !important; font-weight: 700; }
#v-keu .keu-nom-keluar { color: var(--st-warn) !important; font-weight: 700; }
#v-keu .keu-chip { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600; color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, #fff); white-space: nowrap; }
/* Judul + filter arus sejajar */
/* Tab Akun: baris dengan ikon inisial dan saldo */
#v-keu .keu-akun { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto auto !important; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); }
#v-keu .keu-akun.keu-akun-baru { grid-template-columns: 36px minmax(0, 1fr) auto !important; border-bottom: 0; }
#v-keu .keu-akun-av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--pu-grad); }
#v-keu .keu-akun-av.plus { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }
#v-keu .keu-akun-saldo { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; color: var(--st-ok); background: color-mix(in srgb, var(--st-ok) 10%, #fff); font-variant-numeric: tabular-nums; white-space: nowrap; }
#v-keu .keu-akun-saldo.minus { color: var(--st-bad); background: color-mix(in srgb, var(--st-bad) 10%, #fff); }
@media (max-width: 760px) { #v-keu .keu-akun, #v-keu .keu-akun.keu-akun-baru { grid-template-columns: 36px minmax(0, 1fr) !important; } #v-keu .keu-akun > .bbtn, #v-keu .keu-akun > .keu-akun-saldo { grid-column: 2; justify-self: start; } }

/* ===== Keuangan satu layar: tanpa scroll halaman, isi panjang di-scroll di dalam blok ===== */
@media (min-width: 901px) and (min-height: 680px) {
  #v-keu.view { overflow: hidden; display: flex; flex-direction: column; }
  #v-keu #keuRoot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  #v-keu .keu-hero-baru { flex: none; padding: 14px 16px !important; gap: 12px; border-radius: 22px !important; }
  #v-keu .keu-hero-judul h2 { font-size: 16px; }
  #v-keu .keu-hc { padding: 12px 14px; gap: 4px; }
  #v-keu .keu-hc-v { font-size: 24px; }
  #v-keu .keu-hc-saldo .keu-hc-v { font-size: 32px; }
  #v-keu .keu-hc-kosong { min-height: 46px; }
  #v-keu .keu-aksi-bar { flex: none; margin: 10px 0; }
  #v-keu .keu-1layar { flex: 1; min-height: 0; margin: 0; }
}
#v-keu .keu-1layar { display: grid !important; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, .9fr); gap: 12px; }
#v-keu .keu-kol { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 14px 16px; }
#v-keu .keu-kol-tumpuk { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-height: 0; }
#v-keu .keu-kol-tumpuk > .keu-dash-c { min-height: 0; overflow: hidden; padding: 14px 16px; display: flex; flex-direction: column; }
#v-keu .keu-kol-info { overflow: auto; }
#v-keu .keu-1layar .keu-dash-c-h { margin-bottom: 8px; }
#v-keu .keu-1layar .keu-h4 { font-size: 13px; }
#v-keu .keu-1layar .keu-svg-lebar { height: 100px !important; }
/* Daftar transaksi ringkas */
#v-keu .keu-trx-f { display: flex; gap: 6px; margin-bottom: 6px; flex: none; }
#v-keu .keu-trx-chip { border: 1px solid var(--line, #E5E7EB); background: #fff; color: var(--muted); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
#v-keu .keu-trx-chip.on { background: var(--pu-grad); color: #fff; border-color: transparent; }
#v-keu .keu-trx-list { flex: 1; min-height: 0; overflow: auto; margin: 0 -4px; padding: 0 4px; }
#v-keu .keu-trx { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); }
#v-keu .keu-trx:last-child { border-bottom: 0; }
#v-keu .keu-trx-k { min-width: 0; }
#v-keu .keu-trx-k b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#v-keu .keu-trx-k small { font-size: 11.5px; color: var(--muted); }
#v-keu .keu-trx-n { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
#v-keu .keu-trx-n b { font-size: 13px; font-variant-numeric: tabular-nums; }
#v-keu .keu-trx-a { display: none; gap: 4px; }
#v-keu .keu-trx:hover .keu-trx-a { display: flex; }
#v-keu .keu-trx-btn { border: 0; background: color-mix(in srgb, var(--brand) 8%, #fff); color: var(--brand); border-radius: 8px; padding: 2px 8px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
#v-keu .keu-trx-btn.hapus { color: var(--st-bad); background: color-mix(in srgb, var(--st-bad) 8%, #fff); }
/* Kolom 1: transaksi (atas) + KPI (bawah) */
#v-keu .keu-kol-1 { grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr); }
#v-keu .keu-kpi-mini { flex: 1; min-height: 0; overflow: auto; }
#v-keu .keu-kpi-r { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); }
#v-keu .keu-kpi-r:last-child { border-bottom: 0; }
#v-keu .keu-kpi-k { min-width: 0; display: flex; flex-direction: column; }
#v-keu .keu-kpi-k span { font-size: 13px; font-weight: 600; color: var(--ink); }
#v-keu .keu-kpi-k small { font-size: 11px; color: var(--muted); }
#v-keu .keu-kpi-r b { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
#v-keu .keu-kpi-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line, #E5E7EB); }
#v-keu .keu-kpi-dot.ok { background: var(--st-ok); }
#v-keu .keu-kpi-dot.warn { background: var(--st-warn); }
#v-keu .keu-kpi-dot.bad { background: var(--st-bad); }

/* Kolom 3: saldo sumber dana (atas) + sumber pemasukan (bawah) */
#v-keu .keu-kol-3 { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
#v-keu .keu-kol-3 .keu-info-sec { flex: 1; min-height: 0; overflow: auto; margin-top: 0; padding-top: 0; border-top: 0; }
#v-keu .keu-kol-3.tunggal { grid-template-rows: minmax(0, 1fr); }
/* Blok grafik perkembangan: grafik (atas) + sumber pemasukan (bawah) */
#v-keu .keu-tren2 .keu-tren-sumber { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 10px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 80%, transparent); }
#v-keu .keu-tren2 .keu-tren-sumber .keu-info-sec { flex: 1; min-height: 0; overflow: auto; margin-top: 0; padding-top: 0; border-top: 0; }
#v-keu .keu-dash-baris.minus b { color: var(--st-bad); }
/* Arus keuangan per jalur: masuk (hijau) dan keluar (oranye) */
#v-keu .keu-arus2-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); }
#v-keu .keu-arus2-r:last-child { border-bottom: 0; }
#v-keu .keu-arus2-r > span { font-size: 13px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#v-keu .keu-arus2-n { display: flex; gap: 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#v-keu .keu-arus2-n b.nol { color: var(--muted); font-weight: 500; opacity: .7; }
#v-keu .keu-arus2-bar { grid-column: 1 / -1; display: grid; gap: 2px; }
#v-keu .keu-arus2-bar i { display: block; height: 4px; border-radius: 4px; min-width: 0; transition: width .5s ease; }
#v-keu .keu-arus2-bar i.m { background: var(--st-ok); }
#v-keu .keu-arus2-bar i.k { background: var(--st-warn); }
#v-keu .keu-saldo-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 80%, transparent); }
#v-keu .keu-saldo-total span { font-size: 12px; color: var(--muted); }
#v-keu .keu-saldo-total b { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
#v-keu .keu-dash-baris.minus em i { background: var(--st-bad); }

/* Blok ringkasan bulan ini */
#v-keu .keu-ring { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#v-keu .keu-ring-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 6%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); }
#v-keu .keu-ring-t small { font-size: 11px; color: var(--muted); }
#v-keu .keu-ring-t b { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#v-keu .keu-ring-t span { font-size: 11px; color: var(--muted); }
#v-keu .keu-ring-t.masuk b { color: var(--st-ok); }
#v-keu .keu-ring-t.keluar b { color: var(--st-warn); }
#v-keu .keu-ring-x { margin-top: 8px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; padding: 8px 2px 0; border-top: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); }
#v-keu .keu-ring-x span { font-size: 11px; color: var(--muted); }
#v-keu .keu-ring-x b { font-size: 13px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
#v-keu .keu-ring-x small { grid-column: 1 / -1; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 820px) {
  #v-keu .keu-kpi-r { padding: 4px 2px; }
  #v-keu .keu-ring-t { padding: 6px 9px; }
  #v-keu .keu-ring-x { display: none; }
}

/* Kolom info */
#v-keu .keu-info-sec { margin-bottom: 12px; }
#v-keu .keu-info-h { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
#v-keu .keu-info-kosong { font-size: 12px; color: var(--muted); margin: 4px 0; }
@media (max-width: 900px) { #v-keu .keu-1layar { grid-template-columns: 1fr; } #v-keu .keu-trx-list { max-height: 420px; } }

/* ===== Keuangan satu menu: tombol input + laporan, isi dibuka di popup ===== */
#v-keu .keu-aksi-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 6px; }
#v-keu .keu-aksi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#v-keu .keu-aksi-lap { margin-left: auto; padding: 4px; background: #fff; border: 1px solid var(--line, #E5E7EB); border-radius: 14px; gap: 2px; }
#v-keu .keu-aksi-l { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 8px 0 6px; }
#v-keu .bbtn.ghost { border-color: transparent; background: transparent; padding: 7px 11px; }
#v-keu .bbtn.ghost:hover { background: color-mix(in srgb, var(--brand) 8%, #fff); border-color: transparent; transform: none; }
.keu-dlg { border: 0; border-radius: 24px; padding: 0; width: min(1120px, 94vw); max-height: 90vh; background: var(--bg, #EEF3F6); color: var(--ink); box-shadow: 0 30px 80px rgba(15, 34, 51, .30); overflow: hidden; }
.keu-dlg[open] { animation: keuMuncul .28s cubic-bezier(.2, .8, .2, 1) both; display: flex; flex-direction: column; }
.keu-dlg::backdrop { background: rgba(15, 34, 51, .40); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.keu-dlg-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--line, #E5E7EB); }
.keu-dlg-h h3 { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.keu-dlg-isi { padding: 16px 20px 20px; overflow: auto; }
@media (max-width: 760px) { #v-keu .keu-aksi-lap { margin-left: 0; width: 100%; overflow-x: auto; flex-wrap: nowrap; } .keu-dlg { width: 100vw; max-height: 100vh; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .keu-dlg[open] { animation: none; } }

/* Halaman tunggal: judul kartu + tombol, Buku kas tertanam, bagian buka-tutup */
#v-keu .keu-dash-c-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
#v-keu .keu-dash-c-h .keu-h4 { margin: 0; }
#v-keu .keu-dash-buku .card { border: 0; box-shadow: none; padding: 0; background: transparent; }
#v-keu .keu-lipat { background: #fff; border: 1px solid var(--line, #E5E7EB); border-radius: 20px; padding: 0 18px; box-shadow: 0 4px 16px rgba(15, 34, 51, .05); }
#v-keu .keu-lipat > summary { cursor: pointer; list-style: none; padding: 16px 0; font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: space-between; }
#v-keu .keu-lipat > summary::-webkit-details-marker { display: none; }
#v-keu .keu-lipat > summary::after { content: "▾"; color: var(--muted); transition: transform .2s ease; }
#v-keu .keu-lipat[open] > summary::after { transform: rotate(180deg); }
#v-keu .keu-lipat[open] { padding-bottom: 16px; }

/* ===== Keuangan: tab Ringkasan sebagai dashboard ===== */
.keu-dash { display: grid; gap: 16px; margin-top: 4px; }
.keu-dash-r4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.keu-dash-r2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.keu-dash-r3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.keu-dash-r21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.keu-dash-r21 > .keu-dash-k { justify-content: center; }
@media (max-width: 900px) { .keu-dash-r21 { grid-template-columns: 1fr; } }
.keu-dash-k, .keu-dash-c { background: #fff; border: 1px solid var(--line, #E5E7EB); border-radius: 20px; padding: 16px 18px; min-width: 0; box-shadow: 0 4px 16px rgba(15, 34, 51, .05); animation: keuMuncul .5s cubic-bezier(.2, .8, .2, 1) both; }
.keu-dash-r4 > :nth-child(2), .keu-dash-r2 > :nth-child(2), .keu-dash-r3 > :nth-child(2) { animation-delay: .05s; }
.keu-dash-r4 > :nth-child(3), .keu-dash-r3 > :nth-child(3) { animation-delay: .1s; }
.keu-dash-r4 > :nth-child(4) { animation-delay: .15s; }
.keu-dash-k { display: flex; flex-direction: column; gap: 8px; transition: transform .25s ease, box-shadow .25s ease; }
.keu-dash-k:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 34, 51, .09); }
.keu-dash-k-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.keu-dash-k-h i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.keu-dash-k-isi { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.keu-dash-k-isi b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.keu-dash-k small { font-size: 11.5px; color: var(--muted); }
.keu-dash-c .keu-h4 { margin: 0 0 10px; }
.keu-dash-sub { display: block; font-size: 11.5px; color: var(--muted); margin: -6px 0 8px; }
.keu-svg-lebar { height: 150px !important; }
.keu-legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.keu-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.keu-legenda i { width: 10px; height: 3px; border-radius: 99px; display: inline-block; }
.keu-dash-baris { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "b b"; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--line, #E5E7EB) 70%, transparent); font-size: 13px; }
.keu-dash-baris:last-child { border-bottom: 0; }
.keu-dash-baris span { grid-area: n; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.keu-dash-baris b { grid-area: v; font-variant-numeric: tabular-nums; color: var(--ink); }
.keu-dash-baris em { grid-area: b; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--brand) 8%, #fff); overflow: hidden; }
.keu-dash-baris em i { display: block; height: 100%; border-radius: 99px; background: var(--pu-grad); animation: keuLebar .8s cubic-bezier(.2, .8, .2, 1) .15s both; transform-origin: left; }
.keu-dash-c .keu-tw { margin-bottom: 10px; }
@keyframes keuLebar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 1200px) { .keu-dash-r4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .keu-dash-r3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .keu-dash-r4, .keu-dash-r2, .keu-dash-r3 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .keu-dash-k, .keu-dash-c, .keu-dash-baris em i { animation: none !important; } .keu-dash-k:hover { transform: none; } }

/* ===== Keuangan: grafik modern + gerakan halus ===== */
.keu-plot { position: relative; }
.keu-plot .keu-svg { display: block; width: 100%; height: 120px; }
.keu-sumbu { position: relative; height: 16px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.keu-sumbu span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-variant-numeric: tabular-nums; }
.keu-hero .keu-sumbu { color: rgba(255, 255, 255, .62); }
.keu-hit { fill: transparent; cursor: crosshair; transition: fill .15s; }
.keu-hit:hover { fill: rgba(0, 0, 0, .04); }
.keu-hero .keu-hit:hover { fill: rgba(255, 255, 255, .08); }
.keu-bar-r { transform-box: fill-box; transform-origin: 50% 100%; animation: keuTumbuh .65s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 16ms); transition: opacity .15s; cursor: pointer; }
.keu-svg:hover .keu-bar-r, .keu-hc-grafik:hover .keu-bar-r { opacity: .55; }
.keu-svg .keu-bar-r:hover, .keu-hc-grafik .keu-bar-r:hover { opacity: 1; }
.keu-garis { stroke-dasharray: 1; stroke-dashoffset: 1; animation: keuGaris 1.1s cubic-bezier(.4, 0, .2, 1) .1s forwards; }
.keu-area { animation: keuPudar .8s .45s ease-out both; }
.keu-grafik-kosong { display: flex; align-items: center; justify-content: center; gap: 8px; }
/* Muncul berurutan */
.keu-hero-baru > * { animation: keuMuncul .5s cubic-bezier(.2, .8, .2, 1) both; }
.keu-hero-baru > :nth-child(2) { animation-delay: .04s; }
.keu-hero-baru > :nth-child(3) { animation-delay: .09s; }
.keu-hero-baru > :nth-child(4) { animation-delay: .14s; }
.keu-hero-baru > :nth-child(5) { animation-delay: .19s; }
.keu-hc { transition: transform .25s ease, box-shadow .25s ease; }
.keu-hc:hover { transform: translateY(-2px); }
/* Tooltip grafik */
.keu-tip { position: fixed; z-index: 9999; pointer-events: none; background: var(--ink, #0F2233); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 10px; box-shadow: 0 8px 22px rgba(0, 0, 0, .22); opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; white-space: nowrap; font-variant-numeric: tabular-nums; }
.keu-tip.on { opacity: 1; transform: none; }
@keyframes keuMuncul { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes keuTumbuh { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes keuGaris { to { stroke-dashoffset: 0; } }
@keyframes keuPudar { from { opacity: 0; } to { opacity: 1; } }
@keyframes keuPutar { from { opacity: 0; transform: rotate(-70deg) scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .keu-hero-baru > *, .keu-hero-baru .keu-grafik-wrap > *, .keu-bar-r, .keu-area, .keu-donat-lingkar .keu-donat-svg { animation: none !important; }
  .keu-garis { animation: none !important; stroke-dashoffset: 0; }
  .keu-hc, .keu-hc:hover { transition: none; transform: none; }
}

/* Popup tambah / ubah karyawan */
.kar-dlg { border: 0; border-radius: 20px; padding: 0; width: min(480px, 92vw); background: #FFFFFF; color: var(--ink, #0F2233); box-shadow: 0 24px 60px rgba(15, 34, 51, .25); }
.kar-dlg::backdrop { background: rgba(15, 34, 51, .35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.kar-dlg-isi { padding: 18px 20px; }
.kar-dlg input, .kar-dlg select { font: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--line, #DDE1F0); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; width: 100%; }
.kar-dlg .kar-row { grid-template-columns: 1fr 1fr; }
.kar-dlg .kar-row > :first-child { grid-column: 1 / -1; }
.kar-dlg input[type="text"], .kar-dlg input:not([type]) { margin-bottom: 8px; }
.kar-dlg > .kar-dlg-isi > input { margin-bottom: 8px; }
.kar-err { color: #B42318; font-size: 12px; min-height: 16px; margin: 6px 0 0; }
.kar-tambah { padding: 6px 12px; font-size: 12px; }
@media (max-width: 760px) { .kar-dlg .kar-row { grid-template-columns: 1fr; } }

/* Data karyawan: form dan daftar */
.kar-card { padding: 16px 18px; margin-bottom: 14px; min-width: 0; }
.kar-h { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.kar-card input, .kar-card select { font: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--line, #DDE1F0); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; width: 100%; }
.kar-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.kar-card > input { margin-bottom: 8px; }
.kar-aksi { display: flex; gap: 8px; margin-top: 8px; }
/* Popup slip kasbon / gaji */
.kar-slip { max-width: 380px; }
.kar-slip-h { display: grid; gap: 2px; text-align: center; padding: 6px 0 14px; border-bottom: 1px dashed var(--line, #DDE1F0); margin-bottom: 10px; }
.kar-slip-h small { color: var(--muted); font-size: 11px; letter-spacing: .08em; font-weight: 700; }
.kar-slip-h b { font-size: 15px; letter-spacing: .04em; }
.kar-slip-jml { font-size: 24px; font-weight: 800; color: #4F46E5; margin-top: 4px; }
.kar-slip-tabel { display: grid; gap: 2px; margin-bottom: 10px; }
.kar-slip-r { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line, #EEF0F6); font-size: 13px; }
.kar-slip-r span { color: var(--muted); }
.kar-slip-r b { text-align: right; overflow-wrap: anywhere; }
.kar-slip-no { justify-self: center; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); background: #F1F2F6; }
html[data-theme="dark"] .kar-slip-no { background: rgba(255, 255, 255, .08); }
.kar-slip-lbl { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.kar-slip-r.sorot { margin: 4px 0; padding: 9px 10px; border: 0; border-radius: 10px; background: #EEF0FF; }
.kar-slip-r.sorot span, .kar-slip-r.sorot b { color: #4F46E5; font-weight: 800; }
.kar-slip-wa:empty { display: none; }
.kar-slip-wa { margin: -4px 0 8px; }
/* tombol slip: satu baris, tinggi sama; Kirim ke WhatsApp hijau */
.kar-slip-aksi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
.kar-slip-aksi a.bbtn { display: inline-flex; align-items: center; text-decoration: none; }
.kar-slip-img { display: block; width: 100%; border-radius: 12px; margin-bottom: 10px; }
.kar-slip-aksi .bbtn { justify-content: center; text-align: center; min-height: 40px; }
.bbtn.kar-wa { background: #16A34A; border-color: #16A34A; color: #fff; font-weight: 700; }
.bbtn.kar-wa:hover { background: #15803D; border-color: #15803D; }
.bbtn.kar-wa:disabled { opacity: .6; }
html[data-theme="dark"] .kar-slip-r.sorot { background: rgba(139, 135, 255, .16); }
html[data-theme="dark"] .kar-slip-r.sorot span, html[data-theme="dark"] .kar-slip-r.sorot b { color: #C3C0FF; }
/* Tabel karyawan & riwayat: kolom aksi lebarnya tetap supaya judul dan isi selalu sejajar */
.kar-tabel { display: grid; gap: 6px; }
.kar-tr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 236px; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; font-size: 13px; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.kar-tr.kar-tr-r { grid-template-columns: minmax(0, 1.3fr) 104px minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .9fr) 176px; }
.kar-tr:not(.kar-th) { background: rgba(255, 255, 255, .6); border-color: var(--line, #E3E7F2); }
.kar-tr:not(.kar-th):hover { background: #fff; border-color: #C9D3EA; }
.kar-th { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; padding-bottom: 2px; }
.kar-row[hidden] { display: none !important; }
.kar-info { font-size: 12.5px; color: var(--muted, #4A5D6E); margin: 0 0 10px; }
.kar-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.kar-utang { color: #B42318; font-weight: 700; }
/* nama + jabatan dengan avatar inisial */
.kar-siapa { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kar-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #4F46E5; background: #EEF0FF; }
.kar-siapa-t { display: grid; min-width: 0; }
.kar-siapa-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kar-siapa-t small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* label status gaji & jenis transaksi */
.kar-stat, .kar-jenis { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 11.5px; white-space: nowrap; }
.kar-stat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kar-stat.aktif { color: #15803D; background: #E7F6EE; }
.kar-stat.belum { color: #B45309; background: #FFF4E0; }
.kar-stat.keluar { color: var(--muted); background: #F1F2F6; }
.kar-jenis { color: #4F46E5; background: #EEF0FF; }
.kar-jenis.kasbon { color: #B45309; background: #FFF4E0; }
.kar-jenis.lunas { color: #15803D; background: #E7F6EE; }
.kar-aksi-b { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
html[data-theme="dark"] .kar-tr:not(.kar-th) { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .kar-tr:not(.kar-th):hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
html[data-theme="dark"] .kar-av { color: #C3C0FF; background: rgba(139, 135, 255, .18); }
/* HP: setiap baris jadi kartu, judul kolom tampil di atas nilainya */
@media (max-width: 760px) {
  .kar-row { grid-template-columns: 1fr; }
  .kar-th { display: none; }
  .kar-tr, .kar-tr.kar-tr-r { grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 12px; }
  .kar-tr > :first-child, .kar-tr > .kar-aksi-b { grid-column: 1 / -1; }
  .kar-tr > .kar-aksi-b { justify-content: flex-start; }
  .kar-tr [data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
  .kar-num { text-align: left; }
}

/* Layar pendek: footer sidebar tidak menempel (sticky) agar tidak menutupi menu; seluruh sidebar bisa di-scroll */
@media (max-height: 900px) {
  .nav .nav-foot { position: static !important; }
}

/* Billing Hotspot: hero mengikuti warna tema aktif */
.hs-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 16px; padding: 18px 22px; border-radius: 20px; color: #fff; background: var(--pu-hero, linear-gradient(135deg, #0B1E2D, #0E7490)); box-shadow: var(--pu-shadow, 0 10px 22px rgba(8, 145, 178, .25)); }
.hs-hero small { display: block; opacity: .8; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.hs-hero h2 { margin: 4px 0 0; font-size: 20px; color: #fff; }
.hs-hero { display: block; }
.hs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hs-istilah { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.hs-istilah > div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; padding: 10px 12px; }
.hs-istilah dt { font-weight: 800; font-size: 13px; color: #fff; margin: 0 0 4px; }
.hs-istilah dd { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .85); line-height: 1.45; }
.hs-badge { border-radius: 99px; padding: 6px 12px; font-size: 12px; font-weight: 800; letter-spacing: .06em; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); color: #fff; }

/* Billing Hotspot: kotak KPI, form, dan riwayat (warna mengikuti tema) */
.hs-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.hs-k { background: #FFFFFF; border: 1px solid var(--line, #DDE1F0); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: 0 1px 3px rgba(15, 34, 51, .06); }
.hs-k b { font-size: 22px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.hs-kl { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; min-height: 2.6em; }
.hs-k small { font-size: 11.5px; color: var(--muted); }
.hs-k.warn b { color: #B45309; }
.hs-k.bad b { color: #B42318; }
/* di dalam hero gelap: kotak kaca dengan teks putih */
.hs-hero .hs-kpi { margin-bottom: 14px; }
.hs-hero .hs-k { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); box-shadow: none; }
.hs-hero .hs-k b { color: #FFFFFF; }
.hs-hero .hs-k small, .hs-hero .hs-kl { color: rgba(255, 255, 255, .8); }
.hs-hero .hs-k.warn b { color: #FFD27A; }
.hs-hero .hs-k.bad b { color: #FFB3A6; }
.hs-dua { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.hs-card { padding: 16px 18px; min-width: 0; }
.hs-h { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.hs-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.hs-card .hs-row:has(> input:only-of-type) { grid-template-columns: 1fr 1fr; }
.hs-card select { font: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--line, #DDE1F0); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; }
.hs-card input { font: inherit; font-size: 13px; padding: 9px 11px; border: 1px solid var(--line, #DDE1F0); border-radius: 10px; background: #fff; color: var(--ink); min-width: 0; }
.hs-tabel { display: grid; gap: 4px; }
.hs-tr { display: grid; grid-template-columns: 1.1fr 1.4fr .7fr 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; font-size: 13px; }
.hs-tr:not(.hs-th):hover { background: rgba(0, 0, 0, .03); }
.hs-th { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hs-num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .hs-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .hs-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hs-dua { grid-template-columns: 1fr; } .hs-row { grid-template-columns: 1fr; } .hs-tr { grid-template-columns: 1fr auto; } .hs-th { display: none; } .hs-tr .hs-num, .hs-tr span:nth-child(4) { text-align: left; } }

/* Panel Info naik sampai bagian atas; hero hanya di kiri */
@media (min-width: 901px) {
  .view.chats.has-info > .chat-hero { grid-column: 1 / 3; }
  .view.chats.has-info > .info { grid-column: 3; grid-row: 1 / span 2; }
}
