/* Tema terang ala dashboard kaca: diterapkan ke seluruh panel admin.
   Dimuat paling akhir, hanya mengganti warna, latar, dan bayangan. */
:root {
  --bg: #EEF3FD;
  --ink: #14183A;
  --muted: #6B7594;
  --line: rgba(120, 130, 190, .18);
  --brand: #5B6CF0;
  --brand-d: #4451C8;
  --shadow: 0 10px 30px rgba(60, 80, 160, .10);
}
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, #D6E7FF 0, transparent 40%),
    radial-gradient(circle at 92% 18%, #E6DAFF 0, transparent 38%),
    radial-gradient(circle at 55% 100%, #FFE0EE 0, transparent 40%),
    linear-gradient(160deg, #EAF2FF 0%, #F4F0FF 100%) fixed;
}
.shell { background: transparent; }

/* sidebar: kaca terang */
.nav {
  color: #3B4370;
  background: rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border-right: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 8px 0 28px rgba(60, 80, 160, .08);
}
.nav-sec, .nav-sec-btn { color: #7A84B0 !important; }
.nav-item { color: #3B4370; }
.nav-item:hover { background: rgba(255, 255, 255, .7); color: #14183A; }
.nav-item .ni-t small { color: #7A84B0; }
.nav-item.on { background: var(--pu-grad); color: #fff; box-shadow: 0 10px 22px rgba(109, 40, 217, .30); }
.nav-item.on .ni-t small { color: #E7EBFF; }
.nav-item.on .ni-ic { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
.nav-item.on::before { background: #fff; }
.nav-foot { color: #5A6290; border-top: 1px solid rgba(120, 130, 190, .2); }
.nav-foot .me { background: rgba(255, 255, 255, .7); }
.grp-head { color: #14183A; }

/* header */
.top { background: rgba(255, 255, 255, .5); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, .8); }
.top h1 { color: #14183A; }
.top p, .top .eyebrow { color: var(--muted); }
.tool, .gsearch, .websel { background: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .9); }

/* kartu kaca */
.card {
  background: rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(60, 80, 160, .10);
}
.card h3, .card h2 { color: #14183A; }

/* KPI berwarna seperti referensi */
.stat { border: 0; color: #fff; }
.stat .l, .stat small { color: rgba(255, 255, 255, .9); }
.stat b { color: #fff; }
.stat .ic { background: rgba(255, 255, 255, .22) !important; color: #fff !important; box-shadow: none; }
.stat:nth-of-type(4n+1) { background: linear-gradient(135deg, #5AA2FF, #2F6BFF); box-shadow: 0 12px 26px rgba(47, 107, 255, .3); }
.stat:nth-of-type(4n+2) { background: linear-gradient(135deg, #8E78FF, #6A4BE0); box-shadow: 0 12px 26px rgba(106, 75, 224, .3); }
.stat:nth-of-type(4n+3) { background: linear-gradient(135deg, #4FD9A6, #17A97A); box-shadow: 0 12px 26px rgba(23, 169, 122, .3); }
.stat:nth-of-type(4n+4) { background: linear-gradient(135deg, #FFB067, #F0823A); box-shadow: 0 12px 26px rgba(240, 130, 58, .3); }
.pel-kpis .stat, .home-kpis .stat { color: #fff; }

/* tombol */
.btn { background: var(--pu-grad); box-shadow: 0 10px 22px rgba(109, 40, 217, .28); }
.btn:hover { filter: brightness(1.05); }
.bbtn.primer { background: var(--pu-grad); box-shadow: 0 10px 22px rgba(109, 40, 217, .28); }
.bbtn { background: rgba(255, 255, 255, .85); color: #14183A; border-color: rgba(255, 255, 255, .9); }

/* tabel & teks */
.tbl th { color: var(--muted); }
.tbl td { color: #14183A; }
.muted, small.sub { color: var(--muted); }

/* sidebar: naikkan kekhususan agar aturan lama tidak menimpa */
.shell > .nav {
  background: rgba(255, 255, 255, .5) !important;
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  color: #3B4370 !important;
}
.shell > .nav::before, .shell > .nav::after { display: none !important; }
.shell .nav-item { color: #3B4370 !important; background: transparent; }
.shell .nav-item:hover { background: rgba(255, 255, 255, .75) !important; color: #14183A !important; }
.shell .nav-item.on { background: var(--pu-grad) !important; color: #fff !important; box-shadow: 0 10px 22px rgba(109, 40, 217, .30) !important; }
.shell .nav-item .ni-t b { color: inherit; }
.shell .nav-item .ni-t small { color: #7A84B0; }
.shell .nav-item.on .ni-t small { color: #E7EBFF; }
.shell .nav-sec { color: #7A84B0 !important; }

/* Dashboard: grafik & kartu gelap diganti kaca terang */
#v-home .home-analit .card, #v-home .dash-row .card, #v-home .home-tren, #v-home .home-status,
#v-home .card.home-tagihan, #v-home .card {
  background: rgba(255, 255, 255, .62) !important;
  color: #14183A !important;
  border: 1px solid rgba(255, 255, 255, .85) !important;
}
#v-home .home-tren h3, #v-home .home-tren .sub, #v-home .home-tren #homeTrenTot { color: #14183A !important; }
#v-home .home-tren .sub, #v-home .home-tren #homeTrenTot { color: var(--muted) !important; }
#v-home .home-empty-chart { color: var(--muted) !important; }
#v-home .home-hero { background: var(--pu-hero) !important; box-shadow: 0 16px 36px rgba(109, 40, 217, .28); }
#v-home .card h3, #v-home .card .home-sec-h h3 { color: #14183A !important; }
#v-home .card .sub, #v-home .card small { color: var(--muted) !important; }

/* ===== Saklar tema ===== */
.theme-sw { position: relative; display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; margin: 0 0 10px; padding: 3px; border: 1px solid rgba(120, 130, 190, .25); border-radius: 99px; background: rgba(255, 255, 255, .7); cursor: pointer; font-size: 11.5px; font-weight: 700; color: #5A6290; transition: background .3s ease; }
.theme-sw .ts-lbl { flex: 1; text-align: center; position: relative; z-index: 1; transition: color .3s ease; }
.theme-sw .ts-knob { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 99px; background: linear-gradient(135deg, #FFD36E, #F59E3B); box-shadow: 0 4px 12px rgba(245, 158, 59, .35); transition: transform .35s cubic-bezier(.2, .8, .2, 1), background .35s ease; }
.theme-sw .ts-night { color: #5A6290; }
.theme-sw[aria-checked="true"] { background: #1E2140; border-color: rgba(255, 255, 255, .1); color: #AEB6E8; }
.theme-sw[aria-checked="true"] .ts-knob { transform: translateX(100%); background: linear-gradient(135deg, #7A8CFF, #4B5BDB); box-shadow: 0 4px 12px rgba(75, 91, 219, .45); }
.theme-sw[aria-checked="true"] .ts-day, .theme-sw[aria-checked="true"] .ts-night { color: #AEB6E8; }
.theme-sw:not([aria-checked="true"]) .ts-day { color: #fff; }
.theme-sw[aria-checked="true"] .ts-night { color: #fff; }

/* ===== Night (gelap) ===== */
html[data-theme="dark"] {
  --bg: #0D1020; --ink: #EEF0FF; --muted: #9AA3CF; --line: rgba(160, 170, 230, .14); --brand: #7A8CFF; --shadow: 0 12px 30px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] body {
  color: #EEF0FF;
  background:
    radial-gradient(circle at 8% 12%, rgba(91, 109, 240, .25) 0, transparent 40%),
    radial-gradient(circle at 92% 18%, rgba(122, 98, 232, .22) 0, transparent 38%),
    radial-gradient(circle at 55% 100%, rgba(240, 130, 58, .10) 0, transparent 40%),
    linear-gradient(160deg, #0B0E1C 0%, #14122A 100%) fixed !important;
}
html[data-theme="dark"] .shell > .nav {
  background: rgba(20, 22, 44, .6) !important; border-right: 1px solid rgba(255, 255, 255, .06) !important; color: #C9CEF2 !important;
}
html[data-theme="dark"] .shell .nav-item { color: #C9CEF2 !important; }
html[data-theme="dark"] .shell .nav-item:hover { background: rgba(255, 255, 255, .08) !important; color: #fff !important; }
html[data-theme="dark"] .shell .nav-item .ni-t small { color: #7F88BD; }
html[data-theme="dark"] .shell .nav-sec { color: #7F88BD !important; }
html[data-theme="dark"] .nav-foot { color: #9AA3CF; border-top-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .nav-foot .me { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .top { background: rgba(20, 22, 44, .55) !important; border-bottom-color: rgba(255, 255, 255, .06) !important; }
html[data-theme="dark"] .top h1, html[data-theme="dark"] .card h3, html[data-theme="dark"] .card h2 { color: #EEF0FF !important; }
html[data-theme="dark"] .top p, html[data-theme="dark"] .top .eyebrow, html[data-theme="dark"] .muted { color: #9AA3CF !important; }
html[data-theme="dark"] .tool, html[data-theme="dark"] .gsearch, html[data-theme="dark"] .websel { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .1) !important; color: #EEF0FF !important; }
html[data-theme="dark"] .card, html[data-theme="dark"] #v-home .card, html[data-theme="dark"] #v-home .home-tren {
  background: rgba(255, 255, 255, .05) !important; border: 1px solid rgba(255, 255, 255, .08) !important; color: #EEF0FF !important; box-shadow: 0 14px 34px rgba(0, 0, 0, .35) !important;
}
html[data-theme="dark"] .tbl td { color: #EEF0FF; }
html[data-theme="dark"] .tbl th { color: #9AA3CF; }
html[data-theme="dark"] .bbtn { background: rgba(255, 255, 255, .06) !important; color: #EEF0FF !important; border-color: rgba(255, 255, 255, .12) !important; }
html[data-theme="dark"] .view.chats { background: linear-gradient(160deg, #0B0E1C, #17142E) !important; }
html[data-theme="dark"] .view.chats .side, html[data-theme="dark"] .view.chats .chat, html[data-theme="dark"] .view.chats .info, html[data-theme="dark"] .view.chats .composer-wrap {
  background: rgba(20, 22, 44, .55) !important; border-color: rgba(255, 255, 255, .06) !important;
}
html[data-theme="dark"] .view.chats .item { color: #EEF0FF; }
html[data-theme="dark"] .view.chats .item:hover { background: rgba(255, 255, 255, .06) !important; }
html[data-theme="dark"] .view.chats .item.active { background: rgba(255, 255, 255, .1) !important; }
html[data-theme="dark"] .view.chats .composer input[type="text"] { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .1) !important; color: #EEF0FF !important; }
html[data-theme="dark"] .view.chats .msg.customer .bubble { background: rgba(255, 255, 255, .1) !important; color: #EEF0FF !important; border-color: rgba(255, 255, 255, .12) !important; }
html[data-theme="dark"] .view.chats .msg.admin .bubble { background: linear-gradient(180deg, rgba(91, 141, 255, .85), rgba(74, 90, 220, .85)) !important; }
html[data-theme="dark"] .view.chats .msg-sys { background: rgba(255, 255, 255, .08) !important; color: #C9CEF2; }
html[data-theme="dark"] .chat-hero { background: rgba(20, 22, 44, .55) !important; border-color: rgba(255, 255, 255, .08) !important; }
html[data-theme="dark"] .chat-hero .ch-t h2 { color: #EEF0FF; }
html[data-theme="dark"] .chat-hero .ch-donut, html[data-theme="dark"] .chat-hero .ch-queue, html[data-theme="dark"] .chat-hero .ch-wa, html[data-theme="dark"] .chat-hero .ch-set {
  background: rgba(255, 255, 255, .05) !important; border-color: rgba(255, 255, 255, .08) !important;
}
html[data-theme="dark"] .chat-hero .ch-donut h4, html[data-theme="dark"] .chat-hero .ch-queue h4, html[data-theme="dark"] .chat-hero .ch-wa h4, html[data-theme="dark"] .cw-st, html[data-theme="dark"] .cw-num, html[data-theme="dark"] .cs-t, html[data-theme="dark"] .cd-c b, html[data-theme="dark"] .cq-top, html[data-theme="dark"] .cd-leg li, html[data-theme="dark"] .cd-leg b { color: #EEF0FF !important; }
html[data-theme="dark"] .cs-row { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .cs-row small, html[data-theme="dark"] .cd-c small, html[data-theme="dark"] .cq-empty { color: #9AA3CF !important; }
html[data-theme="dark"] .cw-btn { background: rgba(255, 255, 255, .06); color: #C9CEF2; border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .cd-track, html[data-theme="dark"] .cq-tr { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .cd-svg .cd-track { stroke: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .home-empty-chart, html[data-theme="dark"] .home-tren .sub { color: #9AA3CF !important; }
html[data-theme="dark"] #v-home .home-hero { background: var(--pu-hero) !important; }
html[data-theme="dark"] #v-home .home-analit .card, html[data-theme="dark"] #v-home .dash-row .card, html[data-theme="dark"] #v-home .home-analit .card.home-tren {
  background: rgba(255, 255, 255, .05) !important; color: #EEF0FF !important; border: 1px solid rgba(255, 255, 255, .08) !important;
}
html[data-theme="dark"] #v-home .home-analit .card h3, html[data-theme="dark"] #v-home .dash-row .card h3 { color: #EEF0FF !important; }
html[data-theme="dark"] .main { background: transparent !important; }

/* ===== Hero Billing, Laporan Keuangan, Pembayaran: gradasi seperti referensi ===== */
.bil-hero, .keu-hero, .lk-hero {
  background: var(--pu-hero) !important;
  color: #fff !important;
  box-shadow: 0 16px 36px rgba(109, 40, 217, .28) !important;
  border: 1px solid rgba(255, 255, 255, .5) !important;
}
.bil-hero *, .keu-hero *, .lk-hero * { color: inherit; }
html[data-theme="dark"] .bil-hero, html[data-theme="dark"] .keu-hero, html[data-theme="dark"] .lk-hero {
  background: var(--pu-hero) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45) !important;
}

/* ===== Header atas dihilangkan: hero tiap menu sudah memuat judulnya ===== */
.top { display: none !important; }
.nav-foot .tools { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; margin: 0 0 10px; }
.nav-foot .tools .tool { height: 32px; min-width: 32px; padding: 0 10px; font-size: 12px; }
.nav-foot .tools .websel, .nav-foot .tools .sbox { display: none !important; }
.nav-foot .tools .pill { font-size: 11.5px; }
.view.chats .side > .websel { margin: 10px 12px 0; width: calc(100% - 24px); }
.view.chats .side > .sbox { margin: 8px 12px 6px; }
.view.chats .side > .sbox .gsearch { width: 100%; }
html[data-theme="dark"] .side .tabs, html[data-theme="dark"] .tabs { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .08) !important; }
html[data-theme="dark"] .side .tab, html[data-theme="dark"] .tabs .tab { color: #AEB6E8 !important; background: transparent !important; }
html[data-theme="dark"] .side .tab.on, html[data-theme="dark"] .tabs .tab.on { background: rgba(122, 140, 255, .28) !important; color: #FFFFFF !important; box-shadow: inset 0 0 0 1px rgba(160, 175, 255, .35) !important; }
html[data-theme="dark"] .side .chip-f, html[data-theme="dark"] .saring .chip-f { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .12) !important; color: #C9CEF2 !important; }
html[data-theme="dark"] .side .chip-f.on, html[data-theme="dark"] .saring .chip-f.on { background: var(--pu-grad) !important; border-color: transparent !important; color: #fff !important; }

/* ===== Kartu KPI Dashboard: animasi masuk, sparkline, cincin, heatmap ===== */
#homeKpi .kpi-x, #homeKpi2 .kpi-x { position: relative; overflow: hidden; transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease; animation: kpiIn .7s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms) backwards; }
#homeKpi .kpi-x:hover, #homeKpi2 .kpi-x:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 34px rgba(60, 80, 160, .18); }
#homeKpi .kpi-x .ic, #homeKpi2 .kpi-x .ic { transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
#homeKpi .kpi-x:hover .ic, #homeKpi2 .kpi-x:hover .ic { transform: rotate(-12deg) scale(1.12); }
@keyframes kpiIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.kpi-spark { display: block; width: 100%; height: 30px; margin-top: 6px; }
.ks-line { fill: none; stroke: #6F57E6; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: ksDraw 1.2s cubic-bezier(.2, .8, .2, 1) .35s forwards; }
.ks-dot { fill: #6F57E6; animation: ksPulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ksDraw { to { stroke-dashoffset: 0; } }
@keyframes ksPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .4; } }
.kpi-ring { width: 34px; height: 34px; position: absolute; right: 12px; bottom: 10px; }
.kr-track { fill: none; stroke: rgba(120, 130, 190, .18); stroke-width: 3.6; }
.kr-arc { fill: none; stroke: #17A97A; stroke-width: 3.6; stroke-linecap: round; transition: stroke-dasharray 1.1s cubic-bezier(.2, .8, .2, 1); }
.kpi-heat { grid-column: 1 / -1; margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 12px 30px rgba(60, 80, 160, .10); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.kh-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.kh-h b { font-size: 13px; color: #14183A; }
.kh-h small { font-size: 11.5px; color: var(--muted); }
.kh-grid { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; }
.kh-c { display: block; height: 26px; border-radius: 7px; background: linear-gradient(180deg, rgba(91, 109, 240, calc(.1 + var(--lv, 0) * .85)), rgba(122, 98, 232, calc(.1 + var(--lv, 0) * .85))); transform-origin: bottom; animation: khRise .6s cubic-bezier(.2, .8, .2, 1) backwards; transition: transform .2s ease; }
.kh-c:hover { transform: scaleY(1.12); }
@keyframes khRise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.kh-l { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .kpi-heat { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .kh-h b { color: #EEF0FF; }
html[data-theme="dark"] .kh-h small, html[data-theme="dark"] .kh-l { color: #9AA3CF; }
@media (prefers-reduced-motion: reduce) {
  #homeKpi .kpi-x, #homeKpi2 .kpi-x, .ks-line, .ks-dot, .kh-c, .kr-arc { animation: none !important; transition: none !important; }
  .ks-line { stroke-dashoffset: 0; }
}

/* ===== Kartu KPI: gradasi lembut per kartu, gerak halus terus-menerus ===== */
#homeKpi .kpi-x, #homeKpi2 .kpi-x {
  background: linear-gradient(160deg, var(--g1, #fff) 0%, var(--g2, #eef) 100%) !important;
  border: 1px solid rgba(255, 255, 255, .9) !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 26px rgba(60, 80, 160, .10), inset 0 1px 0 rgba(255, 255, 255, .8);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
  animation: kpiIn .7s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms) backwards;
  overflow: hidden;
}
#homeKpi .kpi-x.kpi-still, #homeKpi2 .kpi-x.kpi-still { animation: none; }
#homeKpi .kpi-x::before, #homeKpi2 .kpi-x::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--acc), transparent); opacity: .9;
}
#homeKpi .kpi-x::after, #homeKpi2 .kpi-x::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; width: 45%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-18deg); animation: kpiShine 7s ease-in-out infinite; pointer-events: none;
}
#homeKpi .kpi-x:nth-child(2n)::after, #homeKpi2 .kpi-x:nth-child(2n)::after { animation-delay: 1.8s; }
#homeKpi .kpi-x:hover, #homeKpi2 .kpi-x:hover { transform: translateY(-4px) scale(1.012); box-shadow: 0 18px 36px rgba(60, 80, 160, .18); }
#homeKpi .kpi-x .kpi-ic, #homeKpi2 .kpi-x .kpi-ic {
  background: rgba(255, 255, 255, .75) !important; color: var(--acc) !important; box-shadow: 0 6px 14px rgba(40, 60, 140, .12);
  animation: kpiBob 4.2s ease-in-out infinite; transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}
#homeKpi .kpi-x:hover .kpi-ic, #homeKpi2 .kpi-x:hover .kpi-ic { transform: rotate(-10deg) scale(1.1); }
#homeKpi .kpi-x .kpi-v, #homeKpi2 .kpi-x .kpi-v { color: #14183A; }
#homeKpi .kpi-x .kpi-l, #homeKpi2 .kpi-x .kpi-l { color: #4A5280; }
#homeKpi .kpi-x .kpi-s, #homeKpi2 .kpi-x .kpi-s { color: var(--muted); }
#homeKpi .kpi-x .ks-line, #homeKpi2 .kpi-x .ks-line { stroke: var(--acc); }
#homeKpi .kpi-x .ks-dot, #homeKpi2 .kpi-x .ks-dot { fill: var(--acc); }
@keyframes kpiShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
@keyframes kpiBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
html[data-theme="dark"] #homeKpi .kpi-x, html[data-theme="dark"] #homeKpi2 .kpi-x {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)) !important;
  border-color: rgba(255, 255, 255, .08) !important;
}
html[data-theme="dark"] #homeKpi .kpi-x .kpi-v, html[data-theme="dark"] #homeKpi2 .kpi-x .kpi-v { color: #EEF0FF; }
html[data-theme="dark"] #homeKpi .kpi-x .kpi-l, html[data-theme="dark"] #homeKpi2 .kpi-x .kpi-l { color: #C9CEF2; }
html[data-theme="dark"] #homeKpi .kpi-x .kpi-s, html[data-theme="dark"] #homeKpi2 .kpi-x .kpi-s { color: #9AA3CF; }
html[data-theme="dark"] #homeKpi .kpi-x .kpi-ic, html[data-theme="dark"] #homeKpi2 .kpi-x .kpi-ic { background: rgba(255, 255, 255, .08) !important; }
@media (prefers-reduced-motion: reduce) {
  #homeKpi .kpi-x::after, #homeKpi2 .kpi-x::after, #homeKpi .kpi-x .kpi-ic, #homeKpi2 .kpi-x .kpi-ic { animation: none !important; }
}

/* Layar lebih sempit dari 1100px: delapan kartu KPI dalam satu baris yang bisa digeser */
@media (max-width: 1100px) {
  #v-home .home-kpis { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 158px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; scrollbar-width: thin; }
  #v-home .home-kpis .kpi { scroll-snap-align: start; }
}

/* Kartu KPI dibuat statis: tanpa animasi masuk, kilau, ikon melayang, atau hover bergerak */
#homeKpi .kpi-x, #homeKpi2 .kpi-x, #homeKpi .kpi-x:hover, #homeKpi2 .kpi-x:hover { animation: none !important; transition: none !important; transform: none !important; }
#homeKpi .kpi-x::after, #homeKpi2 .kpi-x::after { display: none !important; animation: none !important; }
#homeKpi .kpi-x .kpi-ic, #homeKpi2 .kpi-x .kpi-ic, #homeKpi .kpi-x:hover .kpi-ic, #homeKpi2 .kpi-x:hover .kpi-ic { animation: none !important; transition: none !important; transform: none !important; }
#homeKpi .kpi-x .ks-line, #homeKpi2 .kpi-x .ks-line { animation: none !important; stroke-dashoffset: 0 !important; }
#homeKpi .kpi-x .ks-dot, #homeKpi2 .kpi-x .ks-dot { animation: none !important; }

/* Pembayaran: panel "Hubungkan Tripay dulu" disembunyikan di layar ini, hero naik ke atas */
#v-bayar #payCfg { display: none !important; }
#v-bayar > .pay-pane:first-child, #v-bayar #pt-link { padding-top: 0 !important; margin-top: 0 !important; }

/* Pembayaran: hero dibuat lebih ringkas */
#v-bayar .lk-hero { padding: 12px 16px !important; border-radius: 18px !important; }
#v-bayar .lk-hero-t { gap: 10px; }
#v-bayar .lk-hero-ic { width: 36px !important; height: 36px !important; border-radius: 11px !important; }
#v-bayar .lk-hero-ic svg { width: 18px !important; height: 18px !important; }
#v-bayar .lk-hero-t b { font-size: 16px !important; }
#v-bayar .lk-hero-t span { font-size: 12px !important; }
#v-bayar .lk-hero .keu-k { padding: 8px 12px !important; min-width: 0; }
#v-bayar .lk-hero .keu-k b { font-size: 16px !important; }
#v-bayar .lk-hero .keu-k span { font-size: 11px !important; }
#v-bayar .lk-hero .lk-saldo { margin: 8px 0 8px !important; padding: 0 0 8px !important; }
#v-bayar .lk-hero .lk-saldo .keu-s { padding: 6px 10px !important; min-width: 0 !important; }
#v-bayar .lk-hero .lk-saldo .keu-s b { font-size: 14px !important; }
#v-bayar .lk-hero .lk-gw, #v-bayar .lk-hero [class*="gw"] { margin-top: 6px !important; }

/* Pembayaran: judul hero dihilangkan, sisa hero dirapatkan */
#v-bayar .lk-hero .lk-hero-t { display: none !important; }
#v-bayar .lk-hero { padding: 10px 14px !important; }
#v-bayar .lk-hero .lk-saldo { margin: 0 0 6px !important; padding: 0 0 6px !important; }

/* Pembayaran: kotak Total saldo semua akun dibuat lebih besar */
#v-bayar .lk-hero .lk-saldo .keu-s.tot { padding: 12px 18px !important; min-width: 200px !important; border-radius: 16px !important; }
#v-bayar .lk-hero .lk-saldo .keu-s.tot span { font-size: 12.5px !important; }
#v-bayar .lk-hero .lk-saldo .keu-s.tot b { font-size: 24px !important; letter-spacing: -.02em; }

/* Pembayaran: kartu Tagihan dipersempit; filter hanya "Semua" */
#v-bayar #payF button:not(:first-child) { display: none !important; }
@media (min-width: 1101px) {
  #v-bayar .lk-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, .75fr) !important; }
}

/* Pembayaran: gerbang yang sudah terhubung menyala hijau dan berdenyut */
#v-bayar .lk-gwc.on { background: rgba(74, 222, 128, .2) !important; border-color: rgba(74, 222, 128, .8) !important; color: #fff !important; animation: gwGlow 2.2s ease-in-out infinite; }
#v-bayar .lk-gwc.on b, #v-bayar .lk-gwc.on small, #v-bayar .lk-gwc.on span { color: #E8FFF1 !important; }
#v-bayar .lk-gwc.on i { background: #4ADE80 !important; animation: gwDot 1.6s ease-out infinite; }
@keyframes gwGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .35), 0 0 12px rgba(74, 222, 128, .25); } 50% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0), 0 0 22px rgba(74, 222, 128, .6); } }
@keyframes gwDot { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); } 100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { #v-bayar .lk-gwc.on, #v-bayar .lk-gwc.on i { animation: none !important; } }

/* Pembayaran: lima angka hero satu baris rata kiri, tidak terpisah baris */
#v-bayar .lk-hero .lk-stats { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 8px !important; justify-content: stretch !important; max-width: 720px; }
#v-bayar .lk-hero .lk-stat { min-width: 0 !important; padding: 8px 10px !important; }
#v-bayar .lk-hero .lk-stat b { font-size: 15px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#v-bayar .lk-hero .lk-stat span { font-size: 11px !important; white-space: normal; line-height: 1.25; }
@media (max-width: 1100px) { #v-bayar .lk-hero .lk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

/* Pembayaran: saldo per akun ditampilkan di Laporan Keuangan (tab Akun & Neraca), bukan di sini */
#v-bayar .lk-hero .lk-saldo { display: none !important; }

/* Dashboard: baris delapan kartu KPI dihilangkan */
#v-home .home-kpis { display: none !important; }

/* Jam sibuk: lebih kecil, batang 3D yang naik beranimasi */
.kpi-heat { margin-top: 10px; padding: 10px 14px 8px; border-radius: 16px; }
.kh-h b { font-size: 12px; }
.kh-h small { font-size: 10.5px; }
.kh-grid { display: flex; align-items: flex-end; gap: 5px; height: 60px; perspective: 500px; }
.kh-c {
  flex: 1 1 0; min-width: 0; height: calc(10% + var(--lv, 0) * 90%); min-height: 6px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #B4C0FF 0%, #6E7BF5 55%, #4B56CC 100%);
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, .35), inset -3px 0 0 rgba(20, 20, 80, .18), 0 6px 12px rgba(75, 86, 204, calc(.12 + var(--lv, 0) * .3));
  transform-origin: bottom; transform: rotateX(16deg);
  animation: khRise .8s cubic-bezier(.2, .8, .2, 1) backwards;
  transition: transform .25s ease, filter .25s ease;
}
.kh-c:hover { transform: rotateX(0deg) translateY(-3px) scale(1.06); filter: brightness(1.12); }
@keyframes khRise { from { transform: rotateX(16deg) scaleY(0); opacity: 0; } to { transform: rotateX(16deg) scaleY(1); opacity: 1; } }
.kh-l { font-size: 10px; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .kh-c { animation: none !important; transition: none !important; } }

/* Dashboard: kartu tabel "Semua pelanggan" dihilangkan */
#homePel > .card.tbl { display: none !important; }

/* ===== Footer sidebar: rapi dalam kartu-kartu kaca ===== */
.nav-foot { display: flex; flex-direction: column; gap: 10px; padding: 10px 4px 4px; }
.nav-foot .tools {
  display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px !important;
  padding: 10px; border-radius: 18px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 10px 24px rgba(60, 80, 160, .10);
}
.nav-foot .tools .tsep { display: none !important; }
.nav-foot .tools .pill { grid-column: 1 / -1; justify-self: start; }
.nav-foot .tools #dutyBtn { grid-column: 1 / -1; width: 100%; height: 36px; border-radius: 12px; font-weight: 700; }
.nav-foot .tools #soundBtn, .nav-foot .tools #notifBtn { width: 100%; height: 36px; border-radius: 12px; justify-content: center; font-size: 11.5px; }
.nav-foot .tools #soundBtn .lb, .nav-foot .tools #notifBtn .lb { font-size: 11.5px; }
.nav-foot .tools #installBtn { grid-column: 1 / -1; }
.nav-foot .me {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 18px;
  background: rgba(255, 255, 255, .6); border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 10px 24px rgba(60, 80, 160, .10); color: #14183A;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.nav-foot .me b, .nav-foot .me #meName { color: #14183A !important; }
.nav-foot .me small, .nav-foot .me #meSt { color: var(--muted) !important; }
.nav-foot .me button, .nav-foot .me .btn { margin-left: auto; }
.nav-foot > .sec-status, .nav-foot > #secBtn { color: #5A6290; }
html[data-theme="dark"] .nav-foot .tools, html[data-theme="dark"] .nav-foot .me {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .08); box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .nav-foot .me b, html[data-theme="dark"] .nav-foot .me #meName { color: #EEF0FF !important; }
html[data-theme="dark"] .nav-foot .me small, html[data-theme="dark"] .nav-foot .me #meSt { color: #9AA3CF !important; }

/* ===== Notifikasi dalam panel (lonceng) ===== */
#notifBtn { position: relative; }
#notifBtn .ib-n { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: linear-gradient(135deg, #FF8A7A, #E0473F); color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 4px 10px rgba(224, 71, 63, .4); animation: ibPulse 1.8s ease-in-out infinite; }
#notifBtn .ib-n.hidden { display: none; }
@keyframes ibPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.ip-pop { position: fixed; z-index: 330; width: 320px; max-height: 60vh; display: flex; flex-direction: column; border-radius: 20px; background: rgba(255, 255, 255, .88); border: 1px solid rgba(255, 255, 255, .95); box-shadow: 0 24px 60px rgba(40, 50, 110, .25); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .22s ease, transform .25s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.ip-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.ip-pop.hidden { display: none; }
.ip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 8px; border-bottom: 1px solid rgba(120, 130, 190, .18); }
.ip-head > b { font-size: 14px; color: #14183A; }
.ip-acts { display: flex; gap: 6px; }
.ip-acts button { border: 0; background: none; font-size: 11.5px; font-weight: 700; color: #5B6CF0; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.ip-acts button:hover { background: rgba(91, 108, 240, .1); }
.ip-list { overflow-y: auto; padding: 6px; display: grid; gap: 4px; }
.ip-row { text-align: left; border: 0; border-radius: 14px; padding: 9px 11px; background: rgba(255, 255, 255, .55); cursor: pointer; display: grid; gap: 2px; transition: background .2s, transform .2s; }
.ip-row:hover { background: #fff; transform: translateX(2px); }
.ip-row b { font-size: 12.5px; color: #14183A; }
.ip-row span { font-size: 12px; color: #4A5280; }
.ip-row small { font-size: 10.5px; color: #8A92B5; }
.ip-row.new { background: linear-gradient(135deg, rgba(91, 141, 255, .16), rgba(122, 98, 232, .14)); box-shadow: inset 3px 0 0 #6E7BF5; }
.ip-empty { margin: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }
html[data-theme="dark"] .ip-pop { background: rgba(20, 22, 44, .9); border-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .ip-head > b { color: #EEF0FF; }
html[data-theme="dark"] .ip-row { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .ip-row:hover { background: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .ip-row b { color: #EEF0FF; }
html[data-theme="dark"] .ip-row span { color: #C9CEF2; }

/* Foto di chat: tanpa bingkai gelembung (berlaku untuk foto yang dikirim maupun diterima) */
.bubble:has(> img.pic) { padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; overflow: hidden; }
.bubble:has(> img.pic)::before { display: none !important; }
.bubble > img.pic { display: block; margin: 0; border-radius: 16px; box-shadow: 0 6px 16px rgba(40, 50, 110, .14); }

/* Billing: kolom Pelanggan lebih rapi, status online/offline */
.bpl-a b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
.bpl-st { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(120, 130, 190, .12); color: var(--muted); }
.bpl-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #A3AACB; }
.bpl-st.on { background: rgba(37, 168, 102, .14); color: #15803D; }
.bpl-st.on::before { background: #25A866; box-shadow: 0 0 0 0 rgba(37, 168, 102, .6); animation: onPulse 1.8s ease-out infinite; }
.bpl-st.off { background: rgba(224, 71, 63, .08); color: #B42318; }
.bpl-st.off::before { background: #E0473F; }
@keyframes onPulse { 0% { box-shadow: 0 0 0 0 rgba(37, 168, 102, .6); } 100% { box-shadow: 0 0 0 8px rgba(37, 168, 102, 0); } }
@media (prefers-reduced-motion: reduce) { .bpl-st.on::before { animation: none; } }
html[data-theme="dark"] .bpl-st { background: rgba(255, 255, 255, .07); color: #9AA3CF; }
html[data-theme="dark"] .bpl-st.on { color: #7DE3A8; background: rgba(37, 168, 102, .18); }
html[data-theme="dark"] .bpl-st.off { color: #FFA59E; background: rgba(224, 71, 63, .14); }

/* Pengaturan billing: tiga bagian dengan judul masing-masing */
.bil-atur .bset { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid #F0EEF5; }
.bil-atur .bset:first-of-type { border-top: 0; padding-top: 0; }
.bil-atur .bset-h { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bil-atur .bset .bgrid { gap: 10px 12px; }
/* Pengaturan billing: checkbox sejajar dengan label field, jarak antar bagian seragam */
.bil-atur .bset .bcheck { font-size: 12.5px; padding: 4px 0; align-items: flex-start; }
.bil-atur .bset .bcheck input { margin-top: 2px; flex: 0 0 auto; }
.bil-atur .bset .bcheck span { line-height: 1.5; }
.bil-atur .bset-h { margin-bottom: 2px; }

/* Form pelanggan: tiga bagian (data, paket & tagihan, akun MikroTik) dan baris password */
.bil-dlg .bdlg-s, .bil-baru .bdlg-s { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid #F0EEF5; }
.bil-dlg .bdlg-s:first-of-type, .bil-baru .bdlg-s:first-of-type { border-top: 0; padding-top: 0; }
.bil-dlg .bdlg-h, .bil-baru .bdlg-h { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.bil-dlg .bdlg-s .bgrid, .bil-baru .bdlg-s .bgrid { gap: 10px 12px; }
.bil-dlg .bpass, .bil-baru .bpass { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.bil-dlg .bpass input, .bil-baru .bpass input { flex: 1 1 150px; width: auto; min-width: 0; }
.bil-dlg .bpass .bbtn, .bil-baru .bpass .bbtn { height: 40px; white-space: nowrap; }
.bil-dlg .bhint, .bil-baru .bhint { color: var(--muted); font-size: 12px; }
/* atribut hidden harus menang atas display dari kelas .bf / .bcheck di dalam dialog */
.bil-dlg [hidden], .bil-baru [hidden] { display: none !important; }

.bil-baru { max-width: 760px; }

/* Judul kartu Beranda + tautan panjang (mis. "Billing Rumahan"): tautan pindah ke bawah judul bila tidak muat, tidak terpotong */
#v-home .home-sec-h { flex-wrap: wrap; gap: 2px 10px; }
#v-home .home-sec-h .link-btn { white-space: nowrap; }

/* Data akun PPPoE pelanggan baru: kotak teks siap salin */
.bil-baru .bakun { margin: 10px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #ECEAF3; background: #F7F6FB; font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; user-select: all; }
html[data-theme="dark"] .bil-baru .bakun { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }

/* Tema gelap: daftar pelanggan & tagihan tidak lagi memakai garis dan latar putih */
html[data-theme="dark"] .bpl,
html[data-theme="dark"] .brow { border-top-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .bpl:not(.bpl-head):hover,
html[data-theme="dark"] .brow:hover { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .bpl-row + .bpl-row,
html[data-theme="dark"] .brow + .brow { box-shadow: 0 -1px 0 rgba(255, 255, 255, .08); }
html[data-theme="dark"] .bpl-row:hover + .bpl-row,
html[data-theme="dark"] .brow:hover + .brow { box-shadow: none; }
html[data-theme="dark"] .bpl-head { border-bottom-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .bjt-bar { background: rgba(255, 255, 255, .1); }

/* Tema gelap: bilah tab dan kotak pencarian di Billing tidak lagi putih terang */
html[data-theme="dark"] .btabs { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); box-shadow: none; }
html[data-theme="dark"] .bcari { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
html[data-theme="dark"] .bcari input { color: #EEF0FF; }
html[data-theme="dark"] .bcari input::placeholder { color: #8E96C2; }

/* Tema gelap: halaman Billing (Paket, Tagihan, Pelanggan, Pengaturan) tidak lagi memakai kotak, teks, dan garis terang */
html[data-theme="dark"] .bil-card input:not([type="checkbox"]),
html[data-theme="dark"] .bil-card select,
html[data-theme="dark"] .bil-card textarea,
html[data-theme="dark"] .bf input, html[data-theme="dark"] .bf select, html[data-theme="dark"] .bf textarea,
html[data-theme="dark"] .bil-dlg input:not([type="checkbox"]),
html[data-theme="dark"] .bil-dlg select, html[data-theme="dark"] .bil-dlg textarea,
html[data-theme="dark"] .bsel,
html[data-theme="dark"] .bil-bar .bsel { background: rgba(255, 255, 255, .06); color: #EEF0FF; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .bil-card input::placeholder, html[data-theme="dark"] .bf input::placeholder { color: #8E96C2; }
html[data-theme="dark"] .bil-card hr, html[data-theme="dark"] .bil-card .gfx,
html[data-theme="dark"] .bil-paket-f, html[data-theme="dark"] .gfx { border-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .bil-card hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .1); background: none; }
html[data-theme="dark"] .gfx-judul, html[data-theme="dark"] .bil-card h3 { color: #EEF0FF; }
html[data-theme="dark"] .gfx-pbar { background: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .bpk { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .bpk b { color: #EEF0FF; }
html[data-theme="dark"] .bpk small { color: #9AA3CF; }
html[data-theme="dark"] .bpk-h { color: #8FB4FF; }
html[data-theme="dark"] .bmk-kartu { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12) !important; }

/* Tema gelap: tombol pilihan cepat tidak putih */
html[data-theme="dark"] .lk-chips button, html[data-theme="dark"] .lk-cepat button { background: rgba(255, 255, 255, .08); color: #EEF0FF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
html[data-theme="dark"] .lk-dur button.on, html[data-theme="dark"] .lk-durasi button.on { background: #7B68D9; color: #fff; }
html[data-theme="dark"] .lk-dur button:not(.on), html[data-theme="dark"] .lk-durasi button:not(.on) { background: transparent; color: #C9CDE8; }

/* Tema gelap: kartu pratinjau pembayaran ikut gelap (sebelumnya latarnya digelapkan skrip tapi teksnya tetap gelap, jadi sulit dibaca) */
html[data-theme="dark"] .lk-pv .lk-pv-c { background: #1A1D3A !important; border: 1px solid rgba(255, 255, 255, .10); }
html[data-theme="dark"] .lk-pv-c, html[data-theme="dark"] .lk-pv-c * { color: #EEF0FF !important; }
html[data-theme="dark"] .lk-pv-c small, html[data-theme="dark"] .lk-pv-c .lk-pv-row span { color: #A9B0D6 !important; }
html[data-theme="dark"] .lk-pv-row { border-top-color: rgba(255, 255, 255, .10); }
html[data-theme="dark"] .lk-pv-c .lk-pv-m span { background: rgba(122, 140, 255, .18) !important; color: #C9D0FF !important; }
/* Tema gelap: lencana dan kotak berwarna ungu muda (#EEEAFB) */
html[data-theme="dark"] .t-teal, html[data-theme="dark"] .c-done, html[data-theme="dark"] .mod-st.lock,
html[data-theme="dark"] .msg-sys.ok, html[data-theme="dark"] #infoBtn.on { background: rgba(122, 140, 255, .18); color: #C9D0FF; }
html[data-theme="dark"] .lic-made { background: rgba(122, 140, 255, .10); }

/* Tema gelap di SEMUA menu: dialog, isian, dan elemen putih yang tersisa dibuat gelap */
html[data-theme="dark"] .sec-dlg { background: #1A1D3A; color: #EEF0FF; border: 1px solid rgba(255, 255, 255, .12); }
html[data-theme="dark"] .sec-dlg h1, html[data-theme="dark"] .sec-dlg h2, html[data-theme="dark"] .sec-dlg h3, html[data-theme="dark"] .sec-dlg h4 { color: #EEF0FF; }
html[data-theme="dark"] .sec-dlg p, html[data-theme="dark"] .sec-dlg small, html[data-theme="dark"] .sec-dlg label { color: #A9B0D6; }
html[data-theme="dark"] .sec-dlg input, html[data-theme="dark"] .sec-dlg select, html[data-theme="dark"] .sec-dlg textarea { background: rgba(255, 255, 255, .06); color: #EEF0FF; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .todo-i { background: rgba(255, 255, 255, .08); color: #EEF0FF; }
html[data-theme="dark"] .ch-toggle { background: rgba(255, 255, 255, .08); color: #C9B8FF; }
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), html[data-theme="dark"] select, html[data-theme="dark"] textarea { color-scheme: dark; }

/* Tema gelap: chip filter Billing dan tombol ghost tidak putih */
html[data-theme="dark"] .bchip { background: rgba(255, 255, 255, .07); color: #C9CDE8; border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .bchip.on { background: #5B45C9; color: #fff; border-color: #5B45C9; }
html[data-theme="dark"] .btn.ghost { background: rgba(255, 255, 255, .07); color: #A9B6FF; border-color: rgba(255, 255, 255, .12); }

/* Tema gelap: kartu tagihan/tautan pembayaran tidak lagi berlatar putih, dan sorot "baru" tidak berkedip putih */
html[data-theme="dark"] .lk-it { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
html[data-theme="dark"] .lk-it:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .18); box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
html[data-theme="dark"] .lk-it.fresh { animation: lkFreshGelap 1.6s ease; }
@keyframes lkFreshGelap { 0% { box-shadow: 0 0 0 0 rgba(123, 104, 217, .55); background: rgba(123, 104, 217, .22); } 100% { box-shadow: 0 0 0 14px rgba(123, 104, 217, 0); background: rgba(255, 255, 255, .04); } }

/* Tema gelap: kartu tagihan tidak lagi memutar animasi masuk setiap daftar diperbarui (sumber kedipan yang tersisa) */
html[data-theme="dark"] .lk-it.in { animation: none; }

/* Tema gelap: tombol aksi pada kartu tagihan tidak putih (sebelumnya teks terang di atas latar putih, sehingga kosong dan berkedip saat disorot) */
html[data-theme="dark"] .lk-b { background: rgba(255, 255, 255, .07); color: #C9CDE8; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .lk-b:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); transform: none; }
html[data-theme="dark"] .lk-b.ok { color: #6EE7A0; }
html[data-theme="dark"] .lk-b.ok:hover { background: rgba(37, 168, 102, .18); border-color: rgba(37, 168, 102, .4); }
html[data-theme="dark"] .lk-b.danger { color: #FFA59E; }
html[data-theme="dark"] .lk-b.danger:hover { background: rgba(224, 71, 63, .16); border-color: rgba(224, 71, 63, .4); }
html[data-theme="dark"] .lk-ask { color: #A9B0D6; }

/* Daftar ONU OLT: dikelompokkan per port PON, bisa dibuka, dan memakai warna online/offline */
.olt-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.olt-port { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; background: #fff; }
.olt-port > summary { cursor: pointer; font-weight: 700; font-size: 13.5px; padding: 4px 0; }
.olt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 8px; }
.olt-onu { font-size: 12px; font-weight: 600; padding: 5px 8px; border-radius: 8px; text-align: center; }
.olt-onu.online { background: rgba(37, 168, 102, .14); color: #15803D; }
.olt-onu.offline { background: rgba(224, 71, 63, .08); color: #B42318; }
.olt-onu.lain { background: #F1F1F6; color: #4B5577; }
.olt-onu.klik { cursor: pointer; }
.olt-onu.klik:hover { filter: brightness(.96); outline: 1px solid currentColor; }
.olt-detail .olt-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; }
.olt-detail .olt-kv .k { color: #4B5577; }
.olt-detail .olt-kv .v { font-weight: 600; word-break: break-word; }
.olt-detail .bil-note { margin-top: 12px; }
.olt-tabel { display: grid; gap: 14px; margin-top: 12px; }
.olt-tabel-bungkus { overflow-x: auto; }
.olt-tabel h4 { margin: 0 0 6px; font-size: 14px; }
.olt-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.olt-tbl th, .olt-tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.olt-tbl th { color: #4B5577; font-weight: 600; }
html[data-theme="dark"] .olt-tbl th { color: #A9AECB; }

/* OLT: tampilan baru (ov-*) */
.ov { display: grid; gap: 14px; min-width: 0; }
.ov-kepala { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ov-id { display: grid; gap: 2px; min-width: 0; }
.ov-judul { margin: 0; font-size: 18px; }
.ov-kecil { font-size: 12px; color: #5B6482; }
.ov-aksi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ov-chip { display: inline-flex; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #EEF0FF; color: #4F46E5; }
.ov-chip.on { background: #E7F6EE; color: #15803D; }
.ov-chip.off { background: #FDECEA; color: #B42318; }
.ov-kosong { color: #5B6482; margin: 4px 0; }
.ov-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .ov-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ov-kartu { border: 1px solid #E4E7F0; border-radius: 12px; padding: 12px; display: grid; gap: 2px; min-width: 0; }
.ov-angka { font-size: 24px; font-variant-numeric: tabular-nums; }
.ov-angka.on { color: #15803D; }
.ov-angka.warn { color: #B45309; }
.ov-tab { display: flex; gap: 6px; overflow-x: auto; }
.ov-tab button { min-height: 36px; padding: 7px 12px; white-space: nowrap; border: 1px solid #E4E7F0; border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.ov-tab button[aria-selected="true"] { background: #EEF0FF; border-color: transparent; color: #4F46E5; font-weight: 600; }
.ov-alat { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ov-cari { flex: 1 1 200px; min-width: 0; font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid #E4E7F0; min-height: 40px; background: transparent; color: inherit; }
.ov-seg { display: inline-flex; border: 1px solid #E4E7F0; border-radius: 10px; overflow: hidden; }
.ov-seg button { border: 0; border-radius: 0; min-height: 40px; padding: 8px 12px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.ov-seg button[aria-pressed="true"] { background: #EEF0FF; color: #4F46E5; font-weight: 600; }
.ov-tabel { overflow-x: auto; }
.ov-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ov-tbl th, .ov-tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #E4E7F0; white-space: nowrap; }
.ov-tbl th { font-size: 12px; color: #5B6482; font-weight: 600; }
.ov-tbl tr.klik { cursor: pointer; }
.ov-tbl tr.klik:hover { background: #EEF0FF; }
.ov-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: #15803D; }
.ov-dot.off { background: #B42318; }
.ov-port-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ov-port { border: 1px solid #E4E7F0; border-radius: 12px; padding: 12px; display: grid; gap: 8px; min-width: 0; }
.ov-port-atas { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ov-track { height: 8px; border-radius: 8px; overflow: hidden; background: #FDECEA; }
.ov-track i { display: block; height: 100%; background: #15803D; }
.ov-onu-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.ov-onu { font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; border: 0; min-height: 28px; background: #E7F6EE; color: #15803D; cursor: pointer; }
.ov-onu.off { background: #FDECEA; color: #B42318; }
.ov-hero-isi { grid-column: 1 / -1; display: grid; gap: 12px; min-width: 0; width: 100%; }
.ov-hero-isi .bil-kpi { min-width: 0; }
/* label angka di hero: ukuran dan kontras cukup di atas latar ungu */
.ov-hero-isi .bil-k span, .ov-hero-isi .bil-k small { font-size: 12px; line-height: 1.3; color: #FFFFFF; opacity: .95; }
.ov-hero-isi .bil-k b { color: #FFFFFF; }
.ov-hero-isi .bil-hero-t b { letter-spacing: normal; white-space: nowrap; }
/* tombol dan chip di atas latar hero yang berwarna: beri warna eksplisit agar terbaca */
.ov-hero-isi button { background: #FFFFFF; color: #1B1E3A; border: 1px solid rgba(255,255,255,.7); font-weight: 600; }
.ov-hero-isi button.bbtn.primer { background: #FFFFFF; color: #4F46E5; border-color: #FFFFFF; box-shadow: 0 6px 16px rgba(20,16,60,.25); }
.ov-hero-isi button:disabled { opacity: .7; }
.ov-hero-isi .ov-chip { background: rgba(255,255,255,.24); color: #FFFFFF; }
.ov-hero-isi .ov-chip.on { background: #E7F6EE; color: #15803D; }
.ov-hero-isi .ov-chip.off { background: #FDECEA; color: #B42318; }
.ov-panel { display: grid; gap: 10px; min-width: 0; }
.ov-panel[hidden] { display: none !important; }
.ov-mentah { font-size: 12px; }
.ov-pre { white-space: pre-wrap; font: 12px/1.5 ui-monospace, Consolas, monospace; max-height: 220px; overflow: auto; }
html[data-theme="dark"] .ov-kecil, html[data-theme="dark"] .ov-kosong { color: #9AA3C2; }
html[data-theme="dark"] .ov-chip { background: #232A4D; color: #8B87FF; }
html[data-theme="dark"] .ov-chip.on { background: #13301F; color: #6EE7A0; }
html[data-theme="dark"] .ov-chip.off { background: #3A1D1B; color: #FF9B92; }
html[data-theme="dark"] .ov-angka.on { color: #6EE7A0; }
html[data-theme="dark"] .ov-angka.warn { color: #F5C27A; }
html[data-theme="dark"] .ov-tab button[aria-selected="true"], html[data-theme="dark"] .ov-seg button[aria-pressed="true"] { background: #232A4D; color: #8B87FF; }
html[data-theme="dark"] .ov-onu { background: #13301F; color: #6EE7A0; }
html[data-theme="dark"] .ov-onu.off { background: #3A1D1B; color: #FF9B92; }
html[data-theme="dark"] .ov-track { background: #3A1D1B; }
html[data-theme="dark"] .ov-track i, html[data-theme="dark"] .ov-dot { background: #6EE7A0; }
html[data-theme="dark"] .ov-dot.off { background: #FF9B92; }
html[data-theme="dark"] .ov-tbl th { color: #9AA3C2; }
html[data-theme="dark"] .ov-tbl tr.klik:hover { background: #232A4D; }
html[data-theme="dark"] .olt-port { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
html[data-theme="dark"] .olt-port > summary { color: #EEF0FF; }
html[data-theme="dark"] .olt-onu.online { background: rgba(37, 168, 102, .22); color: #7DE3A8; }
html[data-theme="dark"] .olt-onu.offline { background: rgba(224, 71, 63, .16); color: #FFA59E; }
html[data-theme="dark"] .olt-onu.lain { background: rgba(255, 255, 255, .08); color: #C9CDE8; }
html[data-theme="dark"] .olt-detail .olt-kv .k { color: #A9AECB; }

/* Pengaturan OLT ZTE: formulir dibuat lebih kecil dan ringkas */
.olt-form { max-width: 680px; padding: 14px 16px; }
.olt-form h3 { font-size: 15px; }
.olt-form .sub { font-size: 12px; margin-bottom: 10px; }
.olt-form .bgrid { gap: 8px 10px; }
.olt-form .bf { font-size: 11.5px; }
.olt-form .bf input, .olt-form .bf select { height: 34px; font-size: 13px; padding: 0 10px; margin-top: 3px; border-radius: 9px; }
.olt-form .bpass { gap: 4px; }
.olt-form .bpass .bbtn, .olt-form .bbtn { height: 34px; font-size: 12px; padding: 0 12px; }
.olt-form .bmk-kartu { padding: 10px 12px; margin: 8px 0; }
.olt-form .bmk-kartu small { font-size: 12px; }
.olt-form .bcheck { font-size: 12px; padding: 4px 0; }
/* Hero OLT: kartu statistik */
.bil-hero .bil-k { cursor: default; }

/* Daftar Pelanggan: kartu ringkas per pelanggan (kp-*) */
#bilPelList.bil-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 720px) { #bilPelList.bil-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #bilPelList.bil-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bpl-row.kp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 12px; border: 1px solid #E4E6F0; border-radius: 14px; background: #FFFFFF; position: relative; overflow: hidden; min-width: 0; font-size: 12.5px; cursor: pointer; }
.bpl-row.kp::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #4F46E5; }
.bpl-row.kp.off::before { background: #B42318; }
.bpl-row.kp.bahaya::before { background: #B45309; }
.kp-atas { display: flex; align-items: center; gap: 9px; min-width: 0; }
.kp-id { display: grid; min-width: 0; flex: 1; }
.kp-id b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-id small { color: #5E6284; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-st { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none; background: #EEF0FF; color: #4F46E5; }
.kp-st::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.kp-st.on { background: #E7F6EE; color: #15803D; }
.kp-st.off { background: #FDECEA; color: #B42318; }
.kp-st.na { background: #EEF0FF; color: #4F46E5; }
.kp-st.na::before { display: none; }
.kp-nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.kp-nm b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-st.agen { background: #FFF4E0; color: #B45309; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
html[data-theme="dark"] .kp-st.agen { background: rgba(252,211,77,.14); color: #FCD34D; }
.kp-info { display: flex; flex-wrap: wrap; gap: 3px 12px; color: #5E6284; font-size: 11.5px; min-width: 0; }
.kp-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kp-kosong { font-style: italic; }
.kp-onu { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; background: #F6F6FC; border-radius: 10px; padding: 7px 9px; font-size: 11.5px; min-width: 0; }
.kp-onu b { font-variant-numeric: tabular-nums; }
.kp-onu.kosong { color: #5E6284; }
.kp-user { color: #5E6284; overflow-wrap: anywhere; }
.kp-bawah { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; flex-wrap: wrap; }
.kp-bawah .bpl-s { min-width: 0; flex: 1 1 110px; }
.kp-bawah .bpl-s .bar, .kp-bawah .bpl-s > div:last-child { max-width: 100%; width: 100%; }
.kp-aksi .bbtn.bwa { min-width: 0; }
.kp-aksi { display: flex; gap: 5px; flex: none; }
.kp-aksi .bbtn { height: 30px; font-size: 11.5px; padding: 0 9px; border-radius: 8px; }
html[data-theme="dark"] .bpl-row.kp { background: #1A1A38; border-color: rgba(255,255,255,.07); color: #EEEFFF; }
html[data-theme="dark"] .kp-id small, html[data-theme="dark"] .kp-info, html[data-theme="dark"] .kp-onu.kosong, html[data-theme="dark"] .kp-user { color: #9A9CC6; }
html[data-theme="dark"] .kp-st { background: rgba(139,135,255,.16); color: #8B87FF; }
html[data-theme="dark"] .kp-st.on { background: rgba(91,227,160,.13); color: #5BE3A0; }
html[data-theme="dark"] .kp-st.off { background: rgba(255,138,128,.13); color: #FF8A80; }
html[data-theme="dark"] .kp-onu { background: #222247; }
html[data-theme="dark"] .bpl-row.kp::before { background: #8B87FF; }
html[data-theme="dark"] .bpl-row.kp.off::before { background: #FF8A80; }
html[data-theme="dark"] .bpl-row.kp.bahaya::before { background: #FFC46B; }

/* ===== Mode gelap: perbaikan bercak terang dan teks yang sulit dibaca (diukur per halaman) =====
   Palet mengikuti tema gelap yang ada: permukaan #1A1D3A, teks #EEF0FF, teks sekunder #A9B0D6,
   chip status transparan (hijau #6EE7A0, merah #FFA59E, ungu #C4B5FD, kuning #FFD58A). */

/* Laci detail pelanggan: sebelumnya putih dengan teks terang (rasio sekitar 1,1:1) */
html[data-theme="dark"] .blaci-p { background: #1A1D3A; color: #EEF0FF; border-left: 1px solid rgba(255, 255, 255, .10); }
html[data-theme="dark"] .blaci-p h3, html[data-theme="dark"] .blaci-p b, html[data-theme="dark"] .blaci-p p { color: #EEF0FF; }
html[data-theme="dark"] .blaci-p h4, html[data-theme="dark"] .blaci-p small { color: #A9B0D6; }
html[data-theme="dark"] .blaci-info { background: rgba(255, 255, 255, .05); }
html[data-theme="dark"] .blaci-info dt { color: #A9B0D6; }
html[data-theme="dark"] .blaci-info dd { color: #EEF0FF; }
html[data-theme="dark"] .blaci-ak { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .10); color: #EEF0FF; }
html[data-theme="dark"] .blaci-ak:hover { background: rgba(255, 255, 255, .09); border-color: rgba(122, 140, 255, .45); }
html[data-theme="dark"] .blaci-ak .bic { background: rgba(122, 140, 255, .18); color: #B4BEFF; }

/* Tombol tutup bulat di laci dan dialog */
html[data-theme="dark"] .bx { background: rgba(255, 255, 255, .08); color: #EEF0FF; }
html[data-theme="dark"] .blaci-h .bx:hover { background: rgba(255, 255, 255, .14); }

/* Neraca: baris total sebelumnya terang dengan teks terang (rasio 1,04:1) */
html[data-theme="dark"] .nr-r { border-bottom-color: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .nr-r.tot { background: rgba(255, 255, 255, .06); color: #EEF0FF; }
html[data-theme="dark"] .nr-cek.ok { background: rgba(91, 227, 160, .14); color: #6EE7A0; }
html[data-theme="dark"] .nr-cek.bad { background: rgba(255, 138, 128, .14); color: #FFA59E; }

/* Catatan di dialog (mis. "Setelah ini lunas s/d ..."): sebelumnya rasio 1,94:1 */
html[data-theme="dark"] .bil-note { background: rgba(255, 196, 107, .12); color: #FFD58A; }
html[data-theme="dark"] .bpp-sum .bil-note { background: rgba(125, 180, 255, .12); color: #B8D4FF; }

/* Chip status tagihan */
html[data-theme="dark"] .pchip.p-bad { background: rgba(255, 138, 128, .16); color: #FFA59E; }
html[data-theme="dark"] .pchip.p-ok { background: rgba(91, 227, 160, .14); color: #6EE7A0; }
html[data-theme="dark"] .pchip.p-iso { background: rgba(167, 139, 250, .18); color: #C4B5FD; }

/* Sidebar dan kepala halaman: chip "Terhubung", ikon WhatsApp, avatar admin */
html[data-theme="dark"] .pill { background: rgba(91, 227, 160, .14); color: #6EE7A0; }
html[data-theme="dark"] .pill.off { background: rgba(255, 138, 128, .14); color: #FFA59E; }
html[data-theme="dark"] .i-wa { background: rgba(91, 227, 160, .14); color: #6EE7A0; }
/* Avatar diberi warna lewat atribut style oleh skrip (warna terang untuk tema terang), jadi perlu !important */
html[data-theme="dark"] .av { background: rgba(122, 140, 255, .20) !important; color: #D6DBFF !important; }

/* Batang progres (Dashboard, paket, grafik pelanggan): jalur terang menjadi jalur gelap */
html[data-theme="dark"] .kpi-bar, html[data-theme="dark"] .pk-bar, html[data-theme="dark"] .pc-tr { background: rgba(255, 255, 255, .10); }

/* Merah peringatan (--alert, mis. nominal yang belum dibayar) dirancang untuk latar putih. Di dalam laci dan dialog
   Billing yang latarnya gelap, token ini dibuat lebih terang. Tidak diubah global karena --alert juga dipakai
   sebagai latar tombol berteks putih di bagian lain. */
html[data-theme="dark"] .blaci-p, html[data-theme="dark"] .bil-dlg { --alert: #FF9B92; }

/* Kolom teks di kartu Billing (mis. pesan Broadcast) sebelumnya tetap putih */
html[data-theme="dark"] .bil-card textarea { background: rgba(255, 255, 255, .06); color: #EEF0FF; border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .bil-card textarea::placeholder { color: #8E96C2; }

/* Kontras kecil di kartu pelanggan */
html[data-theme="dark"] .kp-st, html[data-theme="dark"] .kp-st.na { color: #C3C0FF; }
html[data-theme="dark"] .bav { color: color-mix(in srgb, var(--c) 45%, #FFFFFF); }

/* Pembayaran: preset paket (sebelumnya kotak terang) dan tombol pilihan yang aktif.
   admin-theme.js meratakan latar terang menjadi abu-abu transparan, sehingga pilihan aktif sulit dibedakan;
   dengan warna gelap dari CSS, skrip itu tidak lagi menyentuh elemen ini. */
html[data-theme="dark"] .lk-pre { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); color: #EEF0FF; }
html[data-theme="dark"] .lk-pre small { color: #A9B0D6; }
html[data-theme="dark"] .lk-seg button.on, html[data-theme="dark"] .lk-f button.on { background: rgba(122, 140, 255, .24); color: #FFFFFF; border-color: #7A8CFF; }

/* Dialog Perpanjang: total yang diterima (sebelumnya biru #2468C9, rasio 3:1) */
html[data-theme="dark"] .bpp-tot b { color: #9DBBFF; }

/* ===== 3 gaya kartu panel (Fintech, Radial Score, Circular Progress), komponen di kartu3.js ===== */
.dk3, #v-home .card.dk3 {
  --dk-bg: #FFFFFF; --dk-fg: #14183A; --dk-mu: #6B6F93; --dk-tr: #EFEDF8; --dk-naik: #12965A; --dk-naik-bg: #E6F6EE; --dk-turun: #C8372D; --dk-turun-bg: #FDECEA;
  background: var(--dk-bg) !important; color: var(--dk-fg) !important; border: 1px solid rgba(124, 58, 237, .06) !important;
  border-radius: 22px !important; box-shadow: 0 1px 2px rgba(20, 24, 58, .04), 0 8px 24px rgba(76, 58, 154, .07) !important;
}
html[data-theme="dark"] .dk3, html[data-theme="dark"] #v-home .card.dk3 {
  --dk-bg: #1A1D3A; --dk-fg: #EEF0FF; --dk-mu: #A9B0D6; --dk-tr: rgba(255, 255, 255, .08); --dk-naik: #6EE7A0; --dk-naik-bg: rgba(91, 227, 160, .14); --dk-turun: #FFA59E; --dk-turun-bg: rgba(255, 138, 128, .14);
  border-color: rgba(255, 255, 255, .08) !important; box-shadow: 0 14px 34px rgba(0, 0, 0, .35) !important;
}
#v-home .card.dk3 h3, .dk3 .k3-h h4 { color: var(--dk-fg) !important; }
.dk3 .dk-per { font-size: 11.5px; font-weight: 600; color: var(--dk-mu); background: var(--dk-tr); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
#v-home .dk3 .link-btn { color: var(--brand) !important; }
html[data-theme="dark"] #v-home .dk3 .link-btn { color: #C4B5FD !important; }

/* 1. Modern Fintech Card: pendapatan */
#v-home .card.dk-fx, .k3.dk-fx { padding: 16px 18px 0 !important; display: flex; flex-direction: column; }
/* Kartu di dalam hero (bukan .card): ukuran, judul kecil, teks tidak ikut putih dari hero */
.k3 { box-sizing: border-box; min-width: 0; padding: 14px 16px; text-align: left; }
.k3 * { color: inherit; }
.k3 .k3-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.k3 .k3-h h4 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.k3.dk-rs .rs-w svg { max-width: 200px; }
.k3.dk-cp .cp-w svg { width: 96px; height: 96px; }
.k3.dk-cp .cp-t b { font-size: 18px; }
.k3.dk-fx { min-height: 0; }
.dk-fx .fx-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dk-fx .fx-lbl { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--dk-mu); }
.dk-fx .fx-ic { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--pu-grad); }
.dk-fx .fx-angka { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.dk-fx .fx-angka b { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--dk-fg); }
.dk-fx .fx-ch { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; }
.dk-fx .fx-ch.naik { color: var(--dk-naik); background: var(--dk-naik-bg); } .dk-fx .fx-ch.turun { color: var(--dk-turun); background: var(--dk-turun-bg); } .dk-fx .fx-ch.datar { color: var(--dk-mu); background: var(--dk-tr); }
.dk-fx .fx-sub { font-size: 12px; color: var(--dk-mu); margin-top: 4px; }
.dk-fx .fx-baris { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; }
.dk-fx .fx-mini { display: flex; gap: 22px; font-size: 11.5px; color: var(--dk-mu); flex-wrap: wrap; text-align: right; }
.dk-fx .fx-mini b { display: block; color: var(--dk-fg); font-size: 13.5px; font-weight: 700; margin-top: 1px; font-variant-numeric: tabular-nums; }
#v-home .home-analit .card.dk-fx { height: 100%; max-height: 300px; box-sizing: border-box; }
.dk-fx .fx-gf { margin: 4px -18px 0; flex: 1 1 0; min-height: 84px; position: relative; }
.dk-fx .fx-gf svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.dk-fx .fx-gf .garis { fill: none; stroke: url(#dkFxG); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: dkGaris 1.1s .25s cubic-bezier(.4, 0, .2, 1) forwards; }
.dk-fx .fx-gf .isi { opacity: 0; animation: dkMuncul .6s .9s forwards; }
.dk-fx .fx-bln { display: flex; justify-content: space-between; padding: 2px 0 10px; font-size: 11px; color: var(--dk-mu); }
.dk-fx .fx-bln .kini { color: var(--brand); font-weight: 700; }
html[data-theme="dark"] .dk-fx .fx-bln .kini { color: #C4B5FD; }

/* 2. Radial Bar Score Card: status pelanggan */
.dk-rs .rs-w { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dk-rs .rs-w svg { width: 100%; max-width: 200px; height: auto; }
.dk-rs .rs-w path { fill: none; stroke-width: 15; stroke-linecap: round; }
.dk-rs .rs-w path.off { stroke: var(--dk-tr); }
.dk-rs .rs-w path.on { animation: dkMuncul .35s both; }
.dk-rs .rs-n { font-size: 30px; font-weight: 800; fill: var(--dk-fg); letter-spacing: -.02em; }
.dk-rs .rs-l { font-size: 9.5px; fill: var(--dk-mu); }
.dk-rs .rs-leg { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; color: var(--dk-mu); }
.dk-rs .rs-leg li { display: inline-flex; align-items: center; gap: 6px; }
.dk-rs .rs-leg i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dk-rs .rs-leg b { color: var(--dk-fg); font-weight: 800; }

/* 3. Modern Circular Progress Card: tagihan lunas bulan ini */
.dk-cp .cp-w { display: flex; align-items: center; gap: 16px; }
.dk-cp .cp-w svg { width: 118px; height: 118px; flex: 0 0 auto; }
.dk-cp .cp-tr { fill: none; stroke: var(--dk-tr); stroke-width: 9; }
.dk-cp .cp-arc { fill: none; stroke: url(#dkCpG); stroke-width: 9; stroke-linecap: round; animation: dkCincin 1.1s .15s cubic-bezier(.3, .7, .2, 1) both; }
.dk-cp .cp-n { font-size: 25px; font-weight: 800; fill: var(--dk-fg); letter-spacing: -.02em; }
.dk-cp .cp-l { font-size: 10px; fill: var(--dk-mu); }
.dk-cp .cp-t { display: grid; gap: 3px; min-width: 0; }
.dk-cp .cp-t b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--dk-fg); font-variant-numeric: tabular-nums; }
.dk-cp .cp-t span { font-size: 12.5px; color: var(--dk-mu); }
.dk-cp .cp-t small { font-size: 11.5px; color: var(--dk-mu); }

@keyframes dkGaris { to { stroke-dashoffset: 0; } }
@keyframes dkMuncul { from { opacity: 0; } to { opacity: 1; } }
@keyframes dkCincin { from { stroke-dashoffset: var(--c); } }
@media (prefers-reduced-motion: reduce) {
  .dk-fx .fx-gf .garis, .dk-fx .fx-gf .isi, .dk-rs .rs-w path.on, .dk-cp .cp-arc { animation: none !important; opacity: 1; }
  .dk-fx .fx-gf .garis { stroke-dashoffset: 0; }
}

/* ===== Kartu di dalam hero: kaca transparan supaya menyatu dengan warna hero, ukuran ringkas ===== */
html .bil-hero .dk3, html[data-theme] .bil-hero .dk3 {
  --dk-bg: rgba(255, 255, 255, .10); --dk-fg: #FFFFFF; --dk-mu: #D9DEFF; --dk-tr: rgba(255, 255, 255, .18);
  --dk-naik: #B7F5D3; --dk-naik-bg: rgba(110, 231, 160, .20); --dk-turun: #FFD0CC; --dk-turun-bg: rgba(255, 138, 128, .22);
  border: 1px solid rgba(255, 255, 255, .20) !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 20px !important;
}
.bil-hero .dk3 .garis { stroke: #FFFFFF !important; }
.bil-hero .dk3 .isi { fill: rgba(255, 255, 255, .16); }
.bil-hero .dk3 .cp-arc { stroke: #FFFFFF !important; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .45)); }
.bil-hero .dk3 .fx-ic { background: rgba(255, 255, 255, .20); }
.bil-hero .dk3 .fx-bln .kini { color: #FFFFFF; }
/* Billing dan MikroTik: kartu mengisi tempat cincin lama, tata letak hero tetap satu baris */









/* Tab aktif di deretan tab tanpa "pill" meluncur (mis. Laporan Keuangan): sebelumnya teks putih di latar putih */
.btabs:not(:has(.btab-pill)) .btab.on, .btabs:not(:has(.btab-pill)) .btab.on:hover { background: linear-gradient(135deg, #2D74DB, #1D58B4); color: #fff; box-shadow: 0 6px 14px -4px rgba(36, 104, 201, .55); }

/* =====================================================================
   PALET PANEL: satu keluarga warna (hasil audit warna semua menu)
   - Aksen utama ungu #7C3AED -> #A78BFA (tombol, tab aktif, menu aktif, hero, tautan)
   - Warna status tetap bermakna: hijau = lunas/baik, merah = telat/bahaya, kuning = peringatan
   - Semua teks memenuhi kontras minimal 4.5:1 (teks besar 3:1) di Day dan Night
   ===================================================================== */
:root {
  --muted: #5B6483;
  --brand: #7C3AED; --brand-d: #6D28D9;
  --pu-grad: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 100%);
  --pu-hero: linear-gradient(135deg, #4C1D95 0%, #6D28D9 55%, #7C3AED 100%);
  --pu-shadow: 0 10px 22px rgba(109, 40, 217, .28);
  --st-ok: #0B7A3E; --st-ok-bg: #E3F6EA; --st-bad: #B42318; --st-bad-bg: #FDECEA; --st-warn: #9A5B05; --st-warn-bg: #FFF3D6;
}
html[data-theme="dark"] {
  --muted: #A9B0D6;
  --brand: #C4B5FD; --brand-d: #A78BFA;
  --pu-grad: linear-gradient(135deg, #6D28D9 0%, #7C3AED 100%);
  --pu-hero: linear-gradient(135deg, #2E1065 0%, #4C1D95 55%, #5B21B6 100%);
  --pu-shadow: 0 10px 22px rgba(0, 0, 0, .4);
  --st-ok: #6EE7A0; --st-ok-bg: rgba(91, 227, 160, .14); --st-bad: #FFA59E; --st-bad-bg: rgba(255, 138, 128, .14); --st-warn: #FCD34D; --st-warn-bg: rgba(252, 211, 77, .14);
}

/* Aksen utama: menu aktif, tombol utama, tab aktif, filter aktif */
.nav-item.on, .btn, .bbtn.primer, .chip-f.on,
html[data-theme="dark"] .side .chip-f.on, html[data-theme="dark"] .saring .chip-f.on {
  background: var(--pu-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: var(--pu-shadow) !important;
}
.bbtn.primer:hover { background: linear-gradient(135deg, #5B21B6, #7C3AED) !important; color: #fff !important; }
.btab-pill { background: var(--pu-grad) !important; box-shadow: 0 6px 14px -4px rgba(109, 40, 217, .55) !important; }
.btabs:not(:has(.btab-pill)) .btab.on, .btabs:not(:has(.btab-pill)) .btab.on:hover { background: var(--pu-grad) !important; box-shadow: 0 6px 14px -4px rgba(109, 40, 217, .55) !important; }
.link-btn { color: var(--brand) !important; }
.pk-bar i { background: linear-gradient(90deg, #7C3AED, #A78BFA) !important; }
html[data-theme="dark"] .side .tab.on, html[data-theme="dark"] .tabs .tab.on { background: rgba(139, 92, 246, .30) !important; box-shadow: inset 0 0 0 1px rgba(196, 181, 253, .35) !important; }
.tabs .tab.on { color: var(--brand-d); }
html[data-theme="dark"] .tabs .tab.on { color: #FFFFFF; }
#v-billing a, #v-bayar a, #v-keu a { color: var(--brand-d); }
html[data-theme="dark"] #v-billing a, html[data-theme="dark"] #v-bayar a, html[data-theme="dark"] #v-keu a { color: #C4B5FD; }

/* Hero semua menu: ungu tua, teks putih selalu terbaca */
.bil-hero, .keu-hero, .lk-hero, #v-home .home-hero,
html[data-theme="dark"] .bil-hero, html[data-theme="dark"] .keu-hero, html[data-theme="dark"] .lk-hero, html[data-theme="dark"] #v-home .home-hero {
  background: var(--pu-hero) !important; box-shadow: 0 16px 36px rgba(76, 29, 149, .30) !important;
}
#v-home .hh-kicker { color: rgba(255, 255, 255, .88); }
#v-home .hh-sub { color: rgba(255, 255, 255, .9); }
.bil-hero .dk3 .dk-per { color: #FFFFFF; background: rgba(255, 255, 255, .20); }

/* Kartu KPI berwarna (Percakapan dan kartu .stat): gradasi lebih pekat supaya teks putih terbaca */
.kt-blue, .stat:nth-of-type(4n+1) { background: linear-gradient(135deg, #2563EB, #1E40AF) !important; }
.stat:nth-of-type(4n+2) { background: linear-gradient(135deg, #7C3AED, #5B21B6) !important; }
.kt-green, .stat:nth-of-type(4n+3) { background: linear-gradient(135deg, #047857, #065F46) !important; }
.kt-orange, .stat:nth-of-type(4n+4) { background: linear-gradient(135deg, #C2410C, #9A3412) !important; }
/* Dashboard: kartu .stat memakai kaca terang, jadi teksnya gelap (sebelumnya angka putih di latar putih) */
#v-home .pel-kpis .stat { color: var(--ink) !important; }
#v-home .pel-kpis .stat b { color: #14183A !important; }
#v-home .pel-kpis .stat .l, #v-home .pel-kpis .stat small { color: var(--muted) !important; }
#v-home .pel-kpis .stat .ic { background: #F1EBFF !important; color: #6D28D9 !important; }
html[data-theme="dark"] #v-home .pel-kpis .stat b { color: #EEF0FF !important; }
html[data-theme="dark"] #v-home .pel-kpis .stat .ic { background: rgba(167, 139, 250, .18) !important; color: #C4B5FD !important; }

/* Warna status: lunas / telat / peringatan */
.pchip.p-ok, .bbtn.ok, .nr-cek.ok { color: var(--st-ok) !important; }
.pchip.p-ok { background: var(--st-ok-bg) !important; }
.pchip.p-bad { color: var(--st-bad) !important; background: var(--st-bad-bg) !important; }
.keu-row-n.kn, .kpi.k-ok .kpi-v { color: var(--st-ok) !important; }
.keu-row-n.kt { color: var(--st-bad) !important; }
.keu-row.pindah .keu-row-n { color: var(--brand-d) !important; }
.dk3, #v-home .card.dk3 { --dk-naik: #0B7A3E; --dk-mu: #565B80; }
html[data-theme="dark"] .dk3, html[data-theme="dark"] #v-home .card.dk3 { --dk-naik: #6EE7A0; --dk-mu: #A9B0D6; }

/* Avatar pelanggan: warna nada tetap, tetapi terbaca di Day dan Night */
.bav { color: color-mix(in srgb, var(--c) 70%, #000000) !important; }
html[data-theme="dark"] .bav { background: color-mix(in srgb, var(--c) 28%, #1A1D3A) !important; color: color-mix(in srgb, var(--c) 35%, #FFFFFF) !important; }

/* Night: judul dan teks yang masih gelap di latar gelap */
html[data-theme="dark"] #v-home h3, html[data-theme="dark"] #v-home .card h3 { color: #EEF0FF !important; }
html[data-theme="dark"] .chat-hero .ch-set h4 { color: #EEF0FF !important; }
html[data-theme="dark"] .gfx-ptop b, html[data-theme="dark"] .gfx-li { color: #C9CEF2 !important; }
html[data-theme="dark"] .gfx-li b, html[data-theme="dark"] .gfx-ptop, html[data-theme="dark"] .gfx-judul { color: #EEF0FF !important; }
html[data-theme="dark"] .btab em { background: rgba(255, 255, 255, .10); color: #D6DBFF; }
html[data-theme="dark"] .todo-go { color: #A9B0D6 !important; }
html[data-theme="dark"] kbd { color: #D6DBFF !important; background: rgba(255, 255, 255, .10) !important; border-color: rgba(255, 255, 255, .18) !important; }
html[data-theme="dark"] .ov-chip { background: rgba(167, 139, 250, .16); color: #C4B5FD; }
.todo-go { color: #6B6F93; }
kbd { color: #4A5272 !important; }
/* Tombol di dalam hero OLT tetap putih (kontras dengan hero ungu) */
.ov-hero-isi button.bbtn.primer { background: #FFFFFF !important; color: #6D28D9 !important; box-shadow: 0 6px 16px rgba(20, 16, 60, .25) !important; }
/* Sisa audit: kartu KPI ungu Percakapan, angka di tab chat, banner MikroTik, lencana hitungan */
.kt-violet { background: linear-gradient(135deg, #7C3AED, #5B21B6) !important; }
.tabs .tab.on span { background: #6D28D9 !important; color: #FFFFFF !important; }
.chip-f span.ok { background: #0B7A3E !important; color: #FFFFFF !important; }
html[data-theme="dark"] .mon-banner small, html[data-theme="dark"] .mon-banner { color: #C9CEF2 !important; }
.bchip.bad em { color: #B42318; }
html[data-theme="dark"] .bchip.bad em { background: rgba(255, 138, 128, .16); color: #FFA59E; }
html[data-theme="dark"] .bchip.warn em { background: rgba(252, 211, 77, .14); color: #FCD34D; }
/* Teks kosong di daftar chat sedikit lebih gelap di Day */
.list-empty, .placeholder, .cq-empty { color: #4A5272; }
html[data-theme="dark"] .list-empty, html[data-theme="dark"] .placeholder, html[data-theme="dark"] .cq-empty { color: #A9B0D6; }
/* Hero: keterangan kecil di kotak dan label periode tetap terbaca di atas ungu */
.bil-hero .bil-k small { color: #FFE4DF !important; }
.bil-hero .dk3 .dk-per { background: rgba(46, 16, 101, .38) !important; color: #FFFFFF !important; }
/* Sakelar Night dan avatar admin ikut palet ungu */
html[data-theme="dark"] .theme-sw .ts-knob { background: var(--pu-grad) !important; }
html[data-theme="dark"] .nav-foot .av { background: rgba(167, 139, 250, .20) !important; color: #E4DBFF !important; }

/* ===== TEMA 1: WARNA TEGAS (aktif hanya dengan ?tema=tegas, mode Day) =====
   Biru tegas #3B82F6 -> #1D4ED8, latar biru sangat muda, teks biru tua.
   Bentuk kartu, radius, dan tata letak tidak berubah. */
html[data-tema="tegas"]:not([data-theme="dark"]) {
  --bg: #EFF6FF; --ink: #1E3A8A; --muted: #475569; --line: #BFDBFE; --brand: #3B82F6; --brand-d: #1D4ED8;
  --pu-grad: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  --pu-hero: linear-gradient(135deg, #1E40AF 0%, #1D4ED8 55%, #3B82F6 100%);
  --pu-shadow: 0 10px 22px rgba(29, 78, 216, .25);
  --st-ok: #0B7A3E; --st-bad: #B42318; --st-warn: #9A5B05;
}
html[data-tema="tegas"]:not([data-theme="dark"]) body {
  background: linear-gradient(160deg, #EFF6FF 0%, #E0ECFF 100%) fixed; color: #1E3A8A;
}
html[data-tema="tegas"]:not([data-theme="dark"]) .card,
html[data-tema="tegas"]:not([data-theme="dark"]) .stat {
  background: #FFFFFF !important; border: 1px solid #BFDBFE !important; box-shadow: 0 4px 12px rgba(59, 130, 246, .08) !important;
}
html[data-tema="tegas"]:not([data-theme="dark"]) .card h3, html[data-tema="tegas"]:not([data-theme="dark"]) .card h2 { color: #1E3A8A; }
html[data-tema="tegas"]:not([data-theme="dark"]) .nav { background: #FFFFFF; border-right: 1px solid #BFDBFE; }
html[data-tema="tegas"]:not([data-theme="dark"]) .nav-item { color: #1E3A8A; }
html[data-tema="tegas"]:not([data-theme="dark"]) .nav-item:hover { background: #EFF6FF; }
html[data-tema="tegas"]:not([data-theme="dark"]) .dk3 { background: #FFFFFF !important; }
html[data-tema="tegas"]:not([data-theme="dark"]) .dk-fx .fx-ic { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
html[data-tema="tegas"]:not([data-theme="dark"]) .dk-cp .cp-tr, html[data-tema="tegas"]:not([data-theme="dark"]) .dk-rs .rs-w path.off { stroke: #DBEAFE; }

/* ===== TEMA 2: PUTIH TEGAS (aktif hanya dengan ?tema=putih, mode Day) =====
   Biru #3B82F6 dan hijau segar #10B981 sebagai aksen, latar #F8FAFC, kartu putih polos,
   garis tipis #F1F5F9 tanpa bayangan tebal. Bentuk kartu dan tata letak tidak berubah. */
html[data-tema="putih"]:not([data-theme="dark"]) {
  --bg: #F8FAFC; --ink: #1E293B; --muted: #94A3B8; --line: #F1F5F9; --brand: #3B82F6; --brand-d: #2563EB;
  --pu-grad: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
  --pu-hero: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
  --pu-shadow: 0 2px 6px rgba(15, 23, 42, .06);
  --st-ok: #0B7A3E; --st-bad: #B42318; --st-warn: #9A5B05;
}
html[data-tema="putih"]:not([data-theme="dark"]) body { background: #F8FAFC !important; color: #1E293B; }
html[data-tema="putih"]:not([data-theme="dark"]) .card,
html[data-tema="putih"]:not([data-theme="dark"]) .stat,
html[data-tema="putih"]:not([data-theme="dark"]) .dk3 {
  background: #FFFFFF !important; border: 1px solid #F1F5F9 !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}
html[data-tema="putih"]:not([data-theme="dark"]) .card h3, html[data-tema="putih"]:not([data-theme="dark"]) .card h2 { color: #1E293B; }
html[data-tema="putih"]:not([data-theme="dark"]) .nav { background: #FFFFFF; border-right: 1px solid #F1F5F9; box-shadow: none; }
html[data-tema="putih"]:not([data-theme="dark"]) .nav-item { color: #1E293B; }
html[data-tema="putih"]:not([data-theme="dark"]) .nav-item:hover { background: #F8FAFC; }
html[data-tema="putih"]:not([data-theme="dark"]) .dk-fx .fx-ic { background: linear-gradient(135deg, #3B82F6, #10B981); }
html[data-tema="putih"]:not([data-theme="dark"]) .dk-cp .cp-tr, html[data-tema="putih"]:not([data-theme="dark"]) .dk-rs .rs-w path.off { stroke: #F1F5F9; }

/* ===== TEMA 3: IPHONE GLASS (aktif hanya dengan ?tema=glass, mode Day) =====
   Latar gradien indigo #6366F1 -> pink #EC4899, kartu kaca putih 65% dengan blur 20px,
   garis putih tipis, bayangan lembut. Bentuk kartu dan tata letak tidak berubah. */
html[data-tema="glass"]:not([data-theme="dark"]) {
  --bg: #6366F1; --ink: #1E293B; --muted: #475569; --line: rgba(255, 255, 255, .2); --brand: #6366F1; --brand-d: #4F46E5;
  --pu-grad: linear-gradient(135deg, #6366F1 0%, #EC4899 100%);
  --pu-hero: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #DB2777 100%);
  --pu-shadow: 0 8px 24px rgba(0, 0, 0, .10);
  --st-ok: #0B7A3E; --st-bad: #B42318; --st-warn: #9A5B05;
}
html[data-tema="glass"]:not([data-theme="dark"]) body {
  background: linear-gradient(135deg, #6366F1 0%, #EC4899 100%) fixed !important; color: #1E293B;
}
html[data-tema="glass"]:not([data-theme="dark"]) .card,
html[data-tema="glass"]:not([data-theme="dark"]) .stat,
html[data-tema="glass"]:not([data-theme="dark"]) .dk3 {
  background: rgba(255, 255, 255, .65) !important;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .2) !important; box-shadow: 0 8px 32px rgba(0, 0, 0, .08) !important;
}
html[data-tema="glass"]:not([data-theme="dark"]) .card h3, html[data-tema="glass"]:not([data-theme="dark"]) .card h2 { color: #1E293B; }
html[data-tema="glass"]:not([data-theme="dark"]) .nav {
  background: rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-right: 1px solid rgba(255, 255, 255, .3);
}
html[data-tema="glass"]:not([data-theme="dark"]) .nav-item { color: #1E293B; }
html[data-tema="glass"]:not([data-theme="dark"]) .nav-item:hover { background: rgba(255, 255, 255, .6); }
html[data-tema="glass"]:not([data-theme="dark"]) .dk-fx .fx-ic { background: linear-gradient(135deg, #6366F1, #EC4899); }
/* Kartu Dashboard (#v-home .card.dk3) lebih spesifik, jadi tema kaca perlu selector yang sama kuatnya */
html[data-tema="glass"]:not([data-theme="dark"]) #v-home .card,
html[data-tema="glass"]:not([data-theme="dark"]) #v-home .card.dk3,
html[data-tema="glass"]:not([data-theme="dark"]) #v-home .home-analit .card {
  background: rgba(255, 255, 255, .65) !important; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .2) !important; box-shadow: 0 8px 32px rgba(0, 0, 0, .08) !important;
}
/* Tema kaca: wadah .main ikut transparan supaya gradien latar terlihat di belakang kartu */
html[data-tema="glass"]:not([data-theme="dark"]) .main { background: transparent !important; }

/* ===== TEMA 4: SIANG / LIGHT (aktif hanya dengan ?tema=siang, mode Day) =====
   Tema standar yang sudah berjalan, dengan nilai resmi: ungu #7C3AED -> #A78BFA,
   latar #F8F7FC, kartu putih, teks #1F2937 dan sekunder #6B7280, garis #EDE9FE. */
html[data-tema="siang"]:not([data-theme="dark"]) {
  --bg: #F8F7FC; --ink: #1F2937; --muted: #6B7280; --line: #EDE9FE; --brand: #7C3AED; --brand-d: #6D28D9;
  --pu-grad: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
  --pu-hero: linear-gradient(135deg, #6D28D9 0%, #7C3AED 55%, #A78BFA 100%);
  --pu-shadow: 0 10px 22px rgba(124, 58, 237, .25);
  --st-ok: #0B7A3E; --st-bad: #B42318; --st-warn: #9A5B05;
}
html[data-tema="siang"]:not([data-theme="dark"]) body { background: #F8F7FC !important; color: #1F2937; }
html[data-tema="siang"]:not([data-theme="dark"]) .main { background: transparent !important; }
html[data-tema="siang"]:not([data-theme="dark"]) .card,
html[data-tema="siang"]:not([data-theme="dark"]) .stat,
html[data-tema="siang"]:not([data-theme="dark"]) #v-home .card,
html[data-tema="siang"]:not([data-theme="dark"]) #v-home .card.dk3,
html[data-tema="siang"]:not([data-theme="dark"]) .dk3 {
  background: #FFFFFF !important; border: 1px solid #EDE9FE !important; box-shadow: 0 6px 16px rgba(124, 58, 237, .06) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-tema="siang"]:not([data-theme="dark"]) .card h3, html[data-tema="siang"]:not([data-theme="dark"]) .card h2 { color: #1F2937; }
html[data-tema="siang"]:not([data-theme="dark"]) .nav { background: #FFFFFF; border-right: 1px solid #EDE9FE; box-shadow: none; }
html[data-tema="siang"]:not([data-theme="dark"]) .nav-item { color: #1F2937; }
html[data-tema="siang"]:not([data-theme="dark"]) .nav-item:hover { background: #F8F7FC; }

/* ===== TEMA 5: MALAM / DARK (aktif hanya dengan ?tema=malam, mode Night) =====
   Latar #0F0F1A, kartu #1E1E2F, teks #F1F5F9 dan sekunder #94A3B8, garis #2E2E42.
   Aksen ungu #8B5CF6. Gradien #8B5CF6 -> #C4B5FD dipakai hanya untuk elemen tanpa teks,
   karena teks putih di atas #C4B5FD tidak terbaca (sekitar 1,8:1). */
html[data-tema="malam"][data-theme="dark"] {
  --bg: #0F0F1A; --ink: #F1F5F9; --muted: #94A3B8; --line: #2E2E42; --brand: #8B5CF6; --brand-d: #C4B5FD;
  --pu-grad: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
  --pu-hero: linear-gradient(135deg, #4C1D95 0%, #6D28D9 55%, #8B5CF6 100%);
  --pu-shadow: 0 10px 22px rgba(0, 0, 0, .45);
  --st-ok: #6EE7A0; --st-bad: #FFA59E; --st-warn: #FCD34D;
}
html[data-tema="malam"][data-theme="dark"] body { background: #0F0F1A !important; color: #F1F5F9; }
html[data-tema="malam"][data-theme="dark"] .main { background: transparent !important; }
html[data-tema="malam"][data-theme="dark"] .card,
html[data-tema="malam"][data-theme="dark"] .stat,
html[data-tema="malam"][data-theme="dark"] #v-home .card,
html[data-tema="malam"][data-theme="dark"] #v-home .card.dk3,
html[data-tema="malam"][data-theme="dark"] .dk3 {
  background: #1E1E2F !important; border: 1px solid #2E2E42 !important; box-shadow: 0 8px 20px rgba(0, 0, 0, .35) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-tema="malam"][data-theme="dark"] .card h3, html[data-tema="malam"][data-theme="dark"] .card h2 { color: #F1F5F9; }
html[data-tema="malam"][data-theme="dark"] .nav { background: #1E1E2F; border-right: 1px solid #2E2E42; box-shadow: none; }
html[data-tema="malam"][data-theme="dark"] .nav-item { color: #E2E8F0; }
html[data-tema="malam"][data-theme="dark"] .nav-item:hover { background: #2A2A40; }
html[data-tema="malam"][data-theme="dark"] .dk-fx .fx-ic { background: linear-gradient(135deg, #8B5CF6, #C4B5FD); }
html[data-tema="malam"][data-theme="dark"] .dk-fx .fx-ic svg { color: #0F0F1A; }
/* Tombol perkecil menu di sidebar terang (mode Day) */
html:not([data-theme="dark"]) .nav-tog { background: #EFE9FF; color: #6D28D9; }
html:not([data-theme="dark"]) .nav-tog:hover { background: #E4DAFF; color: #5B21B6; }

/* ===== TEMA LOGO (aktif hanya dengan ?tema=logo, mode Day) =====
   Diambil dari logo ADZKASQUAD: navy gelap sebagai warna utama, cyan sebagai aksen,
   abu-abu baja untuk latar, oranye hanya untuk tanda peringatan.
   Teks di atas cyan memakai cyan yang lebih gelap agar tetap terbaca. */
html[data-tema="logo"]:not([data-theme="dark"]) {
  --bg: #EEF3F6; --ink: #0F2233; --muted: #4A5D6E; --line: #CFE0E8; --brand: #0E7490; --brand-d: #0A4F63;
  --pu-grad: linear-gradient(135deg, #0E7490 0%, #0891B2 100%);
  --pu-hero: linear-gradient(135deg, #0B1E2D 0%, #123247 55%, #0E7490 100%);
  --pu-shadow: 0 10px 22px rgba(8, 145, 178, .25);
  --st-ok: #0B7A3E; --st-bad: #B42318; --st-warn: #B45309;
}
html[data-tema="logo"]:not([data-theme="dark"]) body {
  background: linear-gradient(160deg, #EEF3F6 0%, #DDE7ED 100%) fixed; color: #0F2233;
}
html[data-tema="logo"]:not([data-theme="dark"]) .main { background: transparent !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .card,
html[data-tema="logo"]:not([data-theme="dark"]) .stat,
html[data-tema="logo"]:not([data-theme="dark"]) #v-home .card,
html[data-tema="logo"]:not([data-theme="dark"]) #v-home .card.dk3,
html[data-tema="logo"]:not([data-theme="dark"]) .dk3 {
  background: #FFFFFF !important; border: 1px solid #CFE0E8 !important; box-shadow: 0 6px 16px rgba(15, 34, 51, .08) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html[data-tema="logo"]:not([data-theme="dark"]) .card h3, html[data-tema="logo"]:not([data-theme="dark"]) .card h2 { color: #0F2233; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav { background: #0F2233 !important; border-right: 1px solid #123247 !important; box-shadow: none !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav-item, html[data-tema="logo"]:not([data-theme="dark"]) .nav-sec,
html[data-tema="logo"]:not([data-theme="dark"]) .nav-sec-btn { color: #D6E9F1; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav-item:hover { background: #17364A; color: #FFFFFF; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav-item .ni-t small { color: #8FB5C7; }
html .nav-foot { color: #B7D3DF; border-top-color: var(--ft-bd); }
html[data-tema="logo"]:not([data-theme="dark"]) .nav-tog { background: #17364A; color: #67E8F9; }
html[data-tema="logo"]:not([data-theme="dark"]) .dk-fx .fx-ic { background: linear-gradient(135deg, #0E7490, #22D3EE); }
html[data-tema="logo"]:not([data-theme="dark"]) .dk-cp .cp-tr, html[data-tema="logo"]:not([data-theme="dark"]) .dk-rs .rs-w path.off { stroke: #E0EEF4; }
/* Tema Logo: bagian bawah sidebar (akun, tombol, sakelar) ikut navy agar terbaca */
html .nav-foot .me,
html .nav-foot .tool,
html .nav-foot .theme-sw,
html .nav-foot .out { background: var(--ft-hover) !important; color: var(--ft-fg) !important; border-color: var(--ft-bd) !important; }
html .nav-foot .me b, html .nav-foot .me span,
html .nav-foot .me small, html .nav-foot .me #meSt { color: #D6E9F1 !important; }
html .nav-foot .ts-lbl { color: #B7D3DF !important; }
html .nav-foot .ts-day, html .nav-foot .ts-knob { color: #0F2233 !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .shell .nav-item { color: #E6F4FA !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .shell .nav-item:hover { background: #17364A !important; color: #FFFFFF !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .shell .nav-item .ni-t small { color: #8FB5C7 !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .shell .nav-sec, html[data-tema="logo"]:not([data-theme="dark"]) .shell .nav-sec-btn { color: #7FB0C4 !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .shell .nav-item.on { background: linear-gradient(135deg, #0E7490, #0891B2) !important; color: #FFFFFF !important; }
/* Kartu di dalam hero tetap kaca gelap di semua tema terang (bukan kartu putih) */
html:not([data-theme="dark"]) .bil-hero .dk3.k3 { background: rgba(255, 255, 255, .10) !important; color: #FFFFFF !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html:not([data-theme="dark"]) .bil-hero .dk3.k3 .dk-per { color: #FFFFFF !important; }

/* ===== Bagian bawah sidebar (tema Logo, default): rapi dan selaras dengan navy ===== */
html .nav-foot .tools {
  display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 8px;
  padding: 8px; border-radius: 14px; background: var(--ft-hover) !important; border: 1px solid var(--ft-bd) !important;
  box-shadow: none !important;
}
html .nav-foot .tools .tsep { display: none !important; }
html .nav-foot .tools .pill {
  grid-column: 1 / -1; justify-self: start; font-size: 11.5px; padding: 4px 10px;
  background: var(--ft-accbg) !important; color: var(--ft-acc) !important; border: 1px solid rgba(103, 232, 249, .30) !important;
}
html .nav-foot .tools .pill.off { background: rgba(252, 165, 165, .12) !important; color: #FECACA !important; border-color: rgba(252, 165, 165, .3) !important; }
html .nav-foot .tools .tool {
  height: auto !important; min-height: 34px; min-width: 0 !important; padding: 7px 8px !important; font-size: 12px; line-height: 1.25;
  white-space: normal !important; text-align: center; border-radius: 10px;
  background: #0F2233 !important; color: var(--ft-fg) !important; border: 1px solid var(--ft-bd) !important;
}
html .nav-foot .tools .tool:hover { background: #0B1B28 !important; color: var(--ft-fg) !important; }
html .nav-foot .tools #dutyBtn { grid-column: 1 / -1; background: linear-gradient(135deg, var(--ft-sw), #0891B2) !important; border-color: transparent !important; color: #FFFFFF !important; font-weight: 700; }
html .nav-foot .tools .tool.duty-off { background: #0F2233 !important; }
html .nav-foot .tools .tool .lb { white-space: normal; }
html .nav-foot .me {
  background: var(--ft-hover) !important; border: 1px solid var(--ft-bd) !important; color: var(--ft-fg) !important; border-radius: 14px;
}
html .nav-foot .me b { color: var(--ft-fg) !important; }
html .nav-foot .me small { color: var(--ft-mu) !important; }
html .nav-foot .me .av, html .nav-foot .me #meAv {
  background: rgba(103, 232, 249, .18) !important; color: var(--ft-acc) !important;
}
html .nav-foot .me .out {
  background: transparent !important; color: var(--ft-fg) !important; border: 1px solid #2B5A70 !important;
}
html .nav-foot .nav-sec-btn {
  background: var(--ft-hover) !important; color: #D6E9F1 !important; border: 1px solid var(--ft-bd) !important; border-radius: 12px;
}

/* Tema Logo: nama admin (#meName punya selector id, jadi perlu lebih kuat) dan grup Akses Owner dibuat terang */
html .nav-foot .me #meName { color: var(--ft-fg) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav .grp-head { color: var(--ft-fg) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav .grp-head .ni-t small { color: var(--ft-mu) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav .grp-head:hover { background: var(--ft-hover) !important; }

/* Tema Logo: semua ikon menu seragam (cyan), menu aktif tetap putih di atas biru */
html[data-tema="logo"]:not([data-theme="dark"]) .nav .nav-item .ni-ic { background: var(--ft-accbg) !important; color: var(--ft-acc) !important; box-shadow: none !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .nav .nav-item.on .ni-ic { background: rgba(255, 255, 255, .22) !important; color: var(--ft-onsw) !important; }

/* Tema Logo: halaman Percakapan selaras dengan menu dan halaman lain (navy dan teal) */
html[data-tema="logo"]:not([data-theme="dark"]) .view.chats { background: transparent !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero {
  background: linear-gradient(135deg, #0B1E2D 0%, #123247 55%, var(--ft-sw) 100%) !important; color: var(--ft-onsw) !important;
  border-color: rgba(103, 232, 249, .18) !important; box-shadow: 0 14px 34px rgba(15, 34, 51, .28) !important;
}
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero h2, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-t h2 { color: var(--ft-onsw) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-date { color: var(--ft-acc) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-donut, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-queue,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-wa, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-set {
  background: rgba(255, 255, 255, .08) !important; border-color: rgba(103, 232, 249, .18) !important;
}
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-donut h4, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-queue h4,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-wa h4, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-set h4 { color: var(--ft-fg) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cs-row { background: rgba(255, 255, 255, .06) !important; border-color: rgba(103, 232, 249, .16) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cs-t, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cs-row small { color: var(--ft-fg) !important; }
/* Keempat kartu KPI memakai warna yang sama, seperti kartu di menu lain */
html[data-tema="logo"]:not([data-theme="dark"]) .ch-kt, html[data-tema="logo"]:not([data-theme="dark"]) .kt-blue,
html[data-tema="logo"]:not([data-theme="dark"]) .kt-violet, html[data-tema="logo"]:not([data-theme="dark"]) .kt-green,
html[data-tema="logo"]:not([data-theme="dark"]) .kt-orange {
  background: linear-gradient(135deg, var(--ft-sw), #0891B2) !important; color: var(--ft-onsw) !important;
}
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cw-st, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cw-num,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cq-empty, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cd-leg li,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cd-c small, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cd-c b,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cd-leg b, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cq-top,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-queue li, html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-queue span,
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .ch-queue small { color: var(--ft-fg) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cw-btn { background: rgba(103, 232, 249, .12) !important; color: var(--ft-acc) !important; border-color: rgba(103, 232, 249, .35) !important; }
html[data-tema="logo"]:not([data-theme="dark"]) .chat-hero .cw-st { color: var(--ft-fg) !important; }

/* ===== Bagian bawah sidebar (tema Logo): susunan vertikal seperti contoh =====
   Urutan: status, akun, Mulai jaga, Suara aktif, Notifikasi, tema, keamanan, keluar. ID tombol tidak berubah. */
html .shell:not(.nav-mini) .nav-foot { display: flex !important; flex-direction: column; gap: 8px; }
html .shell:not(.nav-mini) .nav-foot .tools { display: contents !important; }
html .shell:not(.nav-mini) .nav-foot .tools > * { order: 10; }
html .shell:not(.nav-mini) .nav-foot .tools .websel,
html .shell:not(.nav-mini) .nav-foot .tools .sbox,
html .shell:not(.nav-mini) .nav-foot .tools .tsep,
html .shell:not(.nav-mini) .nav-foot .tools #installBtn { display: none !important; }
/* 1. Status koneksi */
html .nav-foot #conn { order: 1; width: 100%; box-sizing: border-box; padding: 11px 14px; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--ft-bg) !important; border: 1px solid var(--ft-bd) !important; color: var(--ft-fg) !important; justify-content: flex-start; }
/* 2. Kartu akun */
html .nav-foot .me { order: 2; background: var(--ft-bg) !important; border: 1px solid var(--ft-bd) !important; border-radius: 14px; padding: 12px; box-sizing: border-box; }
html .nav-foot #meAv { width: 46px; height: 46px; border-radius: 50%; background: var(--ft-sw) !important; color: var(--ft-onsw) !important; border: 2px solid var(--ft-sw); font-size: 17px; }
/* 3. Mulai jaga: tombol utama */
html .nav-foot #dutyBtn { order: 3; width: 100%; height: 50px; border-radius: 14px; border: 0 !important; font-size: 15px; font-weight: 700;
  background: linear-gradient(135deg, var(--ft-sw), #0891B2) !important; color: var(--ft-onsw) !important; box-shadow: 0 10px 22px rgba(8, 145, 178, .30) !important; }
/* 4-5. Baris dengan sakelar: Suara aktif dan Notifikasi */
html .nav-foot #soundBtn, html .nav-foot #notifBtn {
  width: 100%; height: 46px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 12px 0 14px; border-radius: 12px; font-size: 13px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden;
  background: var(--ft-bg) !important; border: 1px solid var(--ft-bd) !important; color: var(--ft-fg) !important;
}
html .nav-foot #soundBtn { order: 4; }
html .nav-foot #notifBtn { order: 5; white-space: normal; height: auto; min-height: 46px; padding-top: 6px; padding-bottom: 6px; line-height: 1.2; }
html .nav-foot #soundBtn::after, html .nav-foot #notifBtn::after {
  content: ""; flex: none; width: 40px; height: 22px; border-radius: 99px; box-sizing: border-box;
  background: radial-gradient(circle 8px at 12px 50%, var(--ft-onsw) 98%, transparent 100%), var(--ft-track);
}
html .nav-foot #soundBtn.on::after {
  background: radial-gradient(circle 8px at 28px 50%, var(--ft-onsw) 98%, transparent 100%), var(--ft-sw);
}
html .nav-foot #soundBtn svg, html .nav-foot #notifBtn svg { flex: none; }
/* 6. Tema tampilan (Day / Night) */
html .nav-foot .theme-sw { order: 6; width: 100%; height: 44px; border-radius: 12px; }
/* 7. Keamanan login */
html .nav-foot #secBtn { order: 7; width: 100%; height: 46px; box-sizing: border-box; border-radius: 12px; font-size: 13px; font-weight: 600;
  background: var(--ft-bg) !important; border: 1px solid var(--ft-bd) !important; color: var(--ft-fg) !important; }
/* 8. Keluar: tombol merah garis */
html .nav-foot #logoutBtn { order: 8; width: 100%; height: 44px; box-sizing: border-box; border-radius: 12px; font-size: 14px; font-weight: 700;
  background: transparent !important; border: 1px solid var(--ft-out) !important; color: var(--ft-outfg) !important; }
html .nav-foot #logoutBtn:hover { background: rgba(185, 28, 28, .18) !important; }

/* Tombol pemilih tema di bagian bawah sidebar: baris seperti tombol lain */
.theme-pick { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; min-height: 50px; box-sizing: border-box; margin: 0; padding: 8px 12px; border-radius: 12px; text-align: left; cursor: pointer; }
.theme-pick .tp-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--ft-accbg); color: var(--ft-acc); }
.theme-pick .tp-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.theme-pick .tp-t small { font-size: 11px; font-weight: 600; color: var(--ft-mu); }
.theme-pick .tp-nama { font-size: 13px; font-weight: 700; color: var(--ft-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-pick .tp-n { flex: none; font-size: 11px; font-weight: 700; color: var(--ft-mu); }
html .nav-foot .theme-pick { background: var(--ft-bg) !important; border: 1px solid var(--ft-bd) !important; color: var(--ft-fg) !important; }
html .nav-foot .theme-pick:hover { background: var(--ft-hover) !important; }

/* ===== Bagian bawah sidebar (tema Logo): semua baris seragam ===== */
html .shell:not(.nav-mini) .nav-foot { gap: 8px; }
html .nav-foot #conn,
html .nav-foot .me,
html .nav-foot #soundBtn,
html .nav-foot #notifBtn,
html .nav-foot .theme-pick,
html .nav-foot #secBtn,
html .nav-foot #dutyBtn,
html .nav-foot #logoutBtn {
  width: 100% !important; height: 48px !important; min-height: 48px !important; max-height: 48px !important; box-sizing: border-box !important;
  margin: 0 !important; padding: 0 14px !important; border-radius: 12px !important; font-size: 13px !important; font-weight: 600 !important;
  display: flex !important; align-items: center !important; gap: 10px !important; line-height: 1.2 !important; white-space: nowrap !important;
  overflow: hidden !important; text-overflow: ellipsis !important; text-align: left !important;
}
/* baris netral: latar, garis, dan warna sama */
html .nav-foot #conn,
html .nav-foot .me,
html .nav-foot #soundBtn,
html .nav-foot #notifBtn,
html .nav-foot .theme-pick,
html .nav-foot #secBtn {
  background: var(--ft-bg) !important; border: 1px solid var(--ft-bd) !important; color: var(--ft-fg) !important; justify-content: flex-start !important;
}
html .nav-foot #soundBtn, html .nav-foot #notifBtn { justify-content: space-between !important; }
html .nav-foot #conn, html .nav-foot #secBtn { font-weight: 600 !important; }
/* isi baris: ikon dan avatar ukuran sama */
html .nav-foot .me #meAv { width: 34px !important; height: 34px !important; min-width: 34px; font-size: 14px; border-width: 1.5px; }
html .nav-foot .me .mt { flex: 1; min-width: 0; }
html .nav-foot .me .mt b { font-size: 13px; }
html .nav-foot .me .mt small { font-size: 11px; }
html .nav-foot .theme-pick .tp-ic { width: 28px; height: 28px; }
html .nav-foot .theme-pick .tp-t small { font-size: 10.5px; }
html .nav-foot .theme-pick .tp-nama { font-size: 13px; }
html .nav-foot .theme-pick .tp-t { flex: 1; min-width: 0; line-height: 1.1; }
/* aksen: Mulai jaga (utama) dan Keluar (merah) tetap berbeda, ukuran sama */
html .nav-foot #dutyBtn { justify-content: center !important; font-size: 14px !important; font-weight: 700 !important; }
html .nav-foot #logoutBtn { justify-content: center !important; font-size: 14px !important; font-weight: 700 !important; }

/* ===== Warna bagian bawah sidebar per tema (susunan sama di semua tema) ===== */
:root {
  --ft-bg: #1E2D3D; --ft-bd: #2B3E52; --ft-fg: #E6F4FA; --ft-mu: #8FB5C7; --ft-acc: #A5F3FC; --ft-accbg: rgba(103, 232, 249, .14);
  --ft-hover: #17364A; --ft-out: #B91C1C; --ft-outfg: #FCA5A5; --ft-sw: #0E7490; --ft-track: #334A5E; --ft-onsw: #FFFFFF;
  --ft-duty: linear-gradient(135deg, #0E7490, #0891B2);
}
html[data-tema="siang"] { --ft-bg: #FFFFFF; --ft-bd: #EDE9FE; --ft-fg: #1F2937; --ft-mu: #6B7280; --ft-acc: #7C3AED; --ft-accbg: #F1EBFF;
  --ft-hover: #F8F7FC; --ft-out: #B42318; --ft-outfg: #B42318; --ft-sw: #7C3AED; --ft-track: #D6CCF5; --ft-duty: linear-gradient(135deg, #7C3AED, #A78BFA); }
html[data-tema="tegas"] { --ft-bg: #FFFFFF; --ft-bd: #BFDBFE; --ft-fg: #1E3A8A; --ft-mu: #475569; --ft-acc: #1D4ED8; --ft-accbg: #DBEAFE;
  --ft-hover: #EFF6FF; --ft-out: #B42318; --ft-outfg: #B42318; --ft-sw: #3B82F6; --ft-track: #BFDBFE; --ft-duty: linear-gradient(135deg, #3B82F6, #1D4ED8); }
html[data-tema="putih"] { --ft-bg: #FFFFFF; --ft-bd: #F1F5F9; --ft-fg: #1E293B; --ft-mu: #64748B; --ft-acc: #3B82F6; --ft-accbg: #EFF6FF;
  --ft-hover: #F8FAFC; --ft-out: #B42318; --ft-outfg: #B42318; --ft-sw: #10B981; --ft-track: #E2E8F0; --ft-duty: linear-gradient(135deg, #3B82F6, #10B981); }
html[data-tema="glass"] { --ft-bg: rgba(255, 255, 255, .6); --ft-bd: rgba(255, 255, 255, .45); --ft-fg: #1E293B; --ft-mu: #475569; --ft-acc: #6366F1; --ft-accbg: rgba(99, 102, 241, .14);
  --ft-hover: rgba(255, 255, 255, .75); --ft-out: #B42318; --ft-outfg: #B42318; --ft-sw: #6366F1; --ft-track: #CBD5E1; --ft-duty: linear-gradient(135deg, #6366F1, #EC4899); }
html[data-tema="malam"][data-theme="dark"] { --ft-bg: #1E1E2F; --ft-bd: #2E2E42; --ft-fg: #F1F5F9; --ft-mu: #94A3B8; --ft-acc: #C4B5FD; --ft-accbg: rgba(139, 92, 246, .22);
  --ft-hover: #2A2A40; --ft-out: #B91C1C; --ft-outfg: #FCA5A5; --ft-sw: #8B5CF6; --ft-track: #3A3A55; --ft-duty: linear-gradient(135deg, #7C3AED, #8B5CF6); }
html .nav-foot #dutyBtn { background: var(--ft-duty) !important; }

/* ===== Bagian bawah sidebar: versi padat (saran A + B) ===== */
html .shell:not(.nav-mini) .nav-foot { gap: 6px; padding-top: 10px; }
/* status di bawah nama admin, tanpa kotak sendiri */
html .nav-foot .me #conn { order: 0; height: auto !important; min-height: 0 !important; max-height: none !important; width: auto !important; padding: 0 !important; margin: 2px 0 0 !important;
  background: transparent !important; border: 0 !important; font-size: 11px !important; font-weight: 600 !important; color: var(--ft-mu) !important; gap: 5px !important; }
html .nav-foot .me #conn::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #10B981; flex: none; }
/* kartu admin: ringkas */
html .nav-foot .me { height: auto !important; min-height: 0 !important; max-height: none !important; padding: 8px 10px !important; gap: 8px !important; flex-wrap: wrap; align-items: center !important; }
html .nav-foot .me .mt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
html .nav-foot #meAv { width: 32px !important; height: 32px !important; min-width: 32px; font-size: 13px !important; }
html .nav-foot .me .mt b { font-size: 12.5px !important; }
html .nav-foot .me .mt small { font-size: 10.5px !important; }
/* Suara aktif + Notifikasi dalam satu kotak */
html .nav-foot #swGrp { display: flex; flex-direction: column; gap: 0; padding: 2px; border-radius: 12px; background: var(--ft-bg); border: 1px solid var(--ft-bd); order: 4; }
html .nav-foot #swGrp > button { height: 36px !important; min-height: 36px !important; max-height: 36px !important; border: 0 !important; border-radius: 9px !important; background: transparent !important; font-size: 12px !important; padding: 0 10px !important; box-shadow: none !important; }
html .nav-foot #swGrp > button + button { border-top: 1px solid var(--ft-bd) !important; border-radius: 0 0 9px 9px !important; }
html .nav-foot #swGrp > button:first-child { border-radius: 9px 9px 0 0 !important; }
html .nav-foot #swGrp #soundBtn::after, html .nav-foot #swGrp #notifBtn::after { width: 34px !important; height: 19px !important; }
html .nav-foot #swGrp #soundBtn.on::after { background: radial-gradient(circle 7px at 24px 50%, #FFFFFF 98%, transparent 100%), var(--ft-sw) !important; }
html .nav-foot #swGrp #soundBtn::after, html .nav-foot #swGrp #notifBtn::after { background: radial-gradient(circle 7px at 10px 50%, #FFFFFF 98%, transparent 100%), var(--ft-track) !important; }
/* baris tunggal: lebih rendah (sejajar dengan menu) */
html .nav-foot #dutyBtn { height: 40px !important; min-height: 40px !important; max-height: 40px !important; font-size: 13px !important; border-radius: 12px !important; order: 3; }
html .nav-foot #secBtn, html .nav-foot .theme-pick { height: 40px !important; min-height: 40px !important; max-height: 40px !important; font-size: 12px !important; border-radius: 12px !important; padding: 0 12px !important; }
html .nav-foot .theme-pick { min-height: 40px !important; }
html .nav-foot .theme-pick .tp-ic { width: 24px !important; height: 24px !important; border-radius: 7px !important; }
html .nav-foot .theme-pick .tp-nama { font-size: 12px !important; }
html .nav-foot #logoutBtn { height: 36px !important; min-height: 36px !important; max-height: 36px !important; font-size: 13px !important; border-radius: 12px !important; }

/* ===== Sidebar diperkecil (nav-mini): logo disembunyikan, ikon lebih besar, bagian bawah rapi ===== */
.shell.nav-mini .brand .logo { display: none !important; }
.shell.nav-mini .brand { justify-content: center; padding: 6px 0 !important; margin: 0 !important; }
.shell.nav-mini .nav-item { justify-content: center; padding: 8px 0; }
.shell.nav-mini .nav-item .ni-ic { width: 44px !important; height: 44px !important; border-radius: 14px !important; }
.shell.nav-mini .nav-item .ni-ic svg { width: 24px !important; height: 24px !important; }
/* bagian bawah: hanya ikon, ukuran sama */
.shell.nav-mini .nav-foot { display: flex !important; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 0; }
.shell.nav-mini .nav-foot .tools { display: contents !important; }
.shell.nav-mini .nav-foot #conn, .shell.nav-mini .nav-foot .me .mt, .shell.nav-mini .nav-foot .tsep, .shell.nav-mini .nav-foot #installBtn { display: none !important; }
.shell.nav-mini .nav-foot > *, .shell.nav-mini .nav-foot #swGrp > button {
  width: 46px !important; min-width: 46px !important; height: 46px !important; min-height: 46px !important; max-height: 46px !important;
  padding: 0 !important; margin: 0 !important; justify-content: center !important; gap: 0 !important; border-radius: 14px !important;
}
.shell.nav-mini .nav-foot .me { background: transparent !important; border: 0 !important; padding: 0 !important; }
.shell.nav-mini .nav-foot #meAv { width: 40px !important; height: 40px !important; min-width: 40px; font-size: 15px !important; }
.shell.nav-mini .nav-foot #dutyBtn, .shell.nav-mini .nav-foot #logoutBtn, .shell.nav-mini .nav-foot #secBtn, .shell.nav-mini .nav-foot .theme-pick { font-size: 0 !important; }
.shell.nav-mini .nav-foot #dutyBtn::after { content: "▶"; font-size: 16px; color: #FFFFFF; }
.shell.nav-mini .nav-foot #logoutBtn::after { content: "⏻"; font-size: 18px; color: #FCA5A5; }
.shell.nav-mini .nav-foot #secBtn svg { width: 20px; height: 20px; }
.shell.nav-mini .nav-foot .theme-pick .tp-t, .shell.nav-mini .nav-foot .theme-pick .tp-n { display: none !important; }
.shell.nav-mini .nav-foot .theme-pick .tp-ic { width: 30px !important; height: 30px !important; }
.shell.nav-mini .nav-foot #swGrp { display: flex; flex-direction: column; gap: 6px; padding: 0; background: transparent !important; border: 0 !important; }
.shell.nav-mini .nav-foot #swGrp > button { border: 0 !important; background: var(--ft-bg) !important; border-radius: 14px !important; }
.shell.nav-mini .nav-foot #swGrp > button + button { border-top: 0 !important; }
.shell.nav-mini .nav-foot #swGrp .lb, .shell.nav-mini .nav-foot #swGrp > button::after { display: none !important; }
.shell.nav-mini .nav-foot #soundBtn svg, .shell.nav-mini .nav-foot #notifBtn svg { width: 22px !important; height: 22px !important; }

/* Sidebar kecil: ikon Mulai jaga dan Keluar memakai SVG (bukan karakter teks), ukuran dan pusat sama */
.shell.nav-mini .nav-foot #dutyBtn::after, .shell.nav-mini .nav-foot #logoutBtn::after {
  content: ""; display: block; width: 20px; height: 20px; background: currentColor; flex: none;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.shell.nav-mini .nav-foot #dutyBtn { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12.5-7.5z'/%3E%3C/svg%3E"); }
.shell.nav-mini .nav-foot #dutyBtn::after { color: #FFFFFF; }
.shell.nav-mini .nav-foot #logoutBtn { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 3v8'/%3E%3Cpath d='M6.3 6.3a8 8 0 1 0 11.4 0'/%3E%3C/svg%3E"); }
.shell.nav-mini .nav-foot #logoutBtn::after { color: #FCA5A5; }
/* pusat dan jarak sama untuk semua ikon bawah */
.shell.nav-mini .nav-foot { align-items: center !important; gap: 8px !important; }
.shell.nav-mini .nav-foot #swGrp { gap: 8px !important; align-items: center; }
.shell.nav-mini .nav-foot #swGrp > button { display: flex; align-items: center; justify-content: center; }
.shell.nav-mini .nav-foot .theme-pick { display: flex; align-items: center; justify-content: center; }
.shell.nav-mini .nav-foot #secBtn { display: flex; align-items: center; justify-content: center; position: relative; }
.shell.nav-mini .nav-foot #secBtn #secDot { position: absolute; top: 7px; right: 7px; }
/* Sidebar kecil: semua tombol bawah 46 x 46 (sama persis), kotak dihitung dari tepi luar */
.shell.nav-mini .nav-foot #dutyBtn, .shell.nav-mini .nav-foot #logoutBtn, .shell.nav-mini .nav-foot #secBtn,
.shell.nav-mini .nav-foot .theme-pick, .shell.nav-mini .nav-foot #swGrp > button, .shell.nav-mini .nav-foot #meAv {
  box-sizing: border-box !important; width: 46px !important; min-width: 46px !important; max-width: 46px !important;
  height: 46px !important; min-height: 46px !important; max-height: 46px !important; margin-left: auto !important; margin-right: auto !important;
}
.shell.nav-mini .nav-foot #meAv { border-radius: 50% !important; }

/* ===== Akun CS (Akses Owner): form tambah dan daftar CS, mengikuti tema ===== */
.cs-owner-card { display: grid; gap: 10px; padding: 16px 18px !important; }
.cs-owner-card h3 { margin: 0; font-size: 15px; color: var(--ink); }
.cs-owner-card .sub { margin: 0; font-size: 12.5px; color: var(--muted); }
.cs-owner-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.cs-owner-form input { flex: 1 1 180px; min-width: 0; height: 40px; box-sizing: border-box; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card-bg, #FFFFFF); color: var(--ink); font: inherit; font-size: 13px; outline: none; }
.cs-owner-form input::placeholder { color: var(--muted); }
.cs-owner-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ft-accbg, rgba(124, 58, 237, .15)); }
.cs-owner-form button { height: 40px; padding: 0 16px; border: 0; border-radius: 12px; font: inherit; font-size: 13px; font-weight: 700; color: #FFFFFF; cursor: pointer;
  background: var(--ft-duty, linear-gradient(135deg, #7C3AED, #8B5CF6)); box-shadow: 0 8px 18px rgba(0, 0, 0, .12); }
.cs-owner-form button:disabled { opacity: .6; cursor: default; }
.cs-owner-card .err, .cs-owner-card p.err { margin: 0; font-size: 12.5px; color: var(--st-bad, #B42318); }
.cs-owner-list { display: grid; gap: 8px; }
.cs-owner-list > p.sub { margin: 0; font-size: 12.5px; color: var(--muted); }
.cs-owner-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-bg, #FFFFFF); min-width: 0; }
.cs-owner-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cs-owner-info b { font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-owner-info small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-owner-row .pchip { flex: none; }
.cs-owner-row button { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.cs-owner-row button:disabled { opacity: .6; cursor: default; }
.cs-owner-row .cs-on { background: var(--st-ok-bg, #E3F6EA); color: var(--st-ok, #0B7A3E); border-color: var(--st-ok-bg, #E3F6EA); }
.cs-owner-row .cs-off { background: var(--st-bad-bg, #FDECEA); color: var(--st-bad, #B42318); border-color: var(--st-bad-bg, #FDECEA); }
@media (max-width: 560px) { .cs-owner-row { flex-wrap: wrap; } .cs-owner-row > button { margin-left: auto; } }

/* ===== Layar desktop: menyesuaikan tinggi (tampilan di layar tinggi tidak berubah) ===== */
/* Sidebar bisa digulir dan bagian bawah (status, Mulai jaga, tema, Keluar) tetap terlihat */
html .nav { overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
html .nav::-webkit-scrollbar { display: none; }
html .nav .nav-foot { position: sticky; bottom: 0; z-index: 2; background: var(--ft-navbg, #0F2233); padding-bottom: 8px; }
/* Gauge Beban CPU di dalam kartu router utama */
.cpu-slot { display: flex; justify-content: center; margin-top: 6px; }
/* Tombol naik-turun bagian bawah sidebar */
html .nav .nav-foot .foot-toggle { width: 100%; margin: 0 0 6px; padding: 6px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 10px; background: rgba(255, 255, 255, .06); color: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
html .nav .nav-foot.tutup > :not(.foot-toggle) { display: none !important; }
/* Layar pendek: logo sedikit lebih kecil; layar tinggi tetap 188px */
@media (min-width: 901px) and (max-height: 900px) {
  html .shell:not(.nav-mini) .logo { width: 128px !important; height: 128px !important; }
  html .shell:not(.nav-mini) .brand { padding: 4px 10px !important; }
}
@media (min-width: 901px) and (max-height: 760px) {
  html .shell:not(.nav-mini) .logo { width: 104px !important; height: 104px !important; }
}

/* Warna latar bagian bawah sidebar per tema (agar menu yang digulir tidak tembus) */
:root { --ft-navbg: #0F2233; }
html[data-tema="siang"] { --ft-navbg: #FFFFFF; }
html[data-tema="tegas"] { --ft-navbg: #FFFFFF; }
html[data-tema="putih"] { --ft-navbg: #FFFFFF; }
html[data-tema="glass"] { --ft-navbg: #EEF0F8; }
html[data-tema="malam"][data-theme="dark"] { --ft-navbg: #161626; }

/* Banner notifikasi wajib (tampil sampai izin notifikasi aktif) */
.notif-wajib { position: fixed; top: 14px; right: 14px; z-index: 400; width: min(360px, calc(100vw - 28px)); box-sizing: border-box; padding: 14px 16px; border-radius: 16px;
  display: grid; gap: 6px; background: var(--card-bg, #FFFFFF); color: var(--ink, #1F2937); border: 1px solid var(--st-warn, #B45309); box-shadow: 0 14px 30px rgba(15, 34, 51, .18); }
.notif-wajib b { font-size: 14px; }
.notif-wajib span { font-size: 12.5px; line-height: 1.4; color: var(--muted, #6B7280); }
.notif-wajib button { justify-self: start; margin-top: 4px; height: 36px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: #FFFFFF; background: var(--ft-duty, linear-gradient(135deg, #7C3AED, #8B5CF6)); }

/* Banner notifikasi wajib: di alur halaman (tidak menutupi tombol di bawahnya) */
.notif-wajib { position: static !important; width: 100%; box-sizing: border-box; margin: 0 0 12px; padding: 10px 14px; border-radius: 14px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; box-shadow: none; }
.notif-wajib b { white-space: nowrap; }
.notif-wajib span { flex: 1 1 320px; }
.notif-wajib button { margin: 0; height: 34px; }
.bmenu-i:disabled { opacity: .55; cursor: not-allowed; }

/* Menu aksi kartu pelanggan: terbuka ke atas bila kartu dekat bawah layar */
.bmenu.naik { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 4px; transform-origin: bottom right; }

/* Tombol Isolir / Buka di kartu pelanggan (sejajar dengan Perpanjang) */
.bbtn.iso-btn { background: #FDECEA; color: #B42318; border: 1px solid #F5C2BD; font-weight: 700; }
.bbtn.iso-btn:hover { background: #FBD9D5; }
.bbtn.iso-btn:disabled, .bbtn.iso-buka:disabled { opacity: .55; cursor: not-allowed; }
.bbtn.iso-buka { background: #E7F6EE; color: #0B7A3E; border: 1px solid #BFE8D2; font-weight: 700; }
.bbtn.iso-buka:hover { background: #D3F0E0; }
html[data-theme="dark"] .bbtn.iso-btn { background: rgba(255, 138, 128, .16); color: #FFA59E; border-color: rgba(255, 138, 128, .3); }
html[data-theme="dark"] .bbtn.iso-buka { background: rgba(91, 227, 160, .14); color: #6EE7A0; border-color: rgba(91, 227, 160, .3); }

/* Popup konfirmasi (pengganti kotak bawaan browser) */
.bil-tanya { max-width: 420px; }
.bil-tanya .bil-tanya-p { margin: 4px 0 14px; font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-line; }

/* Pilihan nada notifikasi di dalam menu Notifikasi */
.ip-nada { display: grid; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line, #E5E3EC); }
.ip-nada small { font-size: 11.5px; font-weight: 700; color: var(--muted, #6B6880); letter-spacing: .02em; }
.ip-nada-pilih { display: flex; gap: 6px; flex-wrap: wrap; }
.ip-nada-pilih button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line, #E5E3EC); background: var(--card-bg, #FFFFFF); color: var(--ink, #1F2937); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.ip-nada-pilih button.on { background: var(--pu-grad, linear-gradient(135deg, #7C3AED, #8B5CF6)); border-color: transparent; color: #FFFFFF; }
