:root {
  --lk-primary: #0f766e;
  --lk-primary-600: #0d9488;
  --lk-primary-100: #ccfbf1;
  --lk-primary-50: #f0fdfa;
  --lk-income: #059669;
  --lk-income-bg: #ecfdf5;
  --lk-expense: #e11d48;
  --lk-expense-bg: #fff1f2;
  --lk-transfer: #2563eb;
  --lk-transfer-bg: #eff6ff;
  --lk-debt: #7c3aed;
  --lk-debt-bg: #f5f3ff;
  --lk-bg: #f4f6f9;
  --lk-card: #ffffff;
  --lk-border: #e8ecf1;
  --lk-text: #0f172a;
  --lk-muted: #64748b;
  --lk-sidebar-w: 264px;
  --lk-topbar-h: 65px; /* tinggi topbar termasuk garis bawahnya */
  --lk-radius: 16px;
  --lk-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--lk-bg);
  color: var(--lk-text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lk-primary); text-decoration: none; }
a:hover { color: var(--lk-primary-600); }
.text-muted { color: var(--lk-muted) !important; }
.fw-600 { font-weight: 600; }
.fs-13 { font-size: .87rem; }
.fs-12 { font-size: .8rem; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Layout ---------- */
.lk-shell { display: flex; min-height: 100vh; }
.lk-sidebar {
  width: var(--lk-sidebar-w);
  background: #0b1f2a;
  background: linear-gradient(180deg, #0c2a33 0%, #0b1f2a 100%);
  color: #cbd5e1;
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  padding: 20px 16px;
  z-index: 1030;
  transition: transform .25s ease;
  /* Menu lebih tinggi dari layar (layar pendek / zoom besar): gulir di dalam sidebar. */
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, .35) transparent;
}
.lk-sidebar::-webkit-scrollbar { width: 6px; }
.lk-sidebar::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .35); border-radius: 999px; }
.lk-sidebar .lk-nav, .lk-sidebar .lk-brand, .lk-sidebar .lk-sidebar-foot { flex-shrink: 0; }
.lk-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; color: #fff; }
.lk-brand .mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  display: grid; place-items: center; font-size: 20px; color: #fff;
  box-shadow: 0 8px 20px -8px rgba(20, 184, 166, .8);
}
.lk-brand .name { font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.lk-brand .sub { font-size: .72rem; color: #94a3b8; font-weight: 500; }
.lk-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.lk-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px; color: #b6c2cf; font-weight: 500;
  transition: background .15s, color .15s;
}
.lk-nav a i { font-size: 1.1rem; width: 22px; text-align: center; opacity: .9; }
.lk-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.lk-nav a.active { background: rgba(20, 184, 166, .18); color: #fff; box-shadow: inset 3px 0 0 #2dd4bf; }
.lk-nav .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 12px 6px; font-weight: 700; }
/* Pribadi | Perusahaan: bentuknya sama dengan .ka-sisi-ruang di Keuangan Perusahaan (Manava, html.ka-dalam-lk). */
.lk-ruang { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 10px; padding: 4px; border-radius: 14px; background: rgba(255, 255, 255, .06); flex-shrink: 0; }
.lk-ruang > * { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 6px; border-radius: 11px; font-size: 13px; font-weight: 700; color: #94a3b8; text-decoration: none; transition: color .15s, background .15s; }
.lk-ruang > * i { font-size: 13px; }
.lk-ruang a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.lk-ruang .aktif { background: rgba(20, 184, 166, .22); color: #fff; box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .35); }
.lk-sidebar-foot { margin-top: auto; padding: 12px 8px 0; font-size: .75rem; color: #64748b; }
.lk-env { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.06); font-weight: 600; }
.lk-env.live { color: #fda4af; }
.lk-env.local { color: #6ee7b7; }

.lk-main { margin-left: var(--lk-sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lk-topbar {
  position: sticky; top: 0; z-index: 1020;
  background: rgba(244, 246, 249, .85); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; border-bottom: 1px solid transparent;
}
.lk-topbar h1 { font-size: 1.2rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.lk-topbar .spacer { flex: 1; }
.lk-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--lk-primary-100); color: var(--lk-primary); display: grid; place-items: center; font-weight: 700; }
.lk-content { padding: 8px 28px 40px; }
.lk-burger { display: none; }

@media (max-width: 991.98px) {
  .lk-sidebar { transform: translateX(-100%); }
  .lk-sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .lk-main { margin-left: 0; }
  .lk-topbar, .lk-content { padding-left: 16px; padding-right: 16px; }
  .lk-burger { display: inline-flex; }
}

/* ---------- Components ---------- */
.card { border: 1px solid var(--lk-border); border-radius: var(--lk-radius); box-shadow: var(--lk-shadow); background: var(--lk-card); }
.card-header { background: transparent; border-bottom: 1px solid var(--lk-border); font-weight: 700; padding: 16px 20px; }
.card-body { padding: 20px; }
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0; }

.btn { border-radius: 10px; font-weight: 600; padding: .5rem .95rem; }
.btn-sm { padding: .32rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-primary { background: var(--lk-primary); border-color: var(--lk-primary); }
.btn-primary:hover, .btn-primary:focus { background: #115e59; border-color: #115e59; }
.btn-outline-primary { color: var(--lk-primary); border-color: #99f6e4; }
.btn-outline-primary:hover { background: var(--lk-primary-50); color: var(--lk-primary); border-color: var(--lk-primary); }
.btn-soft { background: #f1f5f9; border-color: #f1f5f9; color: #334155; }
.btn-soft:hover { background: #e2e8f0; color: #0f172a; }
.btn-income { background: var(--lk-income); border-color: var(--lk-income); color: #fff; }
.btn-income:hover { background: #047857; color: #fff; }
.btn-expense { background: var(--lk-expense); border-color: var(--lk-expense); color: #fff; }
.btn-expense:hover { background: #be123c; color: #fff; }
.btn-debt { background: var(--lk-debt); border-color: var(--lk-debt); color: #fff; }
.btn-debt:hover { background: #6d28d9; color: #fff; }
.text-debt { color: var(--lk-debt) !important; }

.form-control, .form-select { border-radius: 10px; border-color: #dfe5ec; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--lk-primary-600); box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .15); }
.form-label { font-weight: 600; font-size: .85rem; color: #334155; margin-bottom: .35rem; }
.input-group-text { border-radius: 10px; border-color: #dfe5ec; background: #f8fafc; }

.badge { font-weight: 600; border-radius: 8px; padding: .35em .6em; }
.badge-income { background: var(--lk-income-bg); color: var(--lk-income); }
.badge-expense { background: var(--lk-expense-bg); color: var(--lk-expense); }
.badge-transfer { background: var(--lk-transfer-bg); color: var(--lk-transfer); }
.badge-soft { background: #f1f5f9; color: #475569; }

.text-income { color: var(--lk-income) !important; }
.text-expense { color: var(--lk-expense) !important; }
.text-transfer { color: var(--lk-transfer) !important; }

.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; border-bottom: 1px solid var(--lk-border); padding: 12px 14px; white-space: nowrap; background: #fafbfc; }
.table tbody td { padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid #f1f4f8; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* stat tiles */
.stat { display: flex; gap: 14px; align-items: flex-start; }
.stat .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0; }
.stat .lbl { font-size: .8rem; color: var(--lk-muted); font-weight: 600; }
.stat .val { font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; white-space: nowrap; }
@media (max-width: 575.98px) { .stat .val { font-size: 1.05rem; } .stat .ico { width: 38px; height: 38px; font-size: 1rem; } }
.stat .delta { font-size: .78rem; font-weight: 600; }

/* account cards */
.acc-card { position: relative; overflow: hidden; border-radius: var(--lk-radius); padding: 18px; color: #fff; min-height: 128px; box-shadow: var(--lk-shadow); }
.acc-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.acc-card .type { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; font-weight: 700; }
.acc-card .name { font-weight: 700; font-size: 1.02rem; margin-top: 2px; }
.acc-card .bal { font-size: 1.35rem; font-weight: 800; margin-top: 14px; letter-spacing: -.02em; }
.acc-card .ic { position: absolute; right: 16px; top: 14px; font-size: 1.4rem; opacity: .9; z-index: 1; }
.acc-card.inactive { opacity: .55; filter: grayscale(.4); }
.acc-card .acc-sub { font-size: .74rem; opacity: .9; margin-top: 6px; position: relative; z-index: 1; }
.acc-card .acc-prog { height: 5px; border-radius: 999px; background: rgba(255,255,255,.28); margin-top: 10px; overflow: hidden; position: relative; z-index: 1; }
.acc-card .acc-prog > div { height: 100%; background: #fff; border-radius: 999px; }

.cat-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.cat-chip { display: inline-flex; align-items: center; gap: 8px; }

.empty { text-align: center; padding: 48px 20px; color: var(--lk-muted); }
.empty i { font-size: 2.4rem; opacity: .4; display: block; margin-bottom: 12px; }

.filter-bar .form-control, .filter-bar .form-select { min-width: 0; }
.progress { height: 8px; border-radius: 999px; background: #e9eef3; }
.progress-bar { background: var(--lk-primary-600); }

.dropzone {
  border: 2px dashed #cbd5e1; border-radius: var(--lk-radius); padding: 28px; text-align: center; color: var(--lk-muted);
  background: #fafcfd; cursor: pointer; transition: all .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--lk-primary-600); background: var(--lk-primary-50); color: var(--lk-primary); }
.dropzone i { font-size: 2rem; display: block; margin-bottom: 8px; }
.file-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.file-list .chip { background: #fff; border: 1px solid var(--lk-border); padding: 4px 10px; border-radius: 999px; font-size: .8rem; display: inline-flex; gap: 6px; align-items: center; }

/* info icon + tooltip */
.lk-info { color: #94a3b8; cursor: help; font-size: .9em; margin-left: 4px; vertical-align: -1px; transition: color .15s; }
.lk-info:hover { color: var(--lk-primary); }
.tooltip { --bs-tooltip-bg: #0f172a; --bs-tooltip-opacity: 1; --bs-tooltip-max-width: 280px; --bs-tooltip-padding-x: 10px; --bs-tooltip-padding-y: 8px; --bs-tooltip-font-size: .8rem; --bs-tooltip-border-radius: 8px; }
.tooltip-inner { text-align: left; line-height: 1.45; }

/* form modal rekening */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type-grid label { margin: 0; }
.type-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--lk-border); border-radius: 12px; font-size: .78rem; font-weight: 600; color: #475569; cursor: pointer; background: #fff; transition: all .15s; text-align: center; line-height: 1.15; }
.type-item i { font-size: 1.2rem; }
.type-item:hover { border-color: #99f6e4; background: var(--lk-primary-50); }
input:checked + .type-item { border-color: var(--lk-primary); background: var(--lk-primary-50); color: var(--lk-primary); box-shadow: 0 0 0 2px rgba(13, 148, 136, .18); }
@media (max-width: 575.98px) { .type-grid { grid-template-columns: repeat(2, 1fr); } }
.form-section { background: #f8fafc; border: 1px solid var(--lk-border); border-radius: 12px; padding: 14px 16px; }
.form-section-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--lk-muted); font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick label { margin: 0; }
.color-pick span { display: block; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--lk-border); transition: transform .1s; }
.color-pick input:checked + span { box-shadow: 0 0 0 2px #0f172a; transform: scale(1.1); }
.modal-body.scrollable { max-height: 72vh; overflow-y: auto; }

/* toast */
.lk-toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.lk-toast { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font-size: .9rem; display: flex; gap: 10px; align-items: center; animation: lk-in .2s ease; max-width: 380px; }
.lk-toast.success { background: #065f46; }
.lk-toast.danger { background: #9f1239; }
@keyframes lk-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side {
  background: radial-gradient(1200px 600px at 10% 10%, rgba(45, 212, 191, .35), transparent 60%),
              radial-gradient(800px 500px at 90% 90%, rgba(14, 165, 233, .35), transparent 60%),
              linear-gradient(160deg, #0c2a33, #0b1f2a);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side h2 { font-weight: 800; font-size: 2.1rem; letter-spacing: -.02em; line-height: 1.15; }
.auth-side p { color: #b6c2cf; font-size: 1.02rem; max-width: 460px; }
.auth-feat { display: grid; gap: 14px; margin-top: 28px; }
.auth-feat div { display: flex; gap: 12px; align-items: flex-start; color: #d5dee7; }
.auth-feat i { font-size: 1.2rem; color: #2dd4bf; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; }
.btn-google { background: #fff; border: 1px solid #dfe5ec; color: #0f172a; display: flex; align-items: center; justify-content: center; gap: 10px; padding: .7rem; }
.btn-google:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-manava { background: #0f766e; border: 1px solid #0f766e; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; padding: .7rem; font-weight: 600; }
.btn-manava:hover, .btn-manava:focus-visible { background: #115e59; border-color: #115e59; color: #fff; }
.btn-manava img { background: #fff; border-radius: 5px; padding: 2px; }
/* Kartu Akun Manava di Pengaturan */
.mnv-orgs { display: flex; flex-direction: column; gap: 8px; }
.mnv-org { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #e6ebf1; border-radius: 12px; }
.mnv-org-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #ecfdf5; color: #0f766e; }
.sep { display: flex; align-items: center; gap: 12px; color: var(--lk-muted); font-size: .8rem; margin: 18px 0; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--lk-border); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 272px 1fr; gap: 16px; height: calc(100vh - 118px); min-height: 560px; }
.chat-side { display: flex; flex-direction: column; min-height: 0; }
.chat-list { overflow: auto; flex: 1; padding: 8px; }
.chat-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; color: #334155; font-size: .86rem; text-decoration: none; }
.chat-item .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .d { font-size: .7rem; color: var(--lk-muted); flex-shrink: 0; }
.chat-item .del { opacity: 0; color: #94a3b8; padding: 2px 4px; border-radius: 6px; }
.chat-item:hover { background: #f1f5f9; color: #0f172a; }
.chat-item:hover .del { opacity: 1; }
.chat-item .del:hover { color: var(--lk-expense); background: var(--lk-expense-bg); }
.chat-item.active { background: var(--lk-primary-50); color: var(--lk-primary); font-weight: 600; }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--lk-border); }
.chat-head .who { font-weight: 700; }
.chat-head .model { font-size: .72rem; color: var(--lk-muted); display: flex; align-items: center; gap: 6px; }
.chat-head .model .dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.chat-head .model .dot.stale { background: #f59e0b; }
.chat-scroll { flex: 1; overflow: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; background: #fafbfc; }
.row-msg { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 8px; }
.row-msg.user { flex-direction: row-reverse; }
.row-msg .av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: .85rem; background: var(--lk-primary-100); color: var(--lk-primary); }
.row-msg.user .av { background: #e2e8f0; color: #334155; }
.row-msg .bubble-wrap { max-width: 76%; min-width: 0; }
.msg { padding: 11px 15px; border-radius: 16px; font-size: .92rem; line-height: 1.55; }
.msg.user { background: var(--lk-primary); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.model { background: #fff; border: 1px solid var(--lk-border); border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { padding-left: 20px; margin-bottom: .5rem; }
.msg table { font-size: .84rem; margin: 6px 0; border-collapse: collapse; }
.msg table td, .msg table th { padding: 4px 8px; border: 1px solid var(--lk-border); }
.msg-time { font-size: .68rem; color: #94a3b8; margin-top: 3px; padding: 0 4px; }
.row-msg.user .msg-time { text-align: right; }
.job-card { border: 1px solid var(--lk-border); border-radius: 12px; padding: 10px 12px; background: #fff; font-size: .84rem; margin-top: 6px; color: #0f172a; }
.job-card .name { font-weight: 600; display: flex; align-items: center; gap: 6px; min-width: 0; }
.job-card .name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-card .st { font-size: .74rem; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; white-space: nowrap; }
.job-card .st.processing { background: #e0f2fe; color: #0369a1; }
.job-card .st.done { background: #fef3c7; color: #92400e; }
.job-card .st.committed { background: var(--lk-income-bg); color: var(--lk-income); }
.job-card .st.failed { background: var(--lk-expense-bg); color: var(--lk-expense); }
.job-card .progress { height: 6px; margin-top: 8px; }
.job-card .act { margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.job-card .act:empty { display: none; }
.job-card.compact { padding: 6px 10px; background: #fff; border-color: var(--lk-border); color: #0f172a; font-size: .8rem; }
.job-card.compact .name i { color: var(--lk-primary); }
.proposal { background: #f8fafc; border: 1px solid var(--lk-border); border-radius: 12px; padding: 10px 12px; margin-top: 10px; overflow-x: auto; }
.proposal table td { padding: 4px 6px; border: 0; vertical-align: middle; }
.proposal .form-select, .proposal .form-control { padding: .25rem .5rem; font-size: .82rem; border-radius: 8px; min-width: 90px; }
.chat-input { border-top: 1px solid var(--lk-border); padding: 10px 14px 12px; background: #fff; border-radius: 0 0 var(--lk-radius) var(--lk-radius); }
.composer { display: flex; align-items: flex-end; gap: 8px; border: 1px solid #dfe5ec; border-radius: 14px; padding: 6px 6px 6px 10px; background: #fff; transition: box-shadow .15s, border-color .15s; }
.composer:focus-within { border-color: var(--lk-primary-600); box-shadow: 0 0 0 .2rem rgba(13,148,136,.12); }
.composer textarea { flex: 1; resize: none; border: 0; box-shadow: none !important; padding: 8px 4px; max-height: 160px; font-size: .93rem; background: transparent; }
.composer .btn-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; padding: 0; }
.composer-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .74rem; color: var(--lk-muted); flex-wrap: wrap; }
.composer-meta .form-select { width: auto; font-size: .76rem; padding: .2rem 1.6rem .2rem .5rem; border-radius: 8px; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 2px; }
.typing span { width: 7px; height: 7px; background: #94a3b8; border-radius: 50%; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-empty { margin: auto; text-align: center; max-width: 520px; color: var(--lk-muted); }
.chat-empty .big { width: 56px; height: 56px; border-radius: 18px; background: var(--lk-primary-100); color: var(--lk-primary); display: grid; place-items: center; font-size: 1.6rem; margin: 0 auto 12px; }
.chat-empty h5 { color: #0f172a; font-weight: 800; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.suggest button { background: #fff; border: 1px solid var(--lk-border); border-radius: 999px; padding: 6px 12px; font-size: .82rem; color: #334155; }
.suggest button:hover { border-color: var(--lk-primary); color: var(--lk-primary); }
@media (max-width: 991.98px) { .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 118px); } .chat-main { min-height: 0; } .row-msg .bubble-wrap { max-width: 90%; } }

/* ---------- Hover yang konsisten ---------- */
a.acc-card, a.acc-card:hover, a.acc-card:focus, a.acc-card:active { color: #fff; }
a.acc-card:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(15,23,42,.35); }
a.text-reset:hover, a.text-reset:focus { color: inherit; }
a.card, a.card:hover { color: inherit; text-decoration: none; }
.clickable { cursor: pointer; }
.card.clickable:hover { border-color: #b6e3dd; box-shadow: 0 10px 28px -14px rgba(13,148,136,.35); transform: translateY(-1px); }
.card.clickable .val { text-decoration: underline dotted transparent; text-underline-offset: 4px; transition: text-decoration-color .15s; }
.card.clickable:hover .val { text-decoration-color: currentColor; }
.clickable-row { cursor: pointer; border-radius: 8px; transition: background .15s; }
/* Hover hanya boleh mengubah warna. Sebelumnya margin & padding ikut berubah,
   sehingga baris menyusut dan bergeser saat disentuh kursor: kursor jadi lepas
   dari baris lalu masuk lagi, dan tampilannya berkedip cepat. */
div.clickable-row:hover { background: #f1f5f9; }
.hl-pad { padding: 4px 6px; margin: 0 -6px; }
tr.clickable-row:hover td { background: #f8fafc; }
.top-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f1f4f8; text-decoration: none; color: inherit; }
.top-item:last-child { border-bottom: 0; }
.top-item:hover { background: #f8fafc; color: inherit; }
.top-item .rank { width: 22px; height: 22px; border-radius: 50%; background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.top-item .sub, .cat-table .sub, .detail-table .sub { font-size: .74rem; color: var(--lk-muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-table { font-size: .86rem; table-layout: fixed; width: 100%; }
.cat-table td, .cat-table th { padding: 7px 8px; vertical-align: middle; overflow: hidden; }
.cat-table tfoot th { border-top: 2px solid var(--lk-border); font-size: .84rem; }
.btn-group .btn-soft.active { background: var(--lk-primary); color: #fff; border-color: var(--lk-primary); }

/* ---------- Dashboard: sapaan, animasi, komponen ---------- */
.dash-hero { position: relative; overflow: hidden; border-radius: var(--lk-radius); padding: 18px 22px; margin-bottom: 16px; background: linear-gradient(120deg, #ecfeff 0%, #f0fdfa 40%, #f5f3ff 100%); border: 1px solid #e0f2f1; }
.dash-hero .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .55; pointer-events: none; animation: blob 14s ease-in-out infinite alternate; }
.dash-hero .b1 { width: 260px; height: 260px; background: #99f6e4; top: -120px; left: -60px; }
.dash-hero .b2 { width: 220px; height: 220px; background: #c4b5fd; right: 10%; top: -140px; animation-delay: -5s; }
.dash-hero .b3 { width: 180px; height: 180px; background: #bae6fd; right: -40px; bottom: -120px; animation-delay: -9s; }
@keyframes blob { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, 20px) scale(1.15); } }
.hero-greet { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.hero-sub { font-size: .8rem; color: var(--lk-muted); }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.2s ease-in-out 1s 2; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-8deg); } 45% { transform: rotate(14deg); } 60% { transform: rotate(-4deg); } 75% { transform: rotate(8deg); } }
.dash-hero .month-nav { background: rgba(255,255,255,.85); }
.reveal { opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .5s ease var(--d, 0ms), transform .5s cubic-bezier(.2,.8,.2,1) var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.kpi { position: relative; overflow: hidden; }
.kpi .stat { position: relative; z-index: 1; }
.kpi .spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 44px; opacity: .9; pointer-events: none; }
.kpi .spark .line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s ease-out .3s forwards; }
.kpi .spark .dot { opacity: 0; animation: pop .4s ease-out 1.7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.card.clickable:hover .ico { transform: rotate(-8deg) scale(1.08); }
.stat .ico { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.acc-card.tilt { transition: transform .18s ease, box-shadow .18s ease; transform-style: preserve-3d; will-change: transform; }
.acc-card .shine { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx, 70%) var(--my, 30%), rgba(255,255,255,.35), transparent 55%); opacity: 0; transition: opacity .2s; }
.acc-card:hover .shine { opacity: 1; }
.grow-w { width: 0; animation: growW 1.1s cubic-bezier(.2,.8,.2,1) .4s forwards; }
@keyframes growW { to { width: var(--w, 0%); } }
.health-card .ring { position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.health-card .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.health-card .ring circle { fill: none; stroke-width: 11; stroke-linecap: round; }
.health-card .ring .bg { stroke: #eef2f6; }
.health-card .ring-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }
.health-card .ring-val small { font-size: .7rem; color: var(--lk-muted); font-weight: 600; margin-left: 2px; margin-top: 8px; }
.emoji-bounce { display: inline-block; animation: bounce 1.2s ease-in-out .8s 3; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.hp .progress { height: 7px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225,29,72,.35); } 50% { box-shadow: 0 0 0 7px rgba(225,29,72,0); } }
.donut-wrap { position: relative; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.cat-row { display: flex; align-items: center; gap: 8px; font-size: .85rem; padding: 4px 6px; border-radius: 8px; position: relative; overflow: hidden; }
.cat-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--c, #94a3b8); opacity: .12; transition: width .45s cubic-bezier(.2,.8,.2,1); border-radius: 8px; }
.cat-row:hover::before { width: var(--p, 0%); }
.cat-row .pct { width: 36px; text-align: right; font-size: .78rem; }
.cat-scroll { max-height: 380px; overflow: auto; }
.cat-table thead th { position: sticky; top: 0; z-index: 1; }
.cat-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cat-cell .cat-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.cat-cell .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: .84rem; }
.cat-tr { position: relative; }
.cat-tr td:first-child { position: relative; }
.cat-tr td:first-child::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; background: var(--c, #94a3b8); opacity: .14; border-radius: 6px; transition: width .4s ease; }
.cat-tr:hover td:first-child::before { width: var(--p, 0%); }
.top-item { position: relative; transition: background .15s ease; }
.top-item:hover { background: #f8fafc; }
.top-item:hover .rank { transform: scale(1.08); }
.top-item .rank { transition: transform .2s; }
.top-item .rank.r1 { background: #fef3c7; color: #b45309; } .top-item .rank.r2 { background: #e2e8f0; color: #334155; } .top-item .rank.r3 { background: #fde8d7; color: #9a3412; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2000; display: none; }
body.slide-left .lk-content { animation: slideL .25s ease forwards; }
body.slide-right .lk-content { animation: slideR .25s ease forwards; }
@keyframes slideL { to { opacity: 0; transform: translateX(-30px); } }
@keyframes slideR { to { opacity: 0; transform: translateX(30px); } }
.lk-topbar { background: rgba(244, 246, 249, .94); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .grow-w { animation: none; width: var(--w, 0%); } .dash-hero .blob, .wave, .emoji-bounce, .pulse, .kpi .spark .line, .kpi .spark .dot { animation: none; stroke-dashoffset: 0; opacity: 1; } }
@media (max-width: 767.98px) { .dash-hero { padding: 14px; } .hero-greet { font-size: 1rem; } .kpi .spark { width: 40%; height: 34px; opacity: .55; } .health-card .ring { width: 92px; height: 92px; } .health-card .ring-val { font-size: 1.3rem; } }

/* ---------- Aksi cepat: FAB + panel ---------- */
.lk-fab { position: fixed; right: 22px; bottom: 22px; width: 58px; height: 58px; border-radius: 50%; border: 0; z-index: 1035; color: #fff; font-size: 1.5rem; display: grid; place-items: center; background: linear-gradient(135deg, #14b8a6, #0d9488); box-shadow: 0 12px 30px -8px rgba(13,148,136,.7); transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.lk-fab:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 16px 34px -8px rgba(13,148,136,.8); }
.lk-fab i { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.lk-fab.open i { transform: rotate(135deg); }
.lk-fab::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(20,184,166,.45); animation: fabPulse 2.4s ease-out infinite; }
.lk-fab.open::after, .lk-fab:hover::after { animation: none; opacity: 0; }
@keyframes fabPulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.lk-panel { position: fixed; right: 22px; bottom: 92px; width: 440px; max-width: calc(100vw - 32px); max-height: min(78vh, 760px); background: #fff; border-radius: 20px; box-shadow: 0 30px 80px -20px rgba(15,23,42,.4), 0 0 0 1px var(--lk-border); z-index: 1034; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(16px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: opacity .22s ease, transform .28s cubic-bezier(.2,.8,.2,1); }
.lk-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.lk-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--lk-border); background: #fafbfc; }
.lk-tabs { position: relative; display: inline-flex; background: #eef2f6; border-radius: 12px; padding: 4px; gap: 2px; }
.lk-tabs button { position: relative; z-index: 1; border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: .84rem; color: #475569; transition: color .2s; }
.lk-tabs button.active { color: var(--lk-primary); }
.lk-tabs .lk-tab-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; background: #fff; border-radius: 9px; box-shadow: 0 2px 8px -2px rgba(15,23,42,.2); transition: left .25s cubic-bezier(.2,.8,.2,1), width .25s cubic-bezier(.2,.8,.2,1); }
.lk-panel-head .btn-close { margin-left: auto; }
.lk-panel-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.ptab { display: none; }
.ptab.active { display: block; animation: msg-in .22s ease-out; }
#quickChat.active { display: flex; flex-direction: column; height: 100%; }
#quickTrxForm { padding: 14px 16px 16px; position: relative; }
.magic-wrap { position: relative; margin-bottom: 12px; }
.magic-wrap > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #7c3aed; }
.magic { width: 100%; border: 1px dashed #c4b5fd; background: linear-gradient(90deg, #faf5ff, #f0fdfa); border-radius: 12px; padding: 10px 12px 10px 36px; font-size: .9rem; outline: none; transition: border-color .15s, box-shadow .15s; }
.magic:focus { border-style: solid; border-color: #7c3aed; box-shadow: 0 0 0 .2rem rgba(124,58,237,.12); }
.magic-hint { display: block; font-size: .72rem; color: #7c3aed; min-height: 1em; padding: 3px 4px 0; }
.type-pill { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); background: #eef2f6; border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.type-pill button { position: relative; z-index: 1; border: 0; background: transparent; padding: 8px 4px; border-radius: 9px; font-weight: 700; font-size: .8rem; color: #64748b; transition: color .2s; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.type-pill button.active { color: #fff; }
.type-pill .ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 4); border-radius: 9px; background: var(--lk-expense); transition: transform .28s cubic-bezier(.2,.8,.2,1), background .28s; }
.type-pill[data-t="income"] .ind { transform: translateX(100%); background: var(--lk-income); }
.type-pill[data-t="transfer"] .ind { transform: translateX(200%); background: var(--lk-transfer); }
.type-pill[data-t="debt"] .ind { transform: translateX(300%); background: var(--lk-debt); }
.amount-wrap { display: flex; align-items: baseline; gap: 6px; padding: 6px 4px 2px; }
.amount-wrap .cur { font-weight: 700; color: var(--lk-muted); font-size: 1.1rem; }
.amount-big { flex: 1; min-width: 0; border: 0; border-bottom: 2px solid var(--lk-border); background: transparent; font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; outline: none; padding: 2px 0; font-variant-numeric: tabular-nums; transition: border-color .15s; }
.amount-big:focus { border-bottom-color: var(--lk-primary); }
.amount-big.bump { animation: bump .25s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.chips button { border: 1px solid var(--lk-border); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: .78rem; font-weight: 600; color: #334155; transition: all .15s; }
.chips button:hover { border-color: var(--lk-primary); color: var(--lk-primary); transform: translateY(-1px); }
.chips button.active { background: var(--lk-primary); border-color: var(--lk-primary); color: #fff; }
.chips .clr { color: var(--lk-muted); }
.date-chips .form-control { width: auto; padding: .25rem .5rem; font-size: .8rem; border-radius: 999px; height: 29px; }
.qsec { margin-top: 12px; }
.qlabel { font-size: .72rem; font-weight: 700; color: var(--lk-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.cat-search { border: 0; border-bottom: 1px solid var(--lk-border); font-size: .78rem; margin-left: auto; width: 110px; outline: none; text-transform: none; letter-spacing: 0; font-weight: 500; padding: 2px 4px; }
.acc-pick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.acc-pick button { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--lk-border); background: #fff; border-radius: 12px; padding: 7px 10px; font-size: .82rem; font-weight: 600; color: #334155; transition: all .15s; }
.acc-pick button .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: .85rem; }
.acc-pick button.active { border-color: var(--acc, var(--lk-primary)); background: color-mix(in srgb, var(--acc, var(--lk-primary)) 10%, #fff); transform: translateY(-1px); box-shadow: 0 6px 14px -8px var(--acc, var(--lk-primary)); }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 176px; overflow-y: auto; overflow-x: hidden; padding: 2px; }
.cat-grid button { min-width: 0; border: 1.5px solid transparent; background: #f8fafc; border-radius: 12px; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .68rem; font-weight: 600; color: #475569; line-height: 1.1; transition: all .15s; }
.cat-grid button .ci { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 1rem; background: color-mix(in srgb, var(--c, #94a3b8) 15%, #fff); color: var(--c, #64748b); transition: transform .15s; }
.cat-grid button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-grid button:hover .ci { transform: scale(1.1) rotate(-6deg); }
.cat-grid button.active { border-color: var(--c, var(--lk-primary)); background: color-mix(in srgb, var(--c, #94a3b8) 12%, #fff); color: #0f172a; }
.cat-grid button.hide { display: none; }
.qnote { margin-top: 12px; font-size: .82rem; color: var(--lk-muted); }
.qnote summary { cursor: pointer; list-style: none; }
.qnote summary::-webkit-details-marker { display: none; }
.qsubmit { width: 100%; margin-top: 14px; padding: .7rem; font-size: 1rem; border-radius: 12px; position: relative; overflow: hidden; }
.qsubmit .t { position: relative; z-index: 1; }
.qsubmit::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.25) 50%, rgba(255,255,255,0) 100%); transform: translateX(-100%); }
.qsubmit:hover::before { animation: sheen .9s ease; }
@keyframes sheen { to { transform: translateX(100%); } }
.qsuccess { position: absolute; inset: 0; background: rgba(255,255,255,.96); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; z-index: 5; border-radius: 0 0 20px 20px; }
.qsuccess.show { display: flex; }
.qsuccess .ck { width: 74px; height: 74px; border-radius: 50%; background: var(--lk-income); color: #fff; display: grid; place-items: center; font-size: 2rem; animation: popIn .5s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 0 0 rgba(5,150,105,.4); }
.qsuccess.show .ck { animation: popIn .5s cubic-bezier(.2,.8,.2,1), ring .9s ease .2s; }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ring { to { box-shadow: 0 0 0 28px rgba(5,150,105,0); } }
.qsuccess .txt { font-weight: 800; font-size: 1.1rem; }
/* chat cepat */
.qc-head { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--lk-border); }
.qc-head .form-select { flex: 1; min-width: 0; }
.qc-scroll { flex: 1; min-height: 240px; overflow: auto; padding: 12px; background: #fafbfc; display: flex; flex-direction: column; gap: 8px; }
.qc-empty { margin: auto; text-align: center; color: #334155; font-size: .86rem; }
.qc-empty i { display: block; font-size: 1.6rem; color: var(--lk-primary); margin-bottom: 6px; }
.qc-msg { max-width: 88%; padding: 8px 12px; border-radius: 14px; font-size: .86rem; line-height: 1.5; animation: msg-in .2s ease-out; }
.qc-msg.user { align-self: flex-end; background: var(--lk-primary); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.qc-msg.model { align-self: flex-start; background: #fff; border: 1px solid var(--lk-border); border-bottom-left-radius: 4px; }
.qc-msg p:last-child { margin: 0; } .qc-msg p { margin-bottom: .4rem; } .qc-msg ul, .qc-msg ol { padding-left: 18px; margin-bottom: .4rem; }
.qc-exec { font-size: .78rem; margin-top: 6px; color: var(--lk-income); }
.qc-exec.fail { color: var(--lk-expense); }
.qc-pend { margin-top: 6px; background: #f8fafc; border: 1px solid var(--lk-border); border-radius: 10px; padding: 6px 8px; font-size: .78rem; }
.qc-pend .btn { padding: .2rem .55rem; font-size: .74rem; }
.qc-q { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.qc-q .btn { padding: .2rem .6rem; font-size: .76rem; border-radius: 999px; }
.qc-job { margin-top: 6px; border: 1px solid var(--lk-border); border-radius: 10px; padding: 6px 10px; background: #fff; color: #0f172a; font-size: .8rem; }
.qc-msg.user .qc-job { background: rgba(255,255,255,.95); }
.qc-job .st { font-size: .72rem; background: #f1f5f9; color: #475569; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.qc-job .act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.qc-job .act:empty { display: none; }
.qc-composer { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--lk-border); background: #fff; }
.qc-composer textarea { resize: none; max-height: 100px; font-size: .88rem; }
.qc-composer .btn-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; padding: 0; }
@media (max-width: 575.98px) {
  .lk-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .lk-panel { right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; transform-origin: bottom center; transform: translateY(40px); }
  .lk-panel.open { transform: none; }
  .lk-fab.open { opacity: 0; pointer-events: none; transform: scale(.6); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 150px; }
  .amount-big { font-size: 1.8rem; }
}

/* ---------- Pop-up detail angka ---------- */
.lk-detail .modal-content { border: 0; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(15,23,42,.35); overflow: hidden; }
.lk-detail .modal-body { padding: 0; }
.lk-detail .modal-footer { flex-wrap: wrap; }
.detail-table { table-layout: fixed; min-width: 620px; font-size: .88rem; }
.detail-table thead th { position: sticky; top: 0; z-index: 1; }
.detail-table td { padding: 9px 12px; }
.detail-table .cat-name { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Dialog konfirmasi ---------- */
.lk-confirm .modal-content { border: 0; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(15,23,42,.35); }
.lk-confirm .modal-body { text-align: center; padding: 28px 24px 8px; }
.lk-confirm-icon { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--lk-primary-100); color: var(--lk-primary); }
.lk-confirm-icon.danger { background: var(--lk-expense-bg); color: var(--lk-expense); }
.lk-confirm-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }
.lk-confirm-text { color: var(--lk-muted); font-size: .9rem; margin: 0; }
.lk-confirm .modal-footer { border: 0; padding: 14px 20px 20px; justify-content: center; gap: 8px; }
.lk-confirm .modal-footer .btn { min-width: 110px; }

/* ---------- Tindakan AI ---------- */
.mode-toggle { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; font-weight: 600; color: #334155; cursor: pointer; padding: 4px 10px; border: 1px solid var(--lk-border); border-radius: 999px; background: #fff; }
.mode-toggle .form-check-input { margin: 0; width: 34px; height: 18px; border-radius: 999px; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e"); background-position: left center; background-repeat: no-repeat; background-color: #cbd5e1; border: 0; transition: background-position .2s ease, background-color .2s ease; cursor: pointer; }
.mode-toggle .form-check-input:checked { background-color: var(--lk-primary-600); background-position: right center; }
.acts, .exec, .qbox { margin-top: 10px; border: 1px solid var(--lk-border); border-radius: 12px; background: #f8fafc; padding: 10px 12px; }
.acts-head { font-size: .78rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.act-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; background: #fff; border: 1px solid var(--lk-border); border-radius: 10px; margin-bottom: 6px; }
.act-item .ico { color: var(--lk-primary); font-size: 1rem; margin-top: 2px; }
.act-item.danger .ico { color: var(--lk-expense); }
.act-item.danger { border-color: #fecdd3; background: #fff7f8; }
.act-item .body { flex: 1; min-width: 0; }
.act-item .desc { font-size: .88rem; font-weight: 600; }
.act-item .why { font-size: .76rem; color: var(--lk-muted); margin-top: 2px; }
.act-item .edit { display: grid; grid-template-columns: 130px 1fr 120px 150px 150px; gap: 6px; margin-top: 8px; }
.act-item .edit .form-control, .act-item .edit .form-select { padding: .25rem .5rem; font-size: .8rem; border-radius: 8px; height: 32px; }
.act-item .form-check-input { margin-top: 3px; }
.acts-foot { display: flex; gap: 6px; justify-content: flex-end; margin-top: 4px; }
.exec-item { display: flex; gap: 10px; align-items: center; padding: 6px 4px; font-size: .86rem; }
.exec-item + .exec-item { border-top: 1px dashed var(--lk-border); }
.exec-item .ico { color: var(--lk-income); font-size: 1rem; }
.exec-item.fail .ico { color: var(--lk-expense); }
.exec-item.undone { color: var(--lk-muted); text-decoration: line-through; }
.exec-item.undone .ico { color: #94a3b8; }
.exec-item .body { flex: 1; min-width: 0; }
.qbox { background: #fffbeb; border-color: #fde68a; }
.q-text { font-size: .9rem; font-weight: 600; color: #78350f; margin-bottom: 8px; }
.q-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.q-opts .btn.active { background: var(--lk-primary); color: #fff; border-color: var(--lk-primary); }
.rv-verify { padding: 8px 22px; font-size: .84rem; background: #f0fdf4; border-bottom: 1px solid var(--lk-border); color: #14532d; }
.rv-verify b { font-weight: 700; }
@media (max-width: 991.98px) { .act-item .edit { grid-template-columns: 1fr 1fr; } }

/* ---------- Tinjau import (modal di halaman AI & halaman Import) ---------- */
.modal-review { max-width: min(1340px, 96vw); }
.modal-review .modal-content { border: 0; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(15,23,42,.35); overflow: hidden; }
.modal-review .modal-header { padding: 16px 22px; }
.modal-review .modal-body { padding: 0; }
.modal-review .modal-footer { padding: 12px 22px; background: #fff; }
.rv-bar { display: flex; align-items: center; gap: 14px; padding: 10px 22px; border-bottom: 1px solid var(--lk-border); background: #fff; font-size: .85rem; flex-wrap: wrap; }
.rv-bar .chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.rv-bar .chip.warn { background: #fef3c7; color: #92400e; }
.rv-bar .chip.bad { background: var(--lk-expense-bg); color: var(--lk-expense); }
.rv-bar .form-select { font-size: .82rem; padding: .3rem 1.7rem .3rem .6rem; border-radius: 8px; }
.review-table { font-size: .85rem; table-layout: fixed; min-width: 980px; }
.review-table thead th { position: sticky; top: 0; z-index: 2; background: #fafbfc; padding: 10px 8px; box-shadow: inset 0 -1px 0 var(--lk-border); border: 0; }
.review-table thead th:first-child, .review-table tbody td:first-child { padding-left: 16px; }
.review-table tbody td { padding: 5px 6px; border-bottom: 1px solid #f1f4f8; transition: background .15s; }
.review-table tbody tr:hover td { background: #f8fafc; }
/* Baris tagihan kartu: angsuran (cicilan berjalan) dan bayar kartu (transfer) */
.review-table tbody tr.k-installment td:first-child { box-shadow: inset 3px 0 0 #7c3aed; }
.review-table tbody tr.k-payment td:first-child { box-shadow: inset 3px 0 0 #0d9488; }
.review-table tbody tr.k-installment .f-type, .review-table tbody tr.k-payment .f-type, .review-table tbody tr.k-installment .f-cat, .review-table tbody tr.k-payment .f-cat { background-color: #f8fafc; color: #475569; font-weight: 600; }
.review-table .form-control, .review-table .form-select { padding: .32rem .55rem; font-size: .84rem; border-radius: 8px; height: 34px; line-height: 1.3; }
.review-table .form-select { padding-right: 1.7rem; background-position: right .5rem center; background-size: 12px 10px; }
.review-table .f-amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.review-table .f-desc { text-overflow: ellipsis; }
.review-table .hint { font-size: .7rem; color: var(--lk-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-table tr.dup td { background: #fffdf3; }
.review-table tr.invalid td { background: #fff5f6; }
.review-table tr.dup td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.review-table tr.invalid td:first-child { box-shadow: inset 3px 0 0 #e11d48; }
.review-table .flag { font-size: 1rem; cursor: help; }
.review-table .form-check-input { width: 17px; height: 17px; margin: 0; cursor: pointer; }
.rv-empty { padding: 40px; text-align: center; color: var(--lk-muted); }

/* ---------- Halaman Transaksi ---------- */
.fbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.fbar .fitem { display: flex; flex-direction: column; gap: 4px; flex: 1 1 136px; min-width: 128px; max-width: 220px; }
.fbar .fitem.grow { flex: 3 1 200px; max-width: 380px; }
.fbar .fitem.actions { flex: 0 0 auto; flex-direction: row; gap: 6px; min-width: 0; max-width: none; }
.fbar label { font-size: .72rem; font-weight: 700; color: var(--lk-muted); text-transform: uppercase; letter-spacing: .05em; margin: 0 2px; }
.fbar .form-select, .fbar .form-control { padding: .45rem .7rem; font-size: .88rem; }
.fbar .form-select { padding-right: 1.8rem; }
.fsearch { position: relative; }
.fsearch i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.fsearch .form-control { padding-left: 32px; }
.fbar .btn { padding: .45rem .8rem; }
.trx-table { table-layout: fixed; min-width: 1020px; font-size: .9rem; }
.trx-table thead th { padding: 10px 12px; }
.trx-table tbody td { padding: 9px 12px; }
.trx-table .sub { font-size: .74rem; color: var(--lk-muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trx-table .cat-icon.sm { width: 30px; height: 30px; border-radius: 9px; font-size: .9rem; }
.trx-table .cat-chip { max-width: 100%; }
.trx-table .cat-name { font-size: .86rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trx-table .desc { min-width: 0; }
.trx-table .src { color: #94a3b8; font-size: .8rem; margin-left: 4px; cursor: help; }
.trx-table .btn-ico { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; }
.trx-table .act .btn-ico { opacity: .55; }
.trx-table tr:hover .act .btn-ico { opacity: 1; }
.trx-table .num { font-size: .9rem; }
#trxCard { transition: opacity .2s ease; position: relative; }
#trxCard.is-loading { opacity: .55; pointer-events: none; }
#trxCard.is-loading::after { content: ""; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 50 50'%3E%3Cpath fill='%230f766e' d='M25 5a20 20 0 0 1 20 20h-5a15 15 0 0 0-15-15z'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") center 120px no-repeat; }

.th-sort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.th-sort:hover { color: var(--lk-primary); }
.th-sort .sort-idle { opacity: .35; }
.th-sort:hover .sort-idle { opacity: 1; }
.trx-table tr.group-head td { background: #f1f5f9; padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--lk-border); }
.trx-table tr.group-head:hover td { background: #e8eef4; }
.trx-table tr.group-head .gh-ico { transition: transform .2s; display: inline-block; color: var(--lk-muted); }
.trx-table tr.group-head.collapsed .gh-ico { transform: rotate(-90deg); }
.trx-table tr.group-foot td { background: #fafbfc; font-size: .82rem; padding: 6px 12px; border-bottom: 2px solid var(--lk-border); }
.bulk-bar { display: inline-flex; align-items: center; gap: 8px; background: var(--lk-primary-50); border: 1px solid #99f6e4; border-radius: 10px; padding: 4px 6px 4px 12px; }
/* Tom Select dibuat semirip mungkin dengan .form-select biasa: kotak dan tanda
   panah di pembungkusnya, kolom isian di dalamnya transparan. Tema bawaannya
   memakai !important pada .ts-control, jadi border tidak digambar di sana. */
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0; border: 1px solid #dfe5ec; border-radius: 10px; background-color: #fff; min-height: 38px; height: auto; }
.ts-wrapper.form-select.single { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .65rem center; background-size: 13px 10px; }
.ts-wrapper .ts-control { padding: .45rem 2rem .45rem .7rem; background: transparent; border-radius: 10px; min-height: 36px; font-size: .88rem; }
.ts-wrapper.focus { border-color: var(--lk-primary-600); box-shadow: 0 0 0 .2rem rgba(13,148,136,.15); }
.ts-dropdown { border-radius: 10px; border-color: var(--lk-border); box-shadow: 0 12px 32px -12px rgba(15,23,42,.25); font-size: .88rem; }
.ts-dropdown .active { background: var(--lk-primary-50); color: var(--lk-primary); }
.ts-dropdown .optgroup-header { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; }

/* tabel yang bisa digeser: bayangan tepi + kursor genggam */
.table-responsive.drag-scroll { position: relative; scrollbar-width: thin; }
.table-responsive.drag-scroll.has-overflow { cursor: grab; }
.table-responsive.drag-scroll.dragging { cursor: grabbing; user-select: none; }
.table-responsive.drag-scroll.has-overflow { background:
  linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left / 40px 100% no-repeat,
  linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right / 40px 100% no-repeat,
  linear-gradient(to right, rgba(15,23,42,.08), rgba(15,23,42,0)) left / 14px 100% no-repeat,
  linear-gradient(to left, rgba(15,23,42,.08), rgba(15,23,42,0)) right / 14px 100% no-repeat;
  background-attachment: local, local, scroll, scroll; }
.table-responsive.drag-scroll::-webkit-scrollbar { height: 10px; }
.table-responsive.drag-scroll::-webkit-scrollbar-thumb { background: #b6c2cf; border: 2px solid #fff; border-radius: 999px; }

/* ---------- Layar kecil ---------- */
@media (max-width: 767.98px) {
  html { font-size: 14px; }
  .lk-topbar { padding: 10px 12px; gap: 8px; }
  .lk-topbar h1 { font-size: 1.05rem; }
  .lk-content { padding: 6px 12px 32px; }
  .card { border-radius: 14px; }
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; font-size: .95rem; }
  .stat { gap: 10px; }
  .stat .ico { width: 36px; height: 36px; font-size: 1rem; border-radius: 11px; }
  .stat .val { font-size: 1rem; white-space: normal; word-break: break-word; }
  .stat .lbl, .stat .delta { font-size: .72rem; }
  .acc-card { min-height: 104px; padding: 12px 14px; }
  .acc-card .bal { font-size: 1.05rem; margin-top: 8px; }
  .acc-card .name { font-size: .92rem; }
  .month-nav a, .month-nav span { padding: 5px 8px; font-size: .84rem; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .fbar .fitem { flex: 1 1 calc(50% - 12px); max-width: none; min-width: 0; }
  .fbar .fitem.grow { flex-basis: 100%; }
  .fbar .fitem.actions { flex-basis: 100%; }
  .fbar .fitem.actions .btn:first-child { flex: 1; }
  .table thead th { padding: 8px 10px; }
  .table tbody td { padding: 8px 10px; }
  .trx-table .btn-ico { opacity: 1 !important; }
  .chat-layout { height: calc(100vh - 96px); min-height: 420px; }
  .chat-head { padding: 10px 12px; gap: 8px; }
  .chat-head .model { display: none; }
  .mode-toggle span { display: none; }
  .chat-scroll { padding: 12px; }
  .row-msg .bubble-wrap { max-width: 92%; }
  .composer-meta .ms-auto { display: none; }
  .composer-meta { gap: 6px; }
  .acts-foot, .proposal .text-end { flex-wrap: wrap; }
  .act-item .edit { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-review .modal-header, .modal-review .modal-footer, .rv-bar, .rv-verify { padding-left: 14px; padding-right: 14px; }
  .modal-review .modal-footer .btn { flex: 1; }
  .modal-review .modal-footer .me-auto { flex-basis: 100%; margin-bottom: 4px; }
  .rv-bar .ms-auto { margin-left: 0 !important; }
  .rv-bar .form-select { flex: 1; }
  .lk-toast-wrap { left: 12px; right: 12px; bottom: 12px; }
  .lk-toast { max-width: none; }
  .chat-list { padding: 4px; }
}
@media (max-width: 991.98px) {
  .chat-side { display: flex; position: fixed; inset: 0; z-index: 1045; border-radius: 0; transform: translateX(-100%); transition: transform .22s ease; }
  .chat-side.open { transform: none; }
  .chat-side-toggle { display: inline-flex !important; }
}
.chat-side-toggle { display: none; }
.chat-side .chat-side-close { display: none; }
@media (max-width: 991.98px) { .chat-side .chat-side-close { display: inline-flex; } }

/* ---------- Kehalusan gerak ---------- */
.modal.fade .modal-dialog { transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .24s ease; transform: translateY(14px) scale(.985); opacity: 0; }
.modal.show .modal-dialog { transform: none; opacity: 1; }
.modal-backdrop.fade { transition: opacity .2s ease; }
.modal-backdrop.show { opacity: .45; }
.row-msg { animation: msg-in .22s ease-out both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chat-scroll { scroll-behavior: smooth; }
.job-card, .chat-item, .card, .btn, .type-item, .acc-card { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
.btn:active { transform: scale(.97); }
.progress-bar { transition: width .45s ease; }
.job-card .st { transition: background-color .25s ease, color .25s ease; }
.lk-toast { animation: lk-in .22s cubic-bezier(.2, .8, .2, 1); }
.dropdown-menu { border: 1px solid var(--lk-border); border-radius: 12px; box-shadow: 0 12px 32px -12px rgba(15,23,42,.25); padding: 6px; animation: msg-in .15s ease-out; }
.dropdown-item { border-radius: 8px; padding: 7px 10px; font-size: .9rem; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #94a3b8; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.month-nav { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--lk-border); border-radius: 10px; padding: 2px; }
.month-nav a, .month-nav span { padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: .88rem; color: #334155; }
.month-nav a:hover { background: #f1f5f9; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.pagination .page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--lk-border); color: #334155; }
.pagination .active .page-link { background: var(--lk-primary); border-color: var(--lk-primary); }
.sticky-actions { position: sticky; bottom: 0; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); padding: 12px 20px; border-top: 1px solid var(--lk-border); border-radius: 0 0 var(--lk-radius) var(--lk-radius); }

/* ---------- Rekening & Kantong: interaktif */
.hero-net { min-width: 220px; }
.hero-big { font-size: 1.7rem; letter-spacing: -.02em; line-height: 1.1; }
.split-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #e9eef3; max-width: 520px; }
.split-bar .seg { height: 100%; }
.split-bar .aset { background: linear-gradient(90deg, #34d399, #059669); }
.split-bar .hutang { background: linear-gradient(90deg, #fb7185, #e11d48); }
.kpi.clickable { cursor: pointer; }
.spark .line { stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 1.6s ease-out .3s forwards; }
.spark .dot { opacity: 0; animation: pop .4s ease-out 1.7s forwards; }
.tilt { transition: transform .18s ease, box-shadow .18s ease; transform-style: preserve-3d; will-change: transform; }
.move-list { display: flex; flex-direction: column; max-height: 400px; overflow-x: hidden; overflow-y: auto; padding-right: 2px; }
.move-row { display: flex; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 12px; cursor: pointer; transition: background .15s, box-shadow .15s; min-width: 0; }
.move-row:hover { background: #f8fafc; }
.move-row + .move-row { border-top: 1px dashed #eef2f6; }
.move-bars { display: flex; flex-direction: column; gap: 3px; margin: 4px 0; }
.move-bars .mb { height: 5px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.move-bars .mb > div { height: 100%; border-radius: 999px; }
.move-bars .in > div { background: linear-gradient(90deg, #34d399, #059669); }
.move-bars .out > div { background: linear-gradient(90deg, #fb7185, #e11d48); }
.acc-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.seg-tabs { display: inline-flex; gap: 2px; background: #fff; border: 1px solid var(--lk-border); border-radius: 12px; padding: 3px; }
.seg-tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: .84rem; color: #475569; transition: background .15s, color .15s; }
.seg-tabs button .n { font-size: .7rem; background: #f1f5f9; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.seg-tabs button.active { background: var(--lk-primary); color: #fff; }
.seg-tabs button.active .n { background: rgba(255,255,255,.25); color: #fff; }
.acc-search { position: relative; margin-left: auto; min-width: 200px; }
.acc-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.acc-search .form-control { padding-left: 32px; }
.acc-tile { position: relative; overflow: hidden; border-top: 3px solid var(--acc, var(--lk-primary)); }
.acc-tile .shine { position: absolute; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(circle at var(--mx, 70%) var(--my, 30%), color-mix(in srgb, var(--acc) 18%, transparent), transparent 55%); opacity: 0; transition: opacity .2s; }
.acc-tile:hover .shine { opacity: 1; }
.acc-tile:hover { box-shadow: 0 16px 30px -18px rgba(15,23,42,.35); }
.acc-tile .acc-ico { width: 46px; height: 46px; border-radius: 14px; font-size: 1.3rem; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.acc-tile:hover .acc-ico { transform: rotate(-8deg) scale(1.08); }
.acc-tile .acc-val { cursor: pointer; display: inline-block; transition: color .15s; }
.acc-tile .acc-val:hover { text-decoration: underline dotted; text-underline-offset: 4px; }
.acc-tile .spark { position: absolute; right: 0; bottom: 0; width: 55%; height: 52px; opacity: .8; pointer-events: none; z-index: 0; }
.acc-tile .acc-main { position: relative; z-index: 1; }
.acc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.acc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; }
.acc-chip[role="button"] { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.acc-chip[role="button"]:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(15,23,42,.4); }
.acc-chip.in { background: var(--lk-income-bg); color: var(--lk-income); }
.acc-chip.out { background: var(--lk-expense-bg); color: var(--lk-expense); }
.acc-chip.up { background: #ecfdf5; color: #047857; }
.acc-chip.down { background: #fff1f2; color: #be123c; }
.acc-chip.muted { color: #94a3b8; }
.acc-tile.flash { animation: flashCard 1.4s ease-out; }
@keyframes flashCard { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--acc) 60%, transparent); } 60% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: none; } }
@media (max-width: 767.98px) {
  .hero-net { min-width: 0; width: 100%; text-align: left !important; }
  .hero-big { font-size: 1.4rem; }
  .acc-search { margin-left: 0; width: 100%; }
  .acc-tile .spark { width: 45%; height: 40px; opacity: .5; }
}
@media (prefers-reduced-motion: reduce) { .spark .line, .spark .dot, .acc-tile.flash { animation: none; stroke-dashoffset: 0; opacity: 1; } }
.move-row .text-truncate, .acc-tile .text-truncate { min-width: 0; }
@media (max-width: 767.98px) { .kpi .stat .val { font-size: 1.15rem; } .kpi .spark { width: 34%; height: 36px; opacity: .45; } }
@media (max-width: 767.98px) { .kpi .stat .val { white-space: nowrap; } }

/* ---------- Ubah massal transaksi: kolom aktif lewat centang */
.bulk-fields { display: flex; flex-direction: column; gap: 10px; }
.bulk-field { border: 1px solid var(--lk-border); border-radius: 12px; padding: 10px 12px; transition: border-color .15s ease, background-color .15s ease; }
.bulk-field.on { border-color: var(--lk-primary); background: var(--lk-primary-50); }
.bulk-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; margin-bottom: 8px; cursor: pointer; user-select: none; }
.bulk-head .hint { margin-left: auto; font-weight: 500; font-size: .72rem; color: var(--lk-muted); text-align: right; }
.bulk-field .form-control:disabled, .bulk-field .form-select:disabled { background-color: #f8fafc; color: #94a3b8; }
@media (max-width: 575.98px) { .bulk-head { flex-wrap: wrap; } .bulk-head .hint { margin-left: 26px; width: 100%; text-align: left; } }

/* ---------- Kepala kartu yang menempel di bawah topbar ---------- */
.card-header.sticky-head {
  position: sticky; top: var(--lk-topbar-h); z-index: 3;
  background: var(--lk-card);
  border-radius: var(--lk-radius) var(--lk-radius) 0 0;
  transition: box-shadow .18s ease;
}
.card-header.sticky-head.is-stuck { box-shadow: 0 10px 18px -14px rgba(15, 23, 42, .45); }
@media (prefers-reduced-motion: reduce) { .card-header.sticky-head { transition: none; } }
.float-head { position: fixed; z-index: 2; overflow: hidden; background: var(--lk-card); box-shadow: 0 10px 18px -14px rgba(15, 23, 42, .45); }
.float-head table { margin: 0; }
.float-head thead th { background: var(--lk-card); }

/* Kelas bantu ini dipakai di beberapa halaman tetapi tidak ada di Bootstrap 5.3.
   Tanpa ini, isi flex yang panjang tidak mau menyusut dan mendorong isi lain
   keluar kartu (mis. nominal di "Pengeluaran terbesar"). */
.min-w-0 { min-width: 0 !important; }

/* Pengeluaran terbesar */
.top-item { overflow: hidden; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #f4f6fa; }
/* Garis aksen tipis di tepi kiri sebagai penanda hover: tidak mengubah tata
   letak sedikit pun, jadi baris tidak bergeser dan kursor tidak lepas. */
.top-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--lk-expense); opacity: .55; transition: width .18s ease; z-index: 1; }
.top-item:hover::before { width: 3px; }
/* Besarnya pengeluaran ditandai semburat lembut, dan hanya muncul saat baris
   disentuh kursor supaya kartunya tetap tenang saat dibaca sekilas. */
.top-item .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, rgba(244,63,94,.10), rgba(244,63,94,.02)); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.top-item:hover .bar { width: var(--p, 0%); }
.top-item > *:not(.bar) { position: relative; z-index: 2; }
.top-item .rank { width: 26px; height: 26px; font-size: .74rem; }
.top-item .cat-icon.sm { width: 34px; height: 34px; border-radius: 11px; }
.top-item .nm { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.top-item .nm .fw-600 { line-height: 1.3; }
.top-item .sub { line-height: 1.35; }
.top-item .amt { flex: 0 0 auto; min-width: 92px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .95rem; }
@media (max-width: 575.98px) { .top-item { padding: 12px 14px; gap: 10px; } .top-item .amt { min-width: 0; font-size: .88rem; } }

/* Ubah massal: kolom aktif, dropdown pencarian, dan ringkasan perubahan */
.bulk-field { cursor: pointer; }
.bulk-field.on { cursor: default; }
.bulk-head i.bi { color: var(--lk-muted); font-size: .95rem; }
.bulk-field.on .bulk-head i.bi { color: var(--lk-primary); }
.bulk-field .ts-wrapper.disabled .ts-control, .bulk-field .ts-wrapper.disabled { background-color: #f8fafc; color: #94a3b8; opacity: 1; }
.bulk-field .ts-wrapper.disabled .ts-control > .item { color: #94a3b8; }
.bulk-quick { display: flex; gap: 6px; }
.bulk-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.bulk-preview:empty { display: none; }
.bulk-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--lk-primary-50); color: var(--lk-primary); border: 1px solid #99f6e4; border-radius: 999px; padding: 4px 11px; font-size: .78rem; }
.bulk-chip.kosong { background: #fff7ed; color: #b45309; border-color: #fed7aa; }
.bulk-chip b { font-weight: 700; }
.bulk-chip .bi { font-size: .7rem; opacity: .7; }
/* Lima kartu ringkasan di halaman Transaksi: cukup rapat agar muat sebaris di layar lebar */
.kpi-row .card-body { padding-left: 14px; padding-right: 14px; }
.kpi-row .val { font-size: 1.05rem; }
@media (min-width: 1200px) { .kpi-row .val { font-size: 1.15rem; } }
/* Daftar dropdown milik pop-up ditempel ke body, jadi harus di atas lapisan pop-up (1055) */
.ts-dropdown.ts-in-modal { z-index: 1060; }

/* ---------- Rencana: jadwal, target tabungan, hutang piutang ---------- */
.nav-badge { margin-left: auto; background: var(--lk-expense); color: #fff; font-size: .68rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: inline-grid; place-items: center; padding: 0 6px; }
.sched-card, .goal-card, .debt-card { position: relative; overflow: hidden; border-top: 3px solid var(--acc, var(--lk-primary)); transition: box-shadow .18s ease, border-color .18s ease; }
.sched-card:hover, .goal-card:hover, .debt-card:hover { box-shadow: 0 16px 30px -18px rgba(15,23,42,.35); }
.goal-card.aktif, .debt-card.aktif { box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 45%, transparent); }
.sched-card.off, .goal-card.off, .debt-card.off { opacity: .62; border-top-color: #cbd5e1; }
.sched-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sched-preview { background: #f8fafc; border: 1px dashed var(--lk-border); border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sched-date { background: #fff; border: 1px solid var(--lk-border); border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 600; color: #334155; }
.mini-stat { background: #f8fafc; border-radius: 12px; padding: 10px 12px; height: 100%; }
.mini-stat .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lk-muted); font-weight: 700; }
.mini-stat .val { font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; margin-top: 2px; }
.mini-stat.big .val { font-size: 1.25rem; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick span { width: 38px; height: 38px; border-radius: 11px; border: 1.5px solid var(--lk-border); display: grid; place-items: center; font-size: 1.05rem; color: #475569; cursor: pointer; transition: all .15s; }
.icon-pick input:checked + span { border-color: var(--lk-primary); background: var(--lk-primary-50); color: var(--lk-primary); }
.seg-tabs a { padding: 6px 12px; border-radius: 9px; font-weight: 600; font-size: .84rem; color: #475569; transition: background .15s, color .15s; }
.seg-tabs a.active { background: var(--lk-primary); color: #fff; }
.goal-entries { max-height: 260px; overflow: auto; }
.agenda-item .badge-soft { font-weight: 600; }
@media (max-width: 767.98px) { .mini-stat .val { font-size: .95rem; } .sched-preview { font-size: .8rem; } }
.mini-stat .val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1200px) { .mini-stat .val { font-size: 1rem; } }

/* ---------- Lonceng pemberitahuan ---------- */
.notif-wrap { position: relative; }
.notif-btn { position: relative; width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; }
.notif-btn i { font-size: 1.05rem; }
.notif-dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--lk-expense); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--lk-bg); }
.notif-panel { width: 340px; max-width: calc(100vw - 24px); padding: 0; border: 1px solid var(--lk-border); border-radius: 14px; box-shadow: 0 20px 44px -20px rgba(15,23,42,.35); overflow: hidden; }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--lk-border); font-size: .88rem; }
.notif-head .btn-link { font-size: .76rem; text-decoration: none; color: var(--lk-primary); }
.notif-list { max-height: 340px; overflow: auto; }
.notif-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f4f6fa; text-decoration: none; color: inherit; transition: background .15s; }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: #f8fafc; color: inherit; }
.notif-item.baru { background: #f0fdfa; }
.notif-item.baru:hover { background: #e6fbf7; }
.notif-item .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: .9rem; }
.notif-item .t { display: block; font-weight: 600; font-size: .84rem; line-height: 1.3; }
.notif-item .b { display: block; font-size: .76rem; color: var(--lk-muted); margin-top: 1px; }
.notif-item .w { display: block; font-size: .7rem; color: #94a3b8; margin-top: 3px; }
.notif-empty { padding: 26px 16px; text-align: center; color: var(--lk-muted); font-size: .84rem; }
.notif-foot { border-top: 1px solid var(--lk-border); padding: 9px 14px; background: #fafbfc; }
.notif-foot a { font-size: .78rem; text-decoration: none; color: #475569; font-weight: 600; }
.notif-foot a:hover { color: var(--lk-primary); }

/* ---------- Bagian "jadikan berulang" di panel transaksi ---------- */
.qsec + .qsec { margin-top: 16px; }
.acc-pick { padding-top: 2px; padding-bottom: 8px; }
.qsched { margin-top: 16px; border: 1px solid var(--lk-border); border-radius: 14px; background: #fff; transition: border-color .15s, background .15s; }
.qsched.on { border-color: var(--lk-primary); background: var(--lk-primary-50); }
.qsched-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; margin: 0; }
.qsched-head .lbl { font-weight: 700; font-size: .86rem; }
.qsched-head .hint { margin-left: auto; font-size: .72rem; color: var(--lk-muted); }
.qsched-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.qsched-row { display: flex; align-items: center; gap: 8px; }
.qsched-row .qlabel { flex: 0 0 62px; }
.qsched-row .form-control, .qsched-row .form-select, .qsched-row .input-group { flex: 1 1 0; min-width: 0; }
.qsched-modes { display: grid; gap: 8px; }
.qsched-modes button { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1.5px solid var(--lk-border); background: #fff; border-radius: 12px; padding: 10px 12px; transition: all .15s; }
.qsched-modes button i { font-size: 1rem; color: var(--lk-muted); margin-top: 1px; }
.qsched-modes button span { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--lk-muted); line-height: 1.35; }
.qsched-modes button b { font-size: .84rem; color: #0f172a; font-weight: 700; }
.qsched-modes button.active { border-color: var(--lk-primary); background: #fff; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.qsched-modes button.active i { color: var(--lk-primary); }
.qsched-preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qsched-preview .cap { font-size: .72rem; color: var(--lk-muted); }
.qsched-preview .d { background: #fff; border: 1px solid var(--lk-border); border-radius: 999px; padding: 3px 9px; font-size: .74rem; font-weight: 600; color: #334155; }

/* ---------- Tata letak halaman rencana: tenang, lapang, tanpa gradien ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; background: #fff; border: 1px solid var(--lk-border); border-radius: var(--lk-radius); box-shadow: var(--lk-shadow); padding: 20px 24px; margin-bottom: 20px; }
.page-head .ttl { font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.page-head .sub { font-size: .84rem; color: var(--lk-muted); margin: 5px 0 0; max-width: 58ch; line-height: 1.5; }
.page-head .head-stats { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-left: auto; }
.head-stat .lbl { font-size: .67rem; text-transform: uppercase; letter-spacing: .07em; color: var(--lk-muted); font-weight: 700; }
.head-stat .val { font-weight: 800; font-size: 1.02rem; margin-top: 3px; letter-spacing: -.01em; white-space: nowrap; }
.head-stat .val .unit { font-weight: 600; font-size: .72rem; color: var(--lk-muted); }
.page-head .head-act { display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: #fff; border: 1px solid var(--lk-border); border-radius: var(--lk-radius); box-shadow: var(--lk-shadow); margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--lk-border); }
.panel-head .h { font-weight: 700; font-size: .94rem; }
.panel-head .note { font-size: .76rem; color: var(--lk-muted); }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 14px 20px; }

.rows { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 15px 20px; border-top: 1px solid #f2f5f9; transition: background .15s ease; }
.rows > .row-item:first-child { border-top: 0; }
.row-item:hover { background: #fafbfc; }
.row-item.sel { background: #f6fbfa; box-shadow: inset 3px 0 0 var(--lk-primary); }
.row-item.dim { opacity: .6; }
.row-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.02rem; background: #f1f5f9; color: #64748b; flex-shrink: 0; }
.row-main { min-width: 0; flex: 1 1 auto; }
.row-title { font-weight: 600; font-size: .92rem; line-height: 1.35; }
.row-sub { font-size: .76rem; color: var(--lk-muted); margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-amt { flex: 0 0 auto; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-amt .n { font-weight: 700; font-size: .96rem; }
.row-amt .c { font-size: .72rem; color: var(--lk-muted); margin-top: 2px; }
.row-act { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }

.tag { display: inline-flex; align-items: center; gap: 5px; background: #f1f5f9; color: #475569; border-radius: 999px; padding: 3px 9px; font-size: .71rem; font-weight: 600; line-height: 1.5; }
.tag i { font-size: .72rem; }
.tag.ok { background: #ecfdf5; color: #047857; }
.tag.warn { background: #fffbeb; color: #b45309; }
.tag.bad { background: #fff1f2; color: #be123c; }
.tag.info { background: #eff6ff; color: #1d4ed8; }
/* Baris dan rekening yang berasal dari Manava */
.tag.mnv { background: #ecfdf5; color: #0f766e; }
.tag.mnv.lock { background: #f1f5f9; color: #475569; }

.bar-line { height: 6px; border-radius: 999px; background: #eef2f6; overflow: hidden; margin-top: 8px; }
.bar-line > span { display: block; height: 100%; border-radius: 999px; background: var(--lk-primary); }
.stat-tile { border: 1px solid var(--lk-border); border-radius: 12px; padding: 12px 14px; height: 100%; }
.stat-tile .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; }
.stat-tile .val { font-weight: 800; font-size: 1.05rem; margin-top: 4px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-tile .cap { font-size: .72rem; color: var(--lk-muted); margin-top: 2px; }
.empty-panel { padding: 40px 20px; text-align: center; color: var(--lk-muted); }
.empty-panel i { font-size: 1.8rem; color: #cbd5e1; display: block; margin-bottom: 10px; }
.empty-panel h6 { font-weight: 700; color: #334155; margin-bottom: 4px; }
@media (max-width: 767.98px) {
  .page-head { padding: 16px; gap: 14px; }
  .page-head .head-stats { margin-left: 0; gap: 10px 20px; }
  .row-item { padding: 14px 16px; gap: 12px; flex-wrap: wrap; }
  .row-amt { text-align: left; }
  .panel-body { padding: 16px; }
}
/* Menu titik tiga tidak boleh terpotong oleh kartunya */
.panel, .rows, .row-item { overflow: visible; }
.rows > .row-item:first-child { border-top-left-radius: var(--lk-radius); border-top-right-radius: var(--lk-radius); }
.rows > .row-item:last-child { border-bottom-left-radius: var(--lk-radius); border-bottom-right-radius: var(--lk-radius); }
.trx-table .src-tag { margin-left: 6px; vertical-align: middle; cursor: help; padding: 2px 7px; font-size: .66rem; }
/* Pita aktivitas otomatis di dashboard */
.auto-strip { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--lk-border); border-left: 3px solid var(--lk-primary); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--lk-shadow); }
.auto-strip .ico { width: 36px; height: 36px; border-radius: 11px; background: var(--lk-primary-50); color: var(--lk-primary); display: grid; place-items: center; flex-shrink: 0; }
@media (max-width: 575.98px) { .auto-strip { flex-wrap: wrap; } }
.stat-tile .val { font-size: 1rem; letter-spacing: -.02em; }
@media (min-width: 1400px) { .stat-tile .val { font-size: 1.05rem; } }
.trx-table .src-tag { flex: 0 0 auto; }

/* ---------- Pop-up pembayaran hutang piutang ---------- */
.bayar-sisa { border: 1px solid var(--lk-border); border-radius: 12px; padding: 14px 16px; }
.bayar-sisa .lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; }
.bayar-sisa .val { font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em; }
.bayar-usul { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--lk-primary-50); border: 1px solid #99f6e4; font-size: .84rem; }
.bayar-usul i { font-size: 1.05rem; color: var(--lk-primary); }
.bayar-usul .n { font-weight: 800; white-space: nowrap; }
.bayar-usul.kosong { background: #fffbeb; border-color: #fde68a; }
.bayar-usul.kosong i { color: #b45309; }
.bayar-sec { margin-top: 20px; }
.bayar-sec .sec-title { font-weight: 700; font-size: .86rem; margin-bottom: 8px; }
.cicilan-list { display: flex; flex-direction: column; border: 1px solid var(--lk-border); border-radius: 12px; overflow: hidden; }
.cicilan { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid #f2f5f9; font-size: .84rem; }
.cicilan:first-child { border-top: 0; }
.cicilan .no { width: 24px; height: 24px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: .72rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.cicilan .d { display: block; font-weight: 600; }
.cicilan .s { display: block; font-size: .72rem; color: var(--lk-muted); }
.cicilan .a { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cicilan.ok { background: #f6fdfa; }
.cicilan.ok .no { background: #d1fae5; color: #047857; }
.cicilan.half .no { background: #fef3c7; color: #b45309; }
.riwayat-list { display: flex; flex-direction: column; border: 1px solid var(--lk-border); border-radius: 12px; overflow: hidden; }
.riwayat { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-top: 1px solid #f2f5f9; font-size: .84rem; }
.riwayat:first-child { border-top: 0; }
.riwayat .t { width: 96px; flex-shrink: 0; color: var(--lk-muted); font-size: .78rem; }
.riwayat .d { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.riwayat .s { display: block; font-size: .72rem; color: var(--lk-muted); }
.riwayat .a { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) { .riwayat { flex-wrap: wrap; } .riwayat .t { width: auto; } }

/* ---------- Pengaturan pengulangan yang lebih jelas ---------- */
.qs-block + .qs-block { margin-top: 12px; }
.qs-freq { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #eef2f6; border-radius: 11px; padding: 3px; }
.qs-freq button { border: 0; background: transparent; border-radius: 8px; padding: 7px 4px; font-size: .78rem; font-weight: 700; color: #64748b; transition: background .15s, color .15s; }
.qs-freq button.active { background: #fff; color: var(--lk-primary); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.qs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qs-chips button { border: 1.5px solid var(--lk-border); background: #fff; border-radius: 10px; padding: 7px 11px; font-size: .78rem; font-weight: 600; color: #475569; transition: all .15s; }
.qs-chips button .hint { font-weight: 500; color: var(--lk-muted); font-size: .7rem; }
.qs-chips button.active { border-color: var(--lk-primary); background: var(--lk-primary-50); color: var(--lk-primary); }
.qs-chips button.active .hint { color: var(--lk-primary); opacity: .75; }
.qs-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.qs-days button { border: 1.5px solid var(--lk-border); background: #fff; border-radius: 9px; padding: 7px 2px; font-size: .72rem; font-weight: 700; color: #475569; transition: all .15s; }
.qs-days button.active { border-color: var(--lk-primary); background: var(--lk-primary); color: #fff; }
.qs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qs-row .cap { font-size: .78rem; color: var(--lk-muted); font-weight: 600; white-space: nowrap; }
.qs-row .form-control { width: auto; min-width: 68px; max-width: 132px; flex: 0 1 auto; }
.qs-row .qs-val { font-weight: 700; font-size: .84rem; }
.qs-table { border: 1px solid var(--lk-border); border-radius: 11px; overflow: hidden; background: #fff; }
.qs-tr { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid #f2f5f9; font-size: .8rem; }
.qs-tr:first-child { border-top: 0; }
.qs-tr .no { width: 20px; height: 20px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: .66rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.qs-tr .tgl { flex: 1 1 auto; font-weight: 600; display: flex; flex-direction: column; line-height: 1.25; }
.qs-tr .tgl .hari { font-size: .68rem; color: var(--lk-muted); font-weight: 500; }
.qs-tr .nom { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qs-more, .qs-empty { padding: 7px 10px; font-size: .72rem; color: var(--lk-muted); background: #fafbfc; border-top: 1px solid #f2f5f9; }
.qs-row .input-group { flex-wrap: nowrap; width: auto; }
.qs-row .input-group .form-control { min-width: 56px; }

/* ---------- Pilihan cara membayar hutang piutang ---------- */
.plan-box.on { border-color: var(--lk-primary); background: var(--lk-primary-50); }
.plan-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-mode button { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1.5px solid var(--lk-border); background: #fff; border-radius: 12px; padding: 11px 13px; transition: all .15s; }
.plan-mode button i { font-size: 1rem; color: var(--lk-muted); margin-top: 1px; }
.plan-mode button span { display: flex; flex-direction: column; gap: 2px; font-size: .74rem; color: var(--lk-muted); line-height: 1.35; }
.plan-mode button b { font-size: .85rem; color: #0f172a; font-weight: 700; }
.plan-mode button.active { border-color: var(--lk-primary); box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.plan-mode button.active i { color: var(--lk-primary); }
#debtModal .modal-body { padding: 22px 24px; }
#debtModal .form-section { padding: 16px 18px; }
#debtModal .modal-header, #debtModal .modal-footer { padding: 18px 24px; }
@media (max-width: 575.98px) { .plan-mode { grid-template-columns: 1fr; } #debtModal .modal-body { padding: 16px; } }
.qs-tr .cust-date { max-width: 168px; font-size: .8rem; }
.qs-tr .cust-date + .nom { margin-left: auto; }

/* ---------- Anggaran & batas kategori ---------- */
.gauge { --p: 0; --c: var(--lk-primary); width: 148px; height: 148px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef2f6 0); position: relative; }
.gauge::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: #fff; }
.gauge-in { position: relative; z-index: 1; text-align: center; }
.gauge-in .big { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.gauge-in .cap { font-size: .7rem; color: var(--lk-muted); }
.fact { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px dashed #eef2f6; font-size: .8rem; }
.fact:first-of-type { border-top: 0; }
.fact span { color: var(--lk-muted); }
.fact b { margin-left: auto; text-align: right; font-weight: 700; }
/* Batas ditandai garis merah putus-putus, sama artinya dengan garis di grafik. */
.bar-line.lim { position: relative; overflow: visible; }
.bar-line.lim > span { position: relative; z-index: 0; }
.bar-line.lim::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: calc(100% / 1.4); width: 0; border-left: 2px dashed #e11d48; }
.budget-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid #f2f5f9; text-decoration: none; color: inherit; transition: background .15s; }
.budget-item:first-child { border-top: 0; }
.budget-item:hover { background: #f8fafc; color: inherit; }
.budget-item .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: .85rem; }
.budget-item .nm { flex: 1 1 auto; min-width: 0; }
.budget-item .nm b { display: block; font-size: .82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.budget-item .nm .sub { font-size: .7rem; color: var(--lk-muted); }
.budget-item .pct { font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.budget-item .track { height: 6px; border-radius: 999px; background: #eef2f6; margin-top: 5px; position: relative; overflow: visible; }
.budget-item .track > i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; display: block; }
.budget-item .track::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: calc(100% / 1.25); border-left: 2px dashed #e11d48; }
.legend-dash { display: inline-block; width: 18px; border-top: 2px dashed #e11d48; vertical-align: middle; margin-right: 4px; }

/* ---------- Saldo per rekening di halaman transaksi ---------- */
.saldo-akun th, .saldo-akun td { padding: 8px 12px; vertical-align: middle; }
.saldo-akun thead th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lk-muted); font-weight: 700; border-bottom: 1px solid var(--lk-border); }
.saldo-akun tbody tr { cursor: pointer; }
.saldo-akun tbody tr.sel { background: var(--lk-primary-50); box-shadow: inset 3px 0 0 var(--lk-primary); }
.saldo-akun tfoot .total-row th { border-top: 2px solid var(--lk-border); background: #f8fafc; font-weight: 800; font-size: .85rem; }
.saldo-akun .cat-txt .nm { font-weight: 600; }


/* ---------- Identitas Manava ---------- */
.lk-brand.brand-manava { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.lk-brand.brand-manava .brand-logo { height: 26px; width: auto; display: block; }
.lk-brand.brand-manava .brand-product, .auth-brand .brand-product { font-weight: 800; font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: #e2f5f3; margin-top: 4px; padding-left: 2px; }
.lk-brand.brand-manava .sub { font-size: .68rem; opacity: .6; padding-left: 2px; }
.auth-brand img { height: 34px; width: auto; display: block; }
.auth-brand .brand-product { display: inline-block; color: #0f172a; margin-top: 8px; }
.auth-side .auth-brand .brand-product { color: inherit; }
.auth-brand .sub { font-size: .78rem; opacity: .7; }

/* ---------- Mata uang asing ---------- */
.fx-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .78rem; }
.fx-line .fx-now { font-weight: 700; color: #0f172a; }
.fx-line .fx-rate { color: var(--lk-muted); font-size: .72rem; }
.fx-sub { font-size: .7rem; font-weight: 500; color: var(--lk-muted); }
.cur-tag { display: inline-block; font-size: .6rem; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 5px; background: #eef2f6; color: #475569; vertical-align: middle; font-style: normal; }
.acc-pick button .acc-cur { font-style: normal; font-size: .6rem; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: #eef2f6; color: #475569; margin-left: 4px; }
.acc-pick button .acc-shared { font-size: .72rem; color: #0369a1; margin-left: 4px; }
.qfx .input-group-text { font-weight: 700; }
.qshared { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: #e0f2fe; color: #075985; font-size: .76rem; display: flex; gap: 8px; align-items: flex-start; }
.qshared.warn { background: #fef3c7; color: #92400e; }
.qshared.mnv { background: #ecfdf5; color: #0f766e; }
.type-pill button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- Hutang / piutang di panel transaksi (pill keempat) ---------- */
.qdebt { margin: 0 0 6px; padding: 10px 12px; border: 1px solid #ddd6fe; border-radius: 14px; background: var(--lk-debt-bg); }
.qdebt .qlabel { margin-bottom: 6px; }
.qdebt-mode { display: grid; grid-template-columns: 1fr 1fr; }
.qdebt-mode button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdebt .qs-chips button.active { border-color: var(--lk-debt); background: #fff; color: var(--lk-debt); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.qdebt .qs-chips button.active .hint { color: var(--lk-debt); }
.qdebt-list { flex-direction: column; gap: 6px; overflow-x: hidden; overflow-y: auto; max-height: 212px; padding: 2px 2px 2px; }
.qdebt-list .qdebt-item { width: 100%; text-align: left; flex: 0 0 auto; }
.qdebt-item .dot { flex-shrink: 0; }
.qdebt-item.hutang .dot { background: var(--lk-expense); }
.qdebt-item.piutang .dot { background: var(--lk-income); }
.qdebt-item .nm { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.qdebt-item .nm b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdebt-item .meta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.qdebt-item .tag { font-size: .6rem; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 5px; background: #eef2f6; color: #475569; text-transform: uppercase; }
.qdebt-item.hutang .tag { background: var(--lk-expense-bg); color: var(--lk-expense); }
.qdebt-item.piutang .tag { background: var(--lk-income-bg); color: var(--lk-income); }
.qdebt-item .sub { font-size: .68rem; font-weight: 500; color: var(--lk-muted); }
.qdebt-item .left { flex-shrink: 0; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qdebt-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 12px; font-size: .78rem; color: var(--lk-muted); background: #fff; border: 1px dashed #c4b5fd; border-radius: 12px; width: 100%; }
.qdebt-list .qs-empty { width: 100%; border: 0; border-radius: 10px; }
.qdebt-switch { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; padding: 0; font-size: .78rem; color: #334155; cursor: pointer; min-height: 0; }
.qdebt-switch .form-check-input { float: none; margin: 0; flex-shrink: 0; cursor: pointer; }
.qdebt-switch .form-check-input:checked { background-color: var(--lk-debt); border-color: var(--lk-debt); }

/* ---------- Kartu kredit / paylater di panel transaksi: limit, cicilan, tagihan ---------- */
.qcard { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--lk-border); border-radius: 12px; background: #fafbfc; display: flex; flex-direction: column; gap: 8px; }
.qcard .qlabel { margin-bottom: 0; }
.qcard-limit { display: flex; align-items: center; gap: 6px; font-size: .76rem; color: #334155; flex-wrap: wrap; }
.qcard-limit i { color: var(--lk-muted); }
.qcard-limit.over { color: var(--lk-expense); font-weight: 600; }
.qcard-limit.over i { color: var(--lk-expense); }
.qcard-tenor { align-items: center; }
.qcard-lain { display: inline-flex; align-items: center; gap: 2px; border: 1.5px solid var(--lk-border); border-radius: 10px; background: #fff; padding-right: 8px; transition: all .15s; }
.qcard-lain input.form-control { border: 0; width: 58px; min-width: 0; padding: 6px 6px 6px 10px; font-size: .78rem; font-weight: 600; background: transparent; box-shadow: none; border-radius: 10px; -moz-appearance: textfield; }
.qcard-lain input.form-control:focus { box-shadow: none; }
.qcard-lain input::-webkit-outer-spin-button, .qcard-lain input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qcard-lain span { font-size: .78rem; font-weight: 600; color: var(--lk-muted); }
.qcard-lain.active { border-color: var(--lk-primary); background: var(--lk-primary-50); }
.qcard-lain.active span, .qcard-lain.active input { color: var(--lk-primary); }
.qcard-terms { display: flex; flex-direction: column; gap: 8px; }
.qcard-terms .qs-row .input-group .form-control { min-width: 48px; }
.qcard-termrow { flex-wrap: wrap; row-gap: 8px; }
.qcard-term { display: inline-flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.qcard-preview:empty { display: none; }
.qcard-preview .sum { font-size: .76rem; color: #334155; line-height: 1.5; margin-bottom: 6px; }
.qcard-preview .sum .neg { color: var(--lk-expense); font-weight: 700; }
.qcard-preview .qs-tr .tgl .hari { white-space: normal; }
.qcard-split { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qcard-split .cap { font-size: .78rem; color: var(--lk-muted); font-weight: 600; white-space: nowrap; }
.qcard-seg { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 3px; background: #eef2f6; border-radius: 11px; padding: 3px; }
.qcard-seg button { border: 0; background: transparent; border-radius: 8px; padding: 6px 12px; font-size: .76rem; font-weight: 700; color: #64748b; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.qcard-seg button:hover:not(:disabled):not(.active) { color: #334155; }
.qcard-seg button.active { background: #fff; color: var(--lk-primary); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.qcard-seg button:disabled { opacity: .5; cursor: not-allowed; }
.qcard-preview .qs-table.scroll { max-height: 304px; overflow-y: auto; overscroll-behavior: contain; }
.qcard-preview button.qs-more { display: block; width: 100%; border: 0; border-top: 1px solid #f2f5f9; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.qcard-preview button.qs-more:hover { background: #f1f5f9; color: #334155; }
.qsplit-tag { font-style: normal; font-size: .62rem; font-weight: 700; color: #64748b; background: #f1f5f9; border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.qsplit-row { padding-top: 8px; padding-bottom: 8px; }
.qsplit-in { display: inline-flex; align-items: center; gap: 4px; margin: 0; flex-shrink: 0; border: 1.5px solid var(--lk-border); border-radius: 9px; background: #fff; padding: 0 9px; transition: border-color .15s, box-shadow .15s; }
.qsplit-in:focus-within { border-color: var(--lk-primary); box-shadow: 0 0 0 3px var(--lk-primary-50); }
.qsplit-in em { font-style: normal; font-size: .72rem; color: var(--lk-muted); font-weight: 600; }
.qsplit-in input.form-control { border: 0; box-shadow: none; background: transparent; padding: 6px 0; width: 100px; min-width: 0; text-align: right; font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums; }
.qsplit-foot { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 8px 10px; font-size: .74rem; background: #f0fdf4; color: #166534; border-top: 1px solid #f2f5f9; position: sticky; bottom: 0; transition: background .2s, color .2s; }
.qsplit-foot .st { font-weight: 700; white-space: nowrap; }
.qsplit-foot.bad { background: #fef2f2; color: #b91c1c; }
.qsplit-foot button { margin-left: auto; font-size: .74rem; white-space: nowrap; }
@media (max-width: 420px) { .qsplit-in { padding: 0 7px; } .qsplit-in input.form-control { width: 86px; } }
.qsplit-hint { margin-top: 6px; font-size: .7rem; color: var(--lk-muted); line-height: 1.45; }
.qcard-note { font-size: .72rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 10px; }
.qcard .qs-chips button:disabled { opacity: .45; cursor: not-allowed; }
.qcard-lain input:disabled { opacity: .45; cursor: not-allowed; }
.qcard-bill { margin-top: 6px; padding: 10px 12px; border-radius: 12px; background: var(--lk-transfer-bg); color: #1e3a8a; font-size: .76rem; line-height: 1.5; }
.qcard-bill .txt i { margin-right: 4px; }
.qcard-bill .st { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .64rem; font-weight: 700; background: #fff; vertical-align: 1px; white-space: nowrap; }
.qcard-bill .st-belum { color: var(--lk-expense); }
.qcard-bill .st-sebagian { color: #b45309; }
.qcard-bill .st-lunas { color: var(--lk-income); }
.qcard-bill .st-telat { background: var(--lk-expense); color: #fff; }
.qcard-bill .qs-chips { margin-top: 8px; }
.qcard-bill .qs-chips:empty { display: none; }
/* Baris bunga cicilan otomatis: jumlah, tanggal, rekening dibekukan. */
#quickTrxForm.locked .amount-big, #quickTrxForm.locked .date-chips .form-control { opacity: .55; pointer-events: none; }
#quickTrxForm.locked .acc-pick button:disabled, #quickTrxForm.locked .chips button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
@media (max-width: 400px) {
  .type-pill button { font-size: .74rem; padding: 8px 2px; }
  .type-pill button i { display: none; }
  .qdebt-mode { grid-template-columns: 1fr; }
}

/* ---------- Dompet bersama ---------- */
.shared-strip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 14px; background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e; }
.shared-strip > i { font-size: 1.3rem; color: #0369a1; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #f2f5f9; }
.member-row:first-child { border-top: 0; }
.member-row .av { width: 32px; height: 32px; border-radius: 50%; background: #e0f2fe; color: #0369a1; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; font-size: .82rem; }
.member-row .nm { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.member-row .nm b { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-row .nm .sub { font-size: .7rem; color: var(--lk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-row select { width: auto; flex-shrink: 0; }
.notif-foot { display: flex; flex-wrap: wrap; }


/* ---------- Chat AI: isi tidak boleh menembus gelembung ---------- */
.chat-scroll { overflow-x: hidden; overflow-y: auto; }
.row-msg { min-width: 0; max-width: 100%; }
.row-msg .bubble-wrap { min-width: 0; }
.msg { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.msg .msg-body { min-width: 0; max-width: 100%; }
.msg .msg-body table { display: block; max-width: 100%; overflow-x: auto; white-space: nowrap; }
.msg .msg-body pre, .msg .msg-body code { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .msg-body img { max-width: 100%; height: auto; }
.acts, .exec, .qbox, .proposal { max-width: 100%; min-width: 0; }
.act-item { min-width: 0; }
.act-item .desc, .act-item .why, .exec-item .body { overflow-wrap: anywhere; }
/* Kolom isian menyesuaikan lebar gelembung: turun baris, bukan melebar keluar. */
.act-item .edit { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.act-item .edit > * { min-width: 0; width: 100%; }
.act-item .edit .e-desc { grid-column: 1 / -1; }
.acts-foot { flex-wrap: wrap; }
@media (max-width: 991.98px) { .act-item .edit { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); } }
@media (max-width: 575.98px) { .act-item { flex-wrap: wrap; } .act-item .body { flex-basis: 100%; } }


/* kartu & tagihan */
.card-bill { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px dashed var(--lk-border); border-radius: 10px; background: #fafbfc; position: relative; z-index: 1; }
.card-bill .cb-line { display: flex; align-items: center; gap: 7px; font-size: .74rem; color: #334155; min-width: 0; }
.card-bill .cb-line > i { color: var(--lk-expense); font-size: .8rem; flex-shrink: 0; }
.card-bill .cb-line .txt { flex: 1 1 auto; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.card-bill .cb-line .tag { flex-shrink: 0; }
.card-bill .cb-line.muted, .card-bill .cb-line.muted > i { color: var(--lk-muted); }
.card-bill .cb-line[role=button] { cursor: pointer; }
.card-bill .cb-line[role=button]:hover .txt { color: var(--lk-primary); }
.kartu-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 768px) { .kartu-stats { grid-template-columns: repeat(4, 1fr); } }
.kartu-tbl { border: 1px solid var(--lk-border); border-radius: 12px; overflow: hidden; }
.kartu-tbl .table { font-size: .82rem; margin: 0; }
.kartu-tbl th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--lk-muted); font-weight: 700; background: #f8fafc; white-space: nowrap; }
.kartu-tbl .kt-row { cursor: pointer; }
.kartu-tbl .kt-row:hover td { background: #fafbfc; }
.kartu-tbl .kt-ico { display: inline-block; font-size: .7rem; color: var(--lk-muted); transition: transform .15s; }
.kartu-tbl .kt-row.open .kt-ico { transform: rotate(90deg); }
.kartu-tbl .kt-detail td { background: #f8fafc; padding: 10px 14px; }
.kt-rinci { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: .8rem; }
@media (max-width: 575.98px) { .kt-rinci { grid-template-columns: 1fr; } }
.kt-rinci .kr { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--lk-border); }
.kt-rinci .kr span:first-child { color: var(--lk-muted); }
.kt-rinci .kr.muted { border-bottom: 0; font-size: .72rem; }
.kt-rinci .kr.muted span:last-child { color: var(--lk-muted); }
.kt-rinci > .text-end { grid-column: 1 / -1; }
.inst-list { display: flex; flex-direction: column; gap: 8px; }
.kartu-hint { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: #fffbeb; color: #78350f; font-size: .8rem; line-height: 1.5; }
.kartu-hint i { color: #d97706; margin-top: 2px; }
.kartu-hint .btn-link { font-size: inherit; font-weight: 700; color: #92400e; text-decoration: underline; }
/* Formulir cicilan yang sudah berjalan (pop-up Tagihan & cicilan) */
.inst-add-open.active { background: var(--lk-primary-50); color: var(--lk-primary); }
.inst-item.fresh { animation: ia-fresh 2.4s ease-out; }
@keyframes ia-fresh { 0%, 35% { box-shadow: 0 0 0 3px rgba(13, 148, 136, .25); border-color: var(--lk-primary-600); background: var(--lk-primary-50); } 100% { box-shadow: none; } }
.ia { display: none; border: 1px solid var(--lk-border); border-radius: 18px; background: #fff; margin-bottom: 14px; box-shadow: 0 10px 30px -18px rgba(15, 23, 42, .35); overflow: hidden; }
.ia.open { display: block; animation: ia-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes ia-in { from { opacity: 0; transform: translateY(-6px) scale(.99); } to { opacity: 1; transform: none; } }
.ia-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 12px; }
.ia-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--lk-primary-50); color: var(--lk-primary); font-size: 1.05rem; }
.ia-head b { display: block; font-size: .92rem; }
.ia-head .min-w-0 > span { display: block; font-size: .76rem; color: var(--lk-muted); line-height: 1.4; }
.ia-x { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 10px; color: var(--lk-muted); flex-shrink: 0; display: grid; place-items: center; transition: background .15s, color .15s; }
.ia-x:hover { background: #f1f5f9; color: var(--lk-text); }
.ia-body { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; padding: 4px 18px 16px; }
@media (max-width: 767.98px) { .ia-body { grid-template-columns: minmax(0, 1fr); } }
.ia-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ia-f { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.ia-l { font-size: .74rem; font-weight: 700; color: #475569; }
.ia-note { font-size: .72rem; color: var(--lk-muted); line-height: 1.4; }
.ia .form-control { border-radius: 12px; min-height: 42px; }
.ia-seg { display: flex; background: #f1f5f9; border-radius: 12px; padding: 4px; gap: 4px; }
.ia-seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; font-size: .82rem; font-weight: 700; color: var(--lk-muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .18s, color .18s, box-shadow .18s; }
.ia-seg button.active { background: #fff; color: var(--lk-primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.ia-money { display: flex; align-items: center; border: 1px solid var(--lk-border); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.ia-money:focus-within { border-color: var(--lk-primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
.ia-money em { font-style: normal; font-weight: 700; color: var(--lk-muted); padding: 0 4px 0 14px; font-size: .9rem; }
.ia-money input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 10px 14px 10px 4px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--lk-text); }
.ia-money input::placeholder { color: #cbd5e1; }
.ia-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ia-step { display: flex; align-items: center; border: 1px solid var(--lk-border); border-radius: 12px; overflow: hidden; background: #fff; height: 42px; }
.ia-step button { border: 0; background: #f1f5f9; width: 40px; height: 100%; color: #1e293b; font-size: 1.05rem; flex-shrink: 0; transition: background .15s, color .15s; }
.ia-step button:hover { background: var(--lk-primary-50); color: var(--lk-primary); }
.ia-step button:active { transform: scale(.94); }
.ia-step input { flex: 1; min-width: 0; border: 0; outline: none; text-align: center; font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.ia-step input::-webkit-outer-spin-button, .ia-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ia-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ia-chips label { margin: 0; cursor: pointer; position: relative; }
.ia-chips input { position: absolute; opacity: 0; pointer-events: none; }
.ia-chips span { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--lk-border); border-radius: 12px; padding: 7px 14px; font-size: .84rem; font-weight: 700; line-height: 1.2; transition: border-color .15s, background .15s, box-shadow .15s; }
.ia-chips span small { font-size: .68rem; font-weight: 500; color: var(--lk-muted); }
.ia-chips input:checked + span { border-color: var(--lk-primary-600); background: var(--lk-primary-50); color: var(--lk-primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, .1); }
.ia-chips input:focus-visible + span { outline: 2px solid var(--lk-primary-600); outline-offset: 2px; }
.ia-more { align-self: flex-start; border: 0; background: transparent; padding: 0; font-size: .8rem; font-weight: 600; color: var(--lk-primary); display: inline-flex; align-items: center; gap: 6px; }
.ia-more:hover { text-decoration: underline; }
.ia-bunga { animation: ia-in .2s ease; }
.ia-prev { background: linear-gradient(180deg, var(--lk-primary-50), #fff 70%); border: 1px solid #ccfbf1; border-radius: 16px; padding: 16px; align-self: start; position: sticky; top: 0; }
.ia-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 24px 8px; color: var(--lk-muted); font-size: .8rem; }
.ia-empty i { font-size: 1.6rem; color: #99f6e4; }
.ia-lbl { font-size: .72rem; font-weight: 700; color: var(--lk-muted); text-transform: uppercase; letter-spacing: .05em; }
.ia-big { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--lk-primary); font-variant-numeric: tabular-nums; margin: 2px 0 10px; }
.ia-big small { font-size: .72rem; font-weight: 600; color: var(--lk-muted); letter-spacing: 0; }
.ia-dots { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.ia-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--lk-primary-600); transition: background .2s; }
.ia-dots i.on { background: #cbd5e1; }
.ia-bar { height: 6px; border-radius: 999px; background: var(--lk-primary-600); overflow: hidden; margin-bottom: 12px; }
.ia-bar span { display: block; height: 100%; background: #cbd5e1; }
.ia-kv { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; padding: 4px 0; }
.ia-kv span { color: var(--lk-muted); }
.ia-kv b { font-variant-numeric: tabular-nums; text-align: right; }
.ia-sched { margin-top: 10px; border-top: 1px dashed #cbd5e1; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.ia-row { display: flex; justify-content: space-between; gap: 8px; font-size: .76rem; padding: 3px 0; }
.ia-row b { display: inline-grid; place-items: center; min-width: 20px; height: 18px; border-radius: 6px; background: #fff; border: 1px solid #ccfbf1; font-size: .66rem; margin-right: 4px; color: var(--lk-primary); }
.ia-row.more { color: var(--lk-muted); }
.ia-warn { display: flex; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #fff7ed; color: #9a3412; font-size: .76rem; line-height: 1.45; }
.ia-warn i { color: #ea580c; margin-top: 1px; }
.ia-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid #f1f5f9; background: #fcfdfd; }
.ia-foot .btn { border-radius: 12px; padding: 8px 16px; }
@media (max-width: 575.98px) {
  .ia-head { padding: 14px 14px 10px; }
  .ia-body { padding: 4px 14px 14px; gap: 14px; }
  .ia-foot { padding: 12px 14px; }
  .ia-foot .btn { flex: 1; }
  .ia-prev { position: static; }
}
@media (prefers-reduced-motion: reduce) { .ia.open, .ia-bunga, .inst-item.fresh { animation: none; } }
.inst-item { border: 1px solid var(--lk-border); border-radius: 12px; overflow: hidden; }
.inst-item.done { opacity: .7; }
.inst-item .inst-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; font-size: .84rem; }
.inst-item .inst-head:hover { background: #fafbfc; }
.inst-item .inst-head .no { flex-shrink: 0; min-width: 44px; height: 30px; padding: 0 8px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-size: .72rem; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.inst-item.done .inst-head .no { background: #d1fae5; color: #047857; }
.inst-item .inst-head .d { display: block; font-weight: 600; }
.inst-item .inst-head .s { display: block; font-size: .72rem; color: var(--lk-muted); }
.inst-item .inst-head .bar-line { margin-top: 5px; height: 5px; max-width: 220px; }
.inst-item .inst-head .a { display: block; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; margin-bottom: 3px; }
.inst-item .inst-body { padding: 10px 12px 12px; border-top: 1px solid #f2f5f9; background: #fafbfc; }
.inst-item .qs-table .qs-tr .tag { flex-shrink: 0; }
.lunasi-form { margin-top: 10px; padding: 12px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 12px; }
@media (max-width: 575.98px) { .inst-item .inst-head { flex-wrap: wrap; } .inst-item .inst-head > .text-end { margin-left: auto; } }

/* ---------- Mode suara Asisten AI ---------- */
.btn-mic { color: #0f172a; }
.btn-mic:disabled { opacity: .45; }
.lk-voice { position: fixed; inset: 0; z-index: 1080; background: rgba(15, 23, 42, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.lk-voice[hidden] { display: none; }
.lk-voice-card { position: relative; width: min(440px, 100%); background: #fff; border-radius: 24px; padding: 24px 22px 18px; text-align: center; box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .55); }
.lk-voice-card > .lk-voice-close { position: absolute; top: 14px; right: 14px; }
.lk-voice-title { font-weight: 800; font-size: .95rem; color: #0f172a; }
.lk-voice-title i { color: var(--lk-primary); }
.lk-voice-orb { --lvl: 0; position: relative; width: 120px; height: 120px; border-radius: 50%; margin: 18px auto 14px; display: grid; place-items: center; font-size: 2.3rem; color: #fff; cursor: pointer; background: radial-gradient(circle at 30% 30%, #5eead4, var(--lk-primary)); box-shadow: 0 14px 34px -10px rgba(13, 148, 136, .55); transition: transform .2s ease, background .3s ease; transform: scale(calc(1 + var(--lvl) * .12)); }
.lk-voice-orb .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(13, 148, 136, .45); opacity: 0; pointer-events: none; }
.lk-voice-orb[data-state="listening"] .ring { animation: voice-ping 1.6s ease-out infinite; }
.lk-voice-orb[data-state="listening"] .ring.r2 { animation-delay: .8s; }
.lk-voice-orb[data-state="listening"] { animation: voice-breathe 1.6s ease-in-out infinite; }
.lk-voice-orb[data-state="thinking"], .lk-voice-orb[data-state="transcribing"], .lk-voice-orb[data-state="running"] { background: radial-gradient(circle at 30% 30%, #c4b5fd, #6d28d9); box-shadow: 0 14px 34px -10px rgba(109, 40, 217, .5); }
.lk-voice-orb[data-state="thinking"]::after, .lk-voice-orb[data-state="transcribing"]::after, .lk-voice-orb[data-state="running"]::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 3px dashed rgba(109, 40, 217, .45); animation: voice-spin 2.4s linear infinite; }
.lk-voice-orb[data-state="speaking"] { background: radial-gradient(circle at 30% 30%, #fdba74, #ea580c); box-shadow: 0 14px 34px -10px rgba(234, 88, 12, .5); animation: voice-talk .7s ease-in-out infinite; }
.lk-voice-orb[data-state="error"] { background: radial-gradient(circle at 30% 30%, #fda4af, #e11d48); box-shadow: 0 14px 34px -10px rgba(225, 29, 72, .5); }
.lk-voice-orb[data-state="idle"] { background: radial-gradient(circle at 30% 30%, #94a3b8, #475569); box-shadow: 0 14px 34px -10px rgba(71, 85, 105, .5); }
@keyframes voice-ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes voice-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes voice-spin { to { transform: rotate(360deg); } }
@keyframes voice-talk { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.lk-voice-status { font-weight: 700; font-size: 1rem; color: #0f172a; }
.lk-voice-transcript { min-height: 22px; margin-top: 6px; color: var(--lk-muted); font-size: .92rem; line-height: 1.45; }
.lk-voice-transcript:not(:empty)::before { content: "\201C"; }
.lk-voice-transcript:not(:empty)::after { content: "\201D"; }
.lk-voice-reply { margin-top: 10px; text-align: left; font-size: .9rem; line-height: 1.5; color: #0f172a; background: #f8fafc; border: 1px solid var(--lk-border); border-radius: 12px; padding: 10px 12px; max-height: 140px; overflow: auto; }
.lk-voice-reply:empty { display: none; }
.lk-voice-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.lk-voice-actions .btn-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.lk-voice-main { width: 64px; height: 64px; border-radius: 50%; font-size: 1.5rem; display: grid; place-items: center; padding: 0; box-shadow: 0 10px 24px -8px rgba(15, 118, 110, .6); }
.lk-voice-main.listening { background: var(--lk-expense); border-color: var(--lk-expense); }
.lk-voice-mute.muted { color: var(--lk-expense); }
.lk-voice-hint { font-size: .72rem; color: var(--lk-muted); margin-top: 12px; line-height: 1.5; }
body.lk-voice-open { overflow: hidden; }
@media (max-width: 575.98px) { .lk-voice { padding: 0; align-items: end; } .lk-voice-card { width: 100%; border-radius: 24px 24px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .lk-voice-orb, .lk-voice-orb .ring, .lk-voice-orb::after { animation: none !important; } }

/* ---------- Kuota AI ---------- */
.quota-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--lk-border); background: #fff; font-size: .74rem; font-weight: 600; color: #334155; white-space: nowrap; }
.quota-chip i { color: var(--lk-primary); }
.quota-chip.warn { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.quota-chip.warn i { color: #d97706; }
.quota-chip.bad { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }
.quota-chip.bad i { color: #e11d48; }
.quota-strip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--lk-primary-50); border: 1px solid #99f6e4; }
.quota-strip > i { font-size: 1.2rem; color: var(--lk-primary); }
.quota-strip.blocked { background: #fff1f2; border-color: #fecdd3; }
.quota-strip.blocked > i { color: #e11d48; }
@media (max-width: 767.98px) { .chat-head .quota-chip span { display: none; } .chat-head .quota-chip { padding: 4px 8px; } }
/* Header chat sempit (mis. layar 1024 dengan menu samping): judul tidak boleh terjepit jadi satu huruf per baris. */
.chat-head { container-type: inline-size; }
.chat-head > .min-w-0 { flex: 1 1 auto; min-width: 120px; }
@container (max-width: 560px) { .quota-chip span { display: none; } .quota-chip { padding: 4px 8px; } #modelSynced { display: none; } .chat-head .model { white-space: nowrap; } }

/* ---------- Super admin ---------- */
.admin-users td { vertical-align: middle; }
.admin-users .u-name { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-users tr.is-blocked td { background: #fff7f7; }
.admin-users sup { color: var(--lk-primary); font-weight: 700; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.bad { background: #fee2e2; color: #991b1b; }
.tag.admin { background: #ede9fe; color: #5b21b6; }
.kind-list { display: flex; flex-direction: column; gap: 6px; }
.kind-row { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.kind-row .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.kind-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind-row .n { color: var(--lk-muted); }
.kind-row .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.um-usage { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--lk-border); font-size: .8rem; }
.um-usage .lbl { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; }
.mode-toggle.danger { border-color: #fecdd3; color: #9f1239; }
.mode-toggle.danger .form-check-input:checked { background-color: var(--lk-expense); }
.log-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.log-filters .form-select { width: auto; }
.admin-log td, .admin-log th { padding: 8px 10px; }
@media (max-width: 767.98px) { .um-usage { grid-template-columns: 1fr; } .log-filters { width: 100%; } .log-filters .form-select { flex: 1; } }

/* ---------- Baris input langsung di tabel transaksi ---------- */
.trx-table .entry-body tr.entry-row td { background: #f8fffd; border-top: 2px dashed #99f6e4; vertical-align: top; padding-top: 8px; padding-bottom: 8px; }
.trx-table .entry-row.ready td { background: #f0fdfa; }
.trx-table .entry-row.invalid td { background: #fffbeb; border-top-color: #fcd34d; }
.trx-table .entry-row .form-control-sm, .trx-table .entry-row .form-select-sm { font-size: .84rem; border-radius: 8px; }
.trx-table .entry-row .e-date { padding-right: 4px; }
.trx-table .entry-row .ts-wrapper .ts-control { min-height: 31px; padding: 3px 8px; border-radius: 8px; font-size: .84rem; }
.trx-table .entry-row .e-saldo { padding-top: 14px; font-variant-numeric: tabular-nums; }
.trx-table .entry-row .e-saldo.text-muted { font-weight: 400; }
.trx-table .entry-row .btn-ico { opacity: 1; }
.entry-state { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-top: 3px; font-size: 1.05rem; color: var(--lk-primary); }
.entry-state[data-s="ok"] { color: var(--lk-income); }
.entry-state[data-s="err"] { color: var(--lk-expense); }
.trx-table .entry-hint td { padding: 2px 12px 10px; font-size: .76rem; color: var(--lk-muted); background: #f8fffd; border-bottom: 0; }
.trx-table .entry-hint .lvl-ok { color: var(--lk-income); }
.trx-table .entry-hint .lvl-warn { color: #b45309; }
.trx-table .entry-hint .lvl-err { color: var(--lk-expense); }
.trx-table .entry-hint kbd { font-size: .68rem; padding: 1px 5px; background: #e2e8f0; color: #334155; border-radius: 4px; }
.ts-cat { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ts-cat .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-icon.xs { width: 22px; height: 22px; border-radius: 7px; font-size: .74rem; display: inline-grid; place-items: center; flex-shrink: 0; }
.ts-dropdown.ts-entry { z-index: 1040; min-width: 240px; }
.ts-dropdown.ts-entry .optgroup-header { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--lk-muted); }
.trx-table tr.flash td { animation: row-flash 1.8s ease-out; }
@keyframes row-flash { 0% { background: #ccfbf1; } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .trx-table tr.flash td { animation: none; } }

/* ---------- Simulasi keuangan (v3: lega, satu fokus per bagian) ---------- */
.simx { --sx-gap: 20px; }
.simx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 0; }
.simx-title h2 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.simx-title h2 .lk-info { font-size: .9rem; }
.simx-sub { color: var(--lk-muted); font-size: .88rem; margin-top: 4px; }
.simx-head-act { display: flex; align-items: center; gap: 8px; min-width: 0; }
.simx-scn { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--lk-border); border-radius: 12px; padding: 0 4px 0 12px; height: 34px; margin: 0; color: var(--lk-muted); min-width: 0; }
.simx-scn select { border: 0; background: transparent; font-weight: 700; color: var(--lk-text); font-size: .86rem; padding: 0 6px; height: 32px; max-width: 220px; min-width: 0; outline: none; cursor: pointer; }
.simx-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: -4px; min-width: 0; }
.simx-horizon { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.simx-horizon::-webkit-scrollbar { display: none; }
.simx-horizon button { flex-shrink: 0; white-space: nowrap; }
.simx-mode { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; color: var(--lk-muted); }
.simx-mode select { border: 1px solid var(--lk-border); background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 9px center / 10px; border-radius: 10px; font-size: .82rem; font-weight: 600; color: #334155; padding: 6px 28px 6px 12px; appearance: none; cursor: pointer; }
.simx-busy { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--lk-primary); opacity: 0; transition: opacity .2s; }
.simx-busy.on { opacity: 1; }
.simx-busy .spinner-border { width: .8rem; height: .8rem; border-width: 2px; }
.simx-fresh { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--lk-border); border-radius: 999px; background: #fff; font-size: .76rem; font-weight: 600; color: var(--lk-muted); white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.simx-fresh:hover { color: var(--lk-primary); border-color: #99f6e4; background: var(--lk-primary-50); }
.simx-fresh .dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.simx-fresh .bi { font-size: .9rem; transition: transform .4s ease; }
.simx-fresh:hover .bi { transform: rotate(120deg); }
.simx-fresh.spin .bi { animation: sx-spin .8s linear infinite; }
.simx-fresh.spin .dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
@keyframes sx-spin { to { transform: rotate(360deg); } }

.simx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
.simx-main { min-width: 0; display: flex; flex-direction: column; gap: var(--sx-gap); container-type: inline-size; }
@media (max-width: 1599.98px) { .simx-grid { grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; } }
@media (max-width: 1199.98px) { .simx-grid { grid-template-columns: minmax(0, 1fr); } }

/* KPI */
.simx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@container (max-width: 819.98px) { .simx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.simx-kpi { background: #fff; border: 1px solid var(--lk-border); border-radius: 18px; padding: 16px 18px; box-shadow: var(--lk-shadow); min-width: 0; transition: border-color .3s, background .3s; }
.simx-kpi .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.simx-kpi .lbl { font-size: .78rem; font-weight: 600; color: var(--lk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.simx-kpi .top i { color: #cbd5e1; font-size: 1rem; }
.simx-kpi .val { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.simx-kpi .sub { font-size: .75rem; color: var(--lk-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.simx-kpi.good .sub { color: var(--lk-income); }
.simx-kpi.warn { border-color: #fde68a; }
.simx-kpi.warn .sub { color: #b45309; }
.simx-kpi.bad { border-color: #fecdd3; background: #fffafb; }
.simx-kpi.bad .val, .simx-kpi.bad .sub { color: var(--lk-expense); }
.simx-kpi.bump { animation: sx-bump .7s ease-out; }
@keyframes sx-bump { 0% { box-shadow: 0 0 0 0 rgba(13, 148, 136, .28); } 100% { box-shadow: 0 0 0 12px rgba(13, 148, 136, 0); } }

/* kartu */
.simx-card { background: #fff; border: 1px solid var(--lk-border); border-radius: 20px; box-shadow: var(--lk-shadow); min-width: 0; }
.simx-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.simx-card-head h3 { font-size: .98rem; font-weight: 700; margin: 0; }
.simx-range { font-size: .78rem; color: var(--lk-muted); }
.simx-chart-box { height: 240px; padding: 10px 14px 6px; }
.simx-status { padding: 4px 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.simx-status:empty { display: none; }
.simx-alert { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: .84rem; line-height: 1.5; background: #f8fafc; color: #334155; }
.simx-alert i { flex-shrink: 0; margin-top: 2px; }
.simx-alert span { flex: 1; min-width: 0; }
.simx-alert .more { border: 0; background: rgba(255, 255, 255, .75); border-radius: 999px; font-size: .74rem; font-weight: 700; padding: 2px 10px; color: inherit; flex-shrink: 0; }
.simx-alert.sub { animation: sx-in .25s ease; }
.simx-alert.danger { background: #fff1f2; color: #9f1239; }
.simx-alert.warn { background: #fffbeb; color: #92400e; }
.simx-alert.info { background: #f0f9ff; color: #075985; }
.simx-alert.ok { background: #ecfdf5; color: #065f46; }

/* panel bertab */
.simx-panel { overflow: hidden; overflow: clip; }
.simx-tabs { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--lk-border); overflow-x: auto; scrollbar-width: none; }
.simx-tabs::-webkit-scrollbar { display: none; }
.simx-tabs button { border: 0; background: transparent; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 12px; font-size: .86rem; font-weight: 600; color: var(--lk-muted); position: relative; white-space: nowrap; flex-shrink: 0; transition: color .15s; }
.simx-tabs button:hover { color: var(--lk-text); }
.simx-tabs button.active { color: var(--lk-primary); }
.simx-tabs button::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2.5px; border-radius: 2px; background: var(--lk-primary); transform: scaleX(0); transition: transform .2s ease; }
.simx-tabs button.active::after { transform: scaleX(1); }
.simx-busybar { height: 2px; position: relative; overflow: hidden; }
.simx-busybar.on::before { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; border-radius: 2px; background: var(--lk-primary-600); animation: sx-slide 1s ease-in-out infinite; }
@keyframes sx-slide { from { left: -30%; } to { left: 100%; } }
.sim-tab { animation: sx-in .25s ease; }
@keyframes sx-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.simx-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 20px 24px 14px; flex-wrap: wrap; }
.simx-tools-l, .simx-tools-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.simx-tools-r { margin-left: auto; }
.simx-tools .btn-sm { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 11px; }
.simx-tools .simx-acc, .simx-tools .seg-mini { height: 34px; }
.simx-tools .seg-mini button { padding: 4px 12px; }
.simx-fold { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--lk-border); border-radius: 10px; background: #fff; color: #64748b; transition: color .2s, border-color .2s, background .2s; }
.simx-fold:hover { color: var(--lk-primary); border-color: #99f6e4; background: var(--lk-primary-50); }
.seg-mini { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; }
.seg-mini button { border: 0; background: transparent; font-size: .78rem; font-weight: 600; color: var(--lk-muted); padding: 4px 12px; border-radius: 8px; transition: background .15s, color .15s, box-shadow .15s; }
.seg-mini button.active { background: #fff; color: var(--lk-text); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }

/* chip andaian & yang disembunyikan */
.simx-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; align-items: center; }
.x-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 3px 3px 12px; border-radius: 999px; background: #f8fafc; border: 1px solid var(--lk-border); font-size: .8rem; font-weight: 600; color: #334155; cursor: pointer; transition: opacity .2s, transform .2s, border-color .15s; }
.x-chip:hover { border-color: #cbd5e1; }
.x-chip .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-chip.income { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.x-chip.expense { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.x-chip.adjust, .x-chip.set { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.x-chip.set { cursor: default; }
.x-chip.ai .bi-stars { color: #c026d3; }
.x-chip .x-del { border: 0; background: transparent; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: inherit; opacity: .55; padding: 0; }
.x-chip .x-del:hover { opacity: 1; background: rgba(15, 23, 42, .08); }
.x-chip.fresh { animation: sx-pop .45s ease; }
.x-chip.leaving { opacity: .3; transform: scale(.94); }
.x-chip.hidden-chip { background: #f1f5f9; color: #475569; cursor: default; }
.x-chip .x-show { border: 0; background: #fff; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--lk-primary); padding: 3px 10px; }
.x-reset { border: 0; background: transparent; font-size: .8rem; font-weight: 600; color: var(--lk-muted); padding: 4px 8px; border-radius: 8px; transition: color .15s, background .15s; }
.x-reset:hover { color: var(--lk-expense); background: #fff1f2; }
@keyframes sx-pop { 0% { transform: scale(.85); opacity: 0; } 60% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }

/* tabel transaksi simulasi: lega, kepala kolom menempel, bulan bisa diciutkan */
.simx-ledger-wrap { min-width: 0; }
.simx-ledger { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.simx-ledger col.c-date { width: 82px; }
.simx-ledger col.c-num { width: 124px; }
.simx-ledger col.c-bal { width: 148px; }
.simx-ledger col.c-act { width: 60px; } /* 8 + tombol 32 + 20 */
.simx-ledger thead th { position: sticky; top: var(--lk-topbar-h); z-index: 2; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; font-weight: 700; padding: 12px; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 -1px 0 var(--lk-border); white-space: nowrap; }
.simx-ledger th.num, .simx-ledger td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.simx-ledger td { padding: 15px 12px; border-bottom: 1px solid #f1f4f8; vertical-align: middle; }
.simx-ledger th:first-child, .simx-ledger td:first-child { padding-left: 26px; }
.simx-ledger th:last-child, .simx-ledger td:last-child { padding-right: 20px; }
.simx-ledger tr.lg-row td { transition: background .2s ease, box-shadow .2s ease; }
.simx-ledger tr.lg-row:hover td { background: #f7fbfa; }
.simx-ledger tr.lg-row:hover td:first-child { box-shadow: inset 3px 0 0 var(--lk-primary-600); }
.lg-date { width: 40px; text-align: center; line-height: 1.05; }
.lg-date b { display: block; font-size: 1.02rem; font-weight: 700; color: var(--lk-text); }
.lg-date span { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; }
.lg-lbl { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lg-ico { --c: #64748b; width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: .95rem; color: var(--c); background: #f1f5f9; background: color-mix(in srgb, var(--c) 12%, #fff); }
.lg-lbl .t { font-weight: 600; color: var(--lk-text); display: flex; align-items: center; gap: 6px; min-width: 0; }
.lg-lbl .t .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-lbl .s { font-size: .75rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.lg-badge { flex-shrink: 0; font-size: .64rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #fdf4ff; color: #a21caf; }
.lg-badge.ai { color: #c026d3; padding: 1px 5px; }
.lg-badge.off { background: #f1f5f9; color: #64748b; }
.simx-ledger td.out { color: var(--lk-expense); }
.simx-ledger td.in { color: var(--lk-income); }
.simx-ledger td.lg-bal { font-weight: 700; color: var(--lk-text); }
.simx-ledger td.lg-bal.text-expense { color: var(--lk-expense); }
.simx-ledger td.lg-bal.text-warning { color: #b45309 !important; }
.lg-edit { cursor: text; border-bottom: 1px dashed currentColor; padding: 2px 5px 1px; margin: 0 -5px; border-radius: 7px; transition: background .2s, border-color .2s; }
.lg-edit:hover { background: rgba(15, 118, 110, .08); border-bottom-color: transparent; }
.lg-input { max-width: 132px; margin-left: auto; text-align: right; border-radius: 10px; }
.simx-ledger td.lg-act-td { text-align: right; padding-left: 8px; }
.lg-act { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 10px; color: #94a3b8; display: inline-grid; place-items: center; opacity: .35; transition: opacity .2s, background .2s, color .2s; }
tr.lg-row:hover .lg-act, .lg-act:focus-visible { opacity: 1; }
.lg-act:hover { background: #eef2f6; color: var(--lk-text); }
.lg-act.show { opacity: 1; color: var(--lk-primary); background: var(--lk-primary-50); }
.lg-act.show:hover { background: var(--lk-primary-100); }
@media (hover: none) { .lg-act { opacity: .8; } }
.simx-ledger tr.lg-row.is-off td { background: repeating-linear-gradient(-45deg, #fbfcfd, #fbfcfd 7px, #f5f7fa 7px, #f5f7fa 14px); }
tr.lg-row.is-off .lg-ico, tr.lg-row.is-off .lg-lbl .nm, tr.lg-row.is-off .lg-lbl .s, tr.lg-row.is-off td.out, tr.lg-row.is-off td.in, tr.lg-row.is-off .lg-date { opacity: .45; }
tr.lg-row.is-off .lg-lbl .nm, tr.lg-row.is-off td.out span, tr.lg-row.is-off td.in span { text-decoration: line-through; }
.simx-ledger tr.lg-row.is-off td.lg-bal { color: #94a3b8; font-weight: 500; }
.simx-ledger tr.lg-row.is-new td { animation: sx-flash 2.2s ease-out; }
@keyframes sx-flash { 0%, 35% { background: #e6fbf6; } 100% { background: transparent; } }
.simx-ledger tr.lg-open td { background: var(--lk-primary-50); border-bottom: 0; padding-top: 16px; padding-bottom: 16px; }
.simx-ledger tr.lg-open .t { font-weight: 700; color: var(--lk-text); }
.simx-ledger tr.lg-open .s { font-size: .75rem; color: #64748b; }
/* kepala bulan: ciutkan/buka, arus masuk-keluar, saldo akhir, rincian */
.simx-ledger tr.lg-month td { padding-top: 28px; padding-bottom: 10px; border-bottom: 1px solid #eef2f6; }
.lg-mhead { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lg-mtoggle { display: inline-flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent; padding: 6px 12px 6px 6px; margin-left: -6px; border-radius: 12px; color: var(--lk-text); text-align: left; transition: background .2s; }
.lg-mtoggle:hover { background: #f1f5f9; }
.lg-mtoggle > .bi { width: 24px; height: 24px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px; background: #f1f5f9; color: #64748b; font-size: .7rem; transition: transform .25s ease, background .2s, color .2s; }
.lg-mtoggle:hover > .bi { background: #fff; color: var(--lk-text); }
tr.lg-month.is-closed .lg-mtoggle > .bi { transform: rotate(-90deg); }
.lg-mtoggle .nm { font-weight: 800; font-size: .95rem; white-space: nowrap; }
.lg-mtoggle .nm small { font-weight: 500; color: #94a3b8; font-size: .74rem; margin-left: 4px; }
.lg-mflow { display: inline-flex; align-items: center; gap: 12px; min-width: 0; font-size: .76rem; font-weight: 600; white-space: nowrap; color: #94a3b8; }
.lg-mflow .in { color: var(--lk-income); }
.lg-mflow .out { color: var(--lk-expense); }
.lg-mflow i { font-size: .68rem; margin-right: 3px; }
.lg-mflow .n { display: none; font-weight: 500; }
tr.lg-month.is-closed .lg-mflow .n { display: inline; }
.lg-mhead .end { margin-left: auto; font-size: .8rem; color: var(--lk-muted); white-space: nowrap; }
.lg-mhead .end b { color: var(--lk-text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.lg-mhead .end b.text-expense { color: var(--lk-expense); }
.lg-mdetail { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 6px 8px 6px 10px; margin-right: -8px; border-radius: 10px; font-size: .78rem; font-weight: 700; color: var(--lk-primary); transition: background .2s; }
.lg-mdetail:hover { background: var(--lk-primary-50); }
.lg-mdetail i { font-size: .7rem; transition: transform .2s; }
.lg-mdetail:hover i { transform: translateX(2px); }
.simx-ledger tr.is-folded { display: none; }
.simx-ledger tr.unfold td { animation: sx-fade .3s ease both; animation-delay: var(--d, 0ms); }
@keyframes sx-fade { from { opacity: 0; } to { opacity: 1; } }
.simx .pill { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.simx .pill.pos { background: #ecfdf5; color: #047857; }
.simx .pill.neg { background: #fff1f2; color: #be123c; }
.simx-ledger tr.lg-end td { background: #f8fafc; font-weight: 700; border-top: 1px solid var(--lk-border); border-bottom: 0; padding-top: 18px; padding-bottom: 18px; }
.simx-ledger tr.lg-end td.lg-bal { font-size: 1.02rem; }

/* tambah andaian cepat di bawah tabel */
.simx-quick { --sq-h: 40px; display: grid; grid-template-columns: auto minmax(0, 1fr) 170px 150px 128px auto; grid-template-areas: "type name amt date rep add" "hint hint hint hint hint hint"; align-items: center; column-gap: 10px; margin: 18px 20px 20px; padding: 10px; border: 1px solid var(--lk-border); border-radius: 18px; background: #f8fafc; transition: background .25s, border-color .25s, box-shadow .25s; }
.simx-quick:focus-within { background: #fff; border-color: #99f6e4; box-shadow: 0 0 0 4px rgba(20, 184, 166, .1), 0 16px 32px -22px rgba(15, 23, 42, .4); }
.simx-quick.warn { border-color: #fcd34d; box-shadow: 0 0 0 4px rgba(245, 158, 11, .14); animation: sx-shake .35s ease; }
.simx-quick.added .sq-add { animation: sx-bump .7s ease-out; }
@keyframes sx-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.sq-type { grid-area: type; display: inline-flex; gap: 2px; height: var(--sq-h); padding: 3px; border-radius: 12px; background: #eef2f6; }
.sq-type button { border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 12px; border-radius: 9px; font-size: .8rem; font-weight: 700; color: #64748b; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.sq-type button:hover { color: var(--lk-text); }
.sq-type button.active { background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.sq-type button[data-k="expense"].active { color: var(--lk-expense); }
.sq-type button[data-k="income"].active { color: var(--lk-income); }
.simx-quick .sq-in { height: var(--sq-h); width: 100%; min-width: 0; border: 1px solid var(--lk-border); border-radius: 12px; background: #fff; padding: 0 12px; font-size: .86rem; color: var(--lk-text); outline: none; transition: border-color .2s, box-shadow .2s; }
.simx-quick .sq-in:focus, .sq-amt:focus-within { border-color: var(--lk-primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
.sq-name { grid-area: name; }
.sq-amt { grid-area: amt; display: flex; align-items: center; height: var(--sq-h); min-width: 0; margin: 0; padding: 0 12px; border: 1px solid var(--lk-border); border-radius: 12px; background: #fff; cursor: text; transition: border-color .2s, box-shadow .2s; }
.sq-amt em { font-style: normal; font-size: .76rem; font-weight: 700; color: #94a3b8; margin-right: 6px; }
.sq-amt input { flex: 1; width: 100%; min-width: 0; border: 0; outline: none; background: transparent; text-align: right; font-size: .92rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--lk-expense); }
.simx-quick[data-kind="income"] .sq-amt input { color: var(--lk-income); }
.sq-amt input::placeholder { color: #cbd5e1; font-weight: 600; }
.sq-date { grid-area: date; }
.simx-quick .sq-rep { grid-area: rep; appearance: none; padding-right: 28px; cursor: pointer; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 10px center / 10px; }
.sq-add { grid-area: add; height: var(--sq-h); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border-radius: 12px; font-weight: 700; white-space: nowrap; }
.sq-hint { grid-area: hint; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0 4px; font-size: .72rem; color: #94a3b8; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .25s ease, opacity .2s ease, margin .25s ease; }
.simx-quick:focus-within .sq-hint, .simx-quick.warn .sq-hint { max-height: 60px; opacity: 1; margin-top: 8px; }
.simx-quick.warn .sq-hint .sq-msg { color: #b45309; font-weight: 700; }
.sq-hint kbd { font-family: inherit; font-size: .68rem; font-weight: 700; padding: 0 5px; border-radius: 5px; background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; box-shadow: none; }
@media (min-width: 1200px) { .simx-quick { position: sticky; bottom: 14px; z-index: 3; box-shadow: 0 14px 30px -24px rgba(15, 23, 42, .45); } }
@container (max-width: 1099.98px) {
  .simx-quick { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr) auto; grid-template-areas: "type name name name" "amt date rep add" "hint hint hint hint"; row-gap: 10px; }
}
@container (max-width: 559.98px) {
  .simx-quick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "type type" "name name" "amt amt" "date rep" "add add" "hint hint"; margin: 14px 14px 16px; }
  .sq-type button { flex: 1; }
}

/* kolom utama sedang (mis. chat terbuka di sampingnya): tabel tetap, kolom dipadatkan */
@container (max-width: 899.98px) {
  .simx-ledger col.c-date { width: 64px; }
  .simx-ledger col.c-num { width: 104px; }
  .simx-ledger col.c-bal { width: 122px; }
  .simx-ledger col.c-act { width: 52px; } /* 8 + 32 + 12 */
  .simx-ledger td { padding: 13px 8px; }
  .simx-ledger thead th { padding: 11px 8px; }
  .simx-ledger th:first-child, .simx-ledger td:first-child { padding-left: 18px; }
  .simx-ledger th:last-child, .simx-ledger td:last-child { padding-right: 12px; }
  .lg-lbl { gap: 11px; }
  .lg-ico { width: 34px; height: 34px; border-radius: 11px; font-size: .88rem; }
  .lg-mflow { display: none; }
  tr.lg-month.is-closed .lg-mflow { display: inline-flex; }
  tr.lg-month.is-closed .lg-mflow .in, tr.lg-month.is-closed .lg-mflow .out { display: none; }
  .lg-mhead { gap: 10px; }
  .simx-tools { padding: 18px 18px 12px; }
  .simx-chips { padding: 0 18px 14px; }
  .simx-quick { margin: 16px 16px 18px; }
}

/* tabel jadi daftar bila kolom utama sempit (ponsel) */
@container (max-width: 599.98px) {
  .simx-ledger { display: block; }
  .simx-ledger colgroup, .simx-ledger thead { display: none; }
  .simx-ledger tbody { display: block; }
  .simx-ledger tr.lg-row, .simx-ledger tr.lg-open, .simx-ledger tr.lg-end { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 32px; column-gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f4f8; transition: background .2s; }
  .simx-ledger tr.lg-row.is-folded { display: none; }
  .simx-ledger tr.lg-row td, .simx-ledger tr.lg-open td, .simx-ledger tr.lg-end td { display: block; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .simx-ledger tr.lg-row:hover { background: #f7fbfa; }
  .simx-ledger tr.lg-row:hover td, .simx-ledger tr.lg-row:hover td:first-child { background: transparent; box-shadow: none; }
  .simx-ledger tr > td:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .simx-ledger tr > td:nth-child(2) { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
  .simx-ledger tr > td:nth-child(3), .simx-ledger tr > td:nth-child(4) { grid-column: 3; grid-row: 1; }
  .simx-ledger tr > td.num:empty { display: none; }
  .simx-ledger tr.lg-row > td:nth-child(5) { grid-column: 3; grid-row: 2; font-size: .72rem; font-weight: 500; color: #94a3b8; }
  .simx-ledger tr > td:nth-child(6) { grid-column: 4; grid-row: 1 / span 2; }
  .simx-ledger tr.lg-open > td:nth-child(5), .simx-ledger tr.lg-end > td:nth-child(5) { grid-column: 3 / span 2; grid-row: 1 / span 2; }
  .simx-ledger tr.lg-end > td:nth-child(3), .simx-ledger tr.lg-end > td:nth-child(4) { display: none; }
  .simx-ledger tr.lg-open { background: var(--lk-primary-50); }
  .simx-ledger tr.lg-end { background: #f8fafc; border-top: 1px solid var(--lk-border); }
  .simx-ledger tr.lg-row.is-off { background: repeating-linear-gradient(-45deg, #fbfcfd, #fbfcfd 7px, #f5f7fa 7px, #f5f7fa 14px); }
  .simx-ledger tr.lg-row.is-off td { background: transparent; }
  .simx-ledger tr.lg-row.is-new { animation: sx-flash 2.2s ease-out; }
  .simx-ledger tr.lg-row.is-new td { animation: none; }
  .simx-ledger tr.unfold { animation: sx-fade .3s ease both; animation-delay: var(--d, 0ms); }
  .simx-ledger tr.unfold td { animation: none; }
  .simx-ledger tr.lg-month { display: block; }
  .simx-ledger tr.lg-month td { display: block; padding: 20px 16px 8px; }
  .lg-mhead { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tog det" "flow end"; row-gap: 2px; column-gap: 10px; }
  .lg-mtoggle { grid-area: tog; justify-self: start; max-width: 100%; }
  .lg-mdetail { grid-area: det; justify-self: end; }
  .lg-mflow { display: inline-flex; grid-area: flow; padding-left: 34px; }
  .lg-mhead .end { grid-area: end; justify-self: end; margin-left: 0; font-size: .76rem; }
  .lg-ico { width: 32px; height: 32px; border-radius: 10px; font-size: .84rem; }
  .lg-lbl { gap: 10px; }
  .lg-badge:not(.ai) { display: none; }
  .lg-act { opacity: .8; }
}
@container (max-width: 419.98px) {
  .lg-mflow .in, .lg-mflow .out { display: none; }
  .lg-mflow .n { display: inline; }
  .lg-mdetail span { display: none; }
}

/* per bulan */
.simx-summary { padding: 18px 20px 6px; }
.simx-summary .hd { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #94a3b8; margin-bottom: 10px; }
.simx-summary .row-it { display: flex; flex-wrap: wrap; gap: 10px; }
.simx-summary .it { flex: 1 1 120px; background: #f8fafc; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.simx-summary .it span { font-size: .74rem; color: var(--lk-muted); }
.simx-summary .it b { font-size: .95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.simx-summary .it.strong { background: var(--lk-primary-50); }
.simx-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 12px 20px 22px; }
.mcard { text-align: left; border: 1px solid var(--lk-border); background: #fff; border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; color: var(--lk-text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.mcard:hover { transform: translateY(-2px); box-shadow: var(--lk-shadow); border-color: #cbd5e1; }
.mc-h { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.mc-h b { font-size: .92rem; white-space: nowrap; }
.mc-h small { color: #94a3b8; font-size: .72rem; }
.mc-h .pill { margin-left: auto; }
.mc-bars { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: .72rem; color: var(--lk-muted); }
.mc-bars .b { height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.mc-bars .b i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.mc-bars .b.in i { background: #34d399; }
.mc-bars .b.out i { background: #fb7185; }
.mc-f { display: flex; justify-content: space-between; align-items: baseline; font-size: .76rem; color: var(--lk-muted); border-top: 1px dashed var(--lk-border); padding-top: 10px; }
.mc-f b { font-size: .95rem; color: var(--lk-text); font-variant-numeric: tabular-nums; }
.mc-f b.text-expense { color: var(--lk-expense); }

/* asumsi */
.simx-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 18px 20px; border-bottom: 1px solid #f3f5f8; }
.simx .mode-toggle span, .simx-modal .mode-toggle span { display: inline; }
.simx-buffer { width: auto; margin-left: auto; }
.simx-buffer .form-control { max-width: 130px; text-align: right; }
.simx-assume { display: grid; grid-template-columns: minmax(0, 1fr); }
.simx-assume > div + div { border-top: 1px solid #f3f5f8; }
@media (min-width: 1600px) { .simx-assume { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .simx-assume > div + div { border-top: 0; border-left: 1px solid #f3f5f8; } }
.simx-assume-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 16px 20px 6px; font-size: .78rem; font-weight: 700; color: var(--lk-muted); }
.simx-assume-head b { color: var(--lk-text); font-size: .92rem; font-variant-numeric: tabular-nums; }
.sim-table td, .sim-table th { padding: 8px 12px; vertical-align: middle; }
.sim-table thead th { background: transparent; font-size: .66rem; color: #94a3b8; padding-top: 6px; padding-bottom: 6px; }
.sim-table tr:last-child td { border-bottom: 0; }
.sim-table tr.custom td:first-child { box-shadow: inset 3px 0 0 var(--lk-primary); }
.sim-table .a-amount { max-width: 150px; margin-left: auto; font-variant-numeric: tabular-nums; border-radius: 9px; }
.sim-table .a-amount.over { border-color: #fda4af; }
.sim-table .a-day { width: 60px; padding-left: 6px; padding-right: 2px; border-radius: 9px; }
.cat-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* harus disiapkan */
.simx-events { max-height: 620px; overflow: auto; padding: 10px; }
.simx-events .ev { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; transition: background .15s; }
.simx-events .ev + .ev { margin-top: 2px; }
.simx-events .ev:hover { background: #fafbfc; }
.simx-events .ev.danger { background: #fff5f6; }
.simx-events .ev.warn { background: #fffcf2; }
.simx-events .ev .t { font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simx-events .ev .s { font-size: .74rem; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simx-events .ev .amt { text-align: right; display: flex; flex-direction: column; flex-shrink: 0; line-height: 1.3; }
.simx-events .ev .amt b { font-variant-numeric: tabular-nums; font-size: .88rem; }
.simx-events .ev .amt span { font-size: .72rem; color: #94a3b8; }

/* saran lengkap & rincian bulan */
.simx-adv-bar { display: flex; gap: 8px; align-items: center; padding: 18px 22px 0; }
.simx-adv { padding: 14px 22px 22px; }
.adv-sum { font-size: .95rem; line-height: 1.65; padding: 14px 16px; border-radius: 14px; background: var(--lk-primary-50); }
.adv-h { font-weight: 700; font-size: .86rem; margin: 20px 0 10px; display: flex; align-items: center; gap: 6px; }
.adv-list { margin: 0; padding-left: 18px; font-size: .86rem; line-height: 1.6; }
.adv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.adv-card { border: 1px solid var(--lk-border); border-radius: 14px; padding: 12px 14px; font-size: .84rem; line-height: 1.55; }
.adv-card b { display: block; margin-bottom: 3px; }
.adv-table td { vertical-align: middle; }
.adv-close { margin-top: 16px; font-style: italic; color: #334155; font-size: .86rem; }
.mm-sec { border: 1px solid var(--lk-border); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.mm-h { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); margin-bottom: 8px; }
.mm-h span { color: var(--lk-text); text-transform: none; letter-spacing: 0; font-size: .86rem; }
.mm-row { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; padding: 3px 0; }
.mm-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mm-cat { padding: 2px 0 6px; }
.mm-bar { height: 5px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.mm-bar i { display: block; height: 100%; border-radius: 999px; background: var(--lk-primary-600); }
.mm-total { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 14px 16px; border-radius: 14px; background: #f8fafc; }
.mm-total .lbl { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; }
.mm-total b { font-size: 1rem; }

/* asisten simulasi */
.simx-chat { position: sticky; top: calc(var(--lk-topbar-h) + 12px); height: calc(100vh - var(--lk-topbar-h) - 28px); min-height: 460px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--lk-border); border-radius: 22px; box-shadow: var(--lk-shadow); overflow: hidden; }
.simx-chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #f3f5f8; }
.simx-chat-head .av { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex-shrink: 0; background: linear-gradient(135deg, #14b8a6, #7c3aed); }
.simx-chat.thinking .av i { animation: sx-twinkle 1.2s ease-in-out infinite; }
@keyframes sx-twinkle { 50% { transform: scale(.75) rotate(20deg); opacity: .7; } }
.simx-chat-head b { display: block; font-size: .92rem; }
.simx-chat-head span { display: block; font-size: .74rem; color: var(--lk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.simx-chat.thinking #chatStatus { color: var(--lk-primary); }
.simx-chat-x { display: none; }
.simx-chat-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px 8px; overscroll-behavior: contain; }
.simx-chat-foot { border-top: 1px solid #f3f5f8; padding: 10px 12px 12px; background: #fff; }
.simx-chat-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.simx-chat-chips:empty { display: none; }
.simx-chat-chips::-webkit-scrollbar { display: none; }
.sc-chip { flex-shrink: 0; border: 1px solid var(--lk-border); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .76rem; font-weight: 600; color: #334155; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; transition: border-color .15s, color .15s, background .15s; }
.sc-chip:hover { border-color: var(--lk-primary-600); color: var(--lk-primary); background: var(--lk-primary-50); }
.simx-composer { display: flex; align-items: flex-end; gap: 6px; background: #f8fafc; border: 1px solid var(--lk-border); border-radius: 18px; padding: 6px 6px 6px 14px; transition: border-color .15s, box-shadow .15s, background .15s; }
.simx-composer:focus-within { border-color: var(--lk-primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); background: #fff; }
.simx-composer textarea { flex: 1; min-width: 0; border: 0; background: transparent; resize: none; outline: none; font-size: .88rem; line-height: 1.45; padding: 8px 0; max-height: 120px; color: var(--lk-text); }
.simx-composer .btn-icon { width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0; padding: 0; display: grid; place-items: center; }
.simx-hello { text-align: center; padding: 16px 4px 8px; animation: sx-in .3s ease; }
.hello-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; font-size: 1.4rem; color: #fff; background: linear-gradient(135deg, #14b8a6, #7c3aed); box-shadow: 0 10px 24px -10px rgba(124, 58, 237, .6); }
.simx-hello h4 { font-size: 1.02rem; font-weight: 800; margin: 0 0 4px; }
.simx-hello p { font-size: .82rem; color: var(--lk-muted); margin: 0 0 18px; }
.simx-ideas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.simx-ideas .idea { border: 1px solid var(--lk-border); background: #fff; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: .8rem; font-weight: 600; color: #334155; line-height: 1.35; text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.simx-ideas .idea i { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--lk-primary-50); color: var(--lk-primary); font-size: .9rem; }
.simx-ideas .idea:hover { border-color: var(--lk-primary-600); transform: translateY(-1px); box-shadow: var(--lk-shadow); }
.more-ideas { border: 0; background: transparent; font-size: .78rem; font-weight: 600; color: var(--lk-muted); margin-top: 12px; padding: 4px 10px; border-radius: 8px; }
.more-ideas:hover { color: var(--lk-primary); }
.more-ideas i { display: inline-block; transition: transform .2s; }
.more-ideas.open i { transform: rotate(180deg); }
.simx-more { display: none; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.simx-more.open { display: flex; animation: sx-in .2s ease; }
.sc-msg { display: flex; flex-direction: column; margin-bottom: 16px; animation: sx-msg .3s ease both; }
@keyframes sx-msg { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sc-msg.user { align-items: flex-end; }
.sc-msg.user .bub { background: var(--lk-primary); color: #fff; border-radius: 18px 18px 6px 18px; padding: 9px 14px; max-width: 88%; font-size: .86rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.sc-msg.model .bub { align-self: stretch; background: #f8fafc; border-radius: 6px 18px 18px 18px; padding: 12px 14px; font-size: .86rem; line-height: 1.6; color: #1e293b; overflow-wrap: anywhere; }
.sc-msg.typing-msg .bub { align-self: flex-start; padding: 10px 14px; }
.sc-msg.model .bub.err { background: #fff1f2; color: #9f1239; }
.sc-msg .md p { margin: 0 0 8px; }
.sc-msg .md > :last-child { margin-bottom: 0; }
.sc-msg .md ul, .sc-msg .md ol { padding-left: 18px; margin: 0 0 8px; }
.sc-msg .md li { margin-bottom: 2px; }
.sc-msg .md strong { font-weight: 700; color: var(--lk-text); }
.sc-msg .md h1, .sc-msg .md h2, .sc-msg .md h3, .sc-msg .md h4 { font-size: .9rem; font-weight: 700; margin: 10px 0 6px; }
.sc-msg .md table { font-size: .78rem; margin: 6px 0; border-collapse: collapse; }
.sc-msg .md td, .sc-msg .md th { padding: 3px 8px; border: 1px solid var(--lk-border); }
.sc-applied { margin-top: 10px; background: #fff; border: 1px solid var(--lk-border); border-radius: 12px; font-size: .78rem; }
.sc-applied .hd { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; color: var(--lk-primary); font-weight: 700; user-select: none; }
.sc-applied .hd .lbl { flex: 1; min-width: 0; }
.sc-applied .chev { color: #94a3b8; transition: transform .2s; }
.sc-applied.open .chev { transform: rotate(180deg); }
.sc-applied .undo { border: 0; background: var(--lk-primary-50); color: var(--lk-primary); font-weight: 700; font-size: .74rem; border-radius: 999px; padding: 3px 10px; }
.sc-applied .undo:hover { background: var(--lk-primary-100); }
.sc-applied ul { display: none; margin: 0; padding: 0 12px 8px 30px; color: #475569; line-height: 1.5; }
.sc-applied.open ul { display: block; }
.sc-applied .see { display: none; align-items: center; gap: 6px; width: 100%; border: 0; border-top: 1px solid #f3f5f8; background: transparent; padding: 8px 10px; font-size: .76rem; font-weight: 700; color: #334155; }
.sc-applied.undone .hd { color: var(--lk-muted); }
.sc-applied.undone ul { text-decoration: line-through; opacity: .6; }
.sc-applied.undone .see { display: none !important; }
.viz-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.viz-list:empty { display: none; }
.viz { background: #fff; border: 1px solid var(--lk-border); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.viz-t { font-size: .8rem; font-weight: 700; margin-bottom: 8px; color: var(--lk-text); }
.viz-c { position: relative; }
.viz-foot { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--lk-border); padding-top: 8px; margin-top: 6px; font-size: .78rem; color: var(--lk-muted); }
.viz-foot b { font-size: .95rem; }
.viz-note { font-size: .74rem; color: var(--lk-muted); margin-top: 6px; }
.viz-alloc { display: flex; gap: 14px; align-items: center; }
.viz-c.donut { width: 120px; height: 120px; flex-shrink: 0; }
.alloc-mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; line-height: 1.15; }
.alloc-mid span { font-size: .64rem; color: #94a3b8; }
.alloc-mid b { font-size: .86rem; }
.alloc-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.alloc-row { display: flex; gap: 8px; align-items: flex-start; font-size: .78rem; }
.alloc-row .sw { width: 9px; height: 9px; border-radius: 3px; margin-top: 4px; flex-shrink: 0; }
.alloc-row .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alloc-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.alloc-row .nt { font-size: .7rem; color: #94a3b8; }
.alloc-row.rest .sw { background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 2px, #fff 2px, #fff 4px); border: 1px solid #cbd5e1; }
@media (max-width: 420px) { .viz-alloc { flex-direction: column; align-items: stretch; } .viz-c.donut { margin: 0 auto; } }
.viz-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.viz-kpis .vk { background: #f8fafc; border-radius: 12px; padding: 8px 10px; min-width: 0; }
.viz-kpis .lbl { font-size: .68rem; color: var(--lk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viz-kpis .val { font-size: .95rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.viz-kpis .dl { font-size: .7rem; font-weight: 600; }
.viz-table { font-size: .78rem; }
.viz .viz-table th { font-size: .7rem; padding: 6px 8px; background: transparent; text-transform: none; letter-spacing: 0; white-space: normal; color: var(--lk-muted); vertical-align: bottom; }
.viz .viz-table td { padding: 6px 8px; }
.viz-tl .tl { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: .8rem; border-bottom: 1px dashed #f1f5f9; }
.viz-tl .tl:last-child { border-bottom: 0; }
.viz-tl .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.viz-tl .dot.in { background: #34d399; }
.viz-tl .dot.out { background: #fb7185; }
.viz-tl .d { width: 48px; font-size: .72rem; color: #94a3b8; flex-shrink: 0; }
.viz-tl b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.viz-check .ck { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: .8rem; border-bottom: 1px dashed #f1f5f9; margin: 0; cursor: pointer; }
.viz-check .ck:last-child { border-bottom: 0; }
.viz-check .ck input { margin-top: 2px; flex-shrink: 0; }
.viz-check .ck input:checked + span { text-decoration: line-through; color: var(--lk-muted); }
.viz-check .ck b { white-space: nowrap; }
.viz-goal .g { padding: 5px 0; }

/* menu per baris, snackbar */
.simx-menu { position: fixed; z-index: 1062; min-width: 230px; max-width: 300px; background: #fff; border: 1px solid var(--lk-border); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .28); padding: 6px; visibility: hidden; opacity: 0; transform: scale(.96) translateY(-4px); transform-origin: top right; transition: opacity .12s, transform .12s, visibility 0s linear .12s; }
.simx-menu.on { visibility: visible; opacity: 1; transform: none; transition: opacity .12s, transform .12s, visibility 0s; }
.simx-menu .hd { font-size: .68rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simx-menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; font-size: .84rem; color: #1e293b; text-align: left; }
.simx-menu button:hover, .simx-menu button:focus-visible { background: #f1f5f9; outline: none; }
.simx-menu button i { color: #64748b; width: 16px; text-align: center; }
.simx-menu button.danger, .simx-menu button.danger i { color: var(--lk-expense); }
.simx-menu .sep { height: 1px; background: #f1f5f9; margin: 4px 6px; }
.simx-snack { position: fixed; left: 50%; bottom: 24px; z-index: 1060; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); background: #0f172a; color: #fff; border-radius: 14px; padding: 10px 10px 10px 16px; font-size: .84rem; box-shadow: 0 16px 36px -12px rgba(15, 23, 42, .5); opacity: 0; visibility: hidden; transform: translate(-50%, 16px); transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .25s; }
.simx-snack.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .25s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.simx-snack i { color: #5eead4; }
.simx-snack span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.simx-snack button { border: 0; background: rgba(255, 255, 255, .1); color: #5eead4; font-weight: 700; border-radius: 9px; padding: 5px 12px; font-size: .8rem; flex-shrink: 0; }
.simx-snack button:hover { background: rgba(255, 255, 255, .18); }

/* modal: pakai transaksi nyata */
.real-top { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--lk-border); flex-wrap: wrap; }
.real-top #realMonth { width: auto; min-width: 200px; }
.real-search { position: relative; flex: 1; min-width: 160px; }
.real-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .8rem; }
.real-search input { padding-left: 30px; }
.real-all { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; margin: 0; color: #334155; cursor: pointer; }
.real-list { padding: 8px 10px; min-height: 260px; }
.real-group { border-radius: 14px; transition: background .15s; }
.real-group + .real-group { margin-top: 2px; }
.real-group.has { background: var(--lk-primary-50); }
.real-gh { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.real-gh .form-check-input { margin: 0; flex-shrink: 0; }
.real-tg { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 0; text-align: left; color: var(--lk-text); }
.real-tg .lg-ico { width: 30px; height: 30px; border-radius: 10px; }
.real-tg .nm { font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.real-tg .n { font-size: .7rem; font-weight: 700; background: #f1f5f9; color: #64748b; border-radius: 999px; padding: 1px 8px; flex-shrink: 0; }
.real-tg b { margin-left: auto; font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.real-tg .chev { color: #94a3b8; transition: transform .2s; }
.real-group.open .chev { transform: rotate(180deg); }
.real-rows { display: none; padding: 0 10px 8px 40px; }
.real-group.open .real-rows { display: block; animation: sx-in .2s ease; }
.real-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: .82rem; cursor: pointer; margin: 0; }
.real-row:hover { background: rgba(148, 163, 184, .1); }
.real-row .form-check-input { margin: 0; flex-shrink: 0; }
.real-row .d { width: 46px; color: #94a3b8; font-size: .74rem; flex-shrink: 0; }
.real-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.real-row .t small { color: #94a3b8; margin-left: 6px; font-size: .72rem; }
.real-row b { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.real-foot { flex-direction: column; align-items: stretch; gap: 10px; }
.real-foot > * { margin: 0; }
.real-opts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.real-target { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; font-weight: 600; color: #334155; }
.real-target select { width: auto; }
.real-act { display: flex; align-items: center; gap: 8px; }
.real-sum { flex: 1; font-size: .82rem; color: var(--lk-muted); min-width: 0; }
.real-sum b { color: var(--lk-text); }

/* chat di layar < 1200px: panel geser + tombol mengambang */
.simx-chat-fab, .simx-chat-backdrop { display: none; }
@media (min-width: 1200px) { body.page-simx .lk-fab { display: none; } }
@media (max-width: 1199.98px) {
  .simx { padding-bottom: 72px; }
  .simx-chat { position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: min(86vh, 760px); min-height: 0; z-index: 1046; border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px -12px rgba(15, 23, 42, .3); visibility: hidden; transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s; }
  .simx-chat.open { visibility: visible; transform: none; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
  .simx-chat-x { display: inline-grid; }
  .simx-chat-head { position: relative; padding-top: 18px; }
  .simx-chat-head::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: #e2e8f0; }
  .simx-chat-backdrop { display: block; position: fixed; inset: 0; z-index: 1045; background: rgba(15, 23, 42, .35); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .simx-chat-backdrop.on { opacity: 1; pointer-events: auto; }
  .simx-chat-fab { display: inline-flex; position: fixed; right: 92px; bottom: 28px; z-index: 1034; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 999px; color: #fff; font-weight: 700; font-size: .86rem; background: linear-gradient(135deg, #0d9488, #7c3aed); box-shadow: 0 12px 28px -10px rgba(124, 58, 237, .6); transition: transform .2s, opacity .2s; }
  .simx-chat-fab:hover { transform: translateY(-2px); }
  body.simx-chat-open { overflow: hidden; }
  body.simx-chat-open .simx-chat-fab, body.simx-chat-open .lk-fab { opacity: 0; pointer-events: none; }
  .sc-applied .see { display: flex; }
  .simx-snack { bottom: 88px; }
}
@media (min-width: 768px) and (max-width: 1199.98px) { .simx-chat { left: auto; right: 16px; bottom: 16px; width: 440px; border-radius: 22px; height: min(calc(100vh - 100px), 760px); } }

/* ponsel */
@media (max-width: 575.98px) {
  .simx { --sx-gap: 14px; }
  .simx-title h2 { font-size: 1.2rem; }
  .simx-sub { font-size: .8rem; }
  .simx-head-act { width: 100%; }
  .simx-scn { flex: 1; }
  .simx-scn select { max-width: none; flex: 1; }
  .simx-bar { gap: 8px; }
  .simx-kpis { gap: 10px; }
  .simx-kpi { padding: 12px 14px; border-radius: 16px; }
  .simx-kpi .val { font-size: 1.02rem; margin-top: 6px; }
  .simx-kpi .top i { display: none; }
  .simx-card { border-radius: 18px; }
  .simx-card-head { padding: 14px 16px 0; }
  .simx-chart-box { height: 200px; padding: 8px 8px 4px; }
  .simx-status { padding: 4px 14px 14px; }
  .simx-tabs button { padding: 10px 11px 12px; font-size: .82rem; }
  .simx-tools { padding: 14px 14px 8px; }
  .simx-chips { padding: 0 14px 10px; }
  .simx-chat-fab { right: 80px; bottom: 20px; }
  .simx-summary { padding: 14px 14px 4px; }
  .simx-months { padding: 10px 14px 16px; grid-template-columns: 1fr; }
  .simx-opts { padding: 14px; }
  .simx-buffer { margin-left: 0; width: 100%; }
  .simx-buffer .form-control { max-width: none; }
  .simx-assume-head { padding: 14px 14px 4px; }
  .simx-events { padding: 6px; }
  .simx-adv-bar { padding: 14px 14px 0; }
  .simx-adv { padding: 12px 14px 16px; }
  .real-top #realMonth { width: 100%; }
  .real-act { flex-wrap: wrap; }
  .real-sum { flex-basis: 100%; }
  .real-act .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .simx *, .simx *::before, .simx *::after { animation: none !important; transition: none !important; }
}

/* ---------- Rekening v2: lebih lega, donat alokasi dengan label tengah ---------- */
.rk-hero { margin-bottom: 24px; }
/* Kartu ringkasan */
.rk-kpi { transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s; }
.rk-kpi:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -24px rgba(15,23,42,.45); }
.rk-kpi .card-body { position: relative; z-index: 1; padding: 18px 20px 30px; }
.rk-kpi-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rk-kpi-head .ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.rk-kpi:hover .rk-kpi-head .ico { transform: rotate(-8deg) scale(1.08); }
.rk-kpi-head .lbl { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lk-muted); display: inline-flex; align-items: center; gap: 4px; }
.rk-kpi .val { font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.rk-kpi-sub { font-size: .78rem; color: var(--lk-muted); margin-top: 8px; }
.rk-kpi .spark { width: 42%; height: 40px; opacity: .7; }
.rk-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rk-flow .f { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 7px 11px; border-radius: 12px; cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
.rk-flow .f.in { background: var(--lk-income-bg); }
.rk-flow .f.out { background: var(--lk-expense-bg); }
.rk-flow .f:hover { transform: translateY(-2px); box-shadow: 0 8px 16px -12px rgba(15,23,42,.45); }
.rk-flow .k { font-size: .7rem; font-weight: 600; color: var(--lk-muted); white-space: nowrap; }
.rk-flow .f.in .k i, .rk-flow .f.in .v { color: var(--lk-income); }
.rk-flow .f.out .k i, .rk-flow .f.out .v { color: var(--lk-expense); }
.rk-flow .v { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-kpi .card-body { container-type: inline-size; }
/* Kartu sempit (tablet, 3 kartu sebaris): angka tetap utuh, Masuk/Keluar ditumpuk */
@container (max-width: 260px) {
  .rk-kpi .val { font-size: 1.18rem; }
  .rk-flow { grid-template-columns: 1fr; gap: 6px; }
  .rk-flow .f { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 10px; }
  .rk-flow .v { font-size: .92rem; }
}

/* Alokasi aset: angka tengah ringkas, label tengah menggantikan tooltip */
.ra-count { font-size: .72rem; font-weight: 600; color: var(--lk-muted); background: #f1f5f9; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ra-body { container-type: inline-size; padding: 24px 20px 20px; }
.ra { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ra-chart { position: relative; width: 196px; height: 196px; flex-shrink: 0; }
.ra-center { position: absolute; inset: 30px; z-index: 2; border-radius: 50%; padding: 0 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--c, #94a3b8) 9%, #fff) 0%, #fff 72%); transition: background .35s ease; }
.ra-lbl { max-width: 100%; font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--lk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-lbl.is-acc { font-size: .78rem; letter-spacing: 0; text-transform: none; color: var(--c); }
.ra-val { margin: 4px 0 5px; font-weight: 800; font-size: 1.55rem; line-height: 1.05; letter-spacing: -.03em; color: var(--lk-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ra-val .cur { margin-right: 3px; font-size: .68rem; font-weight: 700; letter-spacing: 0; color: var(--lk-muted); vertical-align: .6em; }
.ra-val .u { margin-left: 3px; font-size: .84rem; font-weight: 700; letter-spacing: 0; color: #475569; }
.ra-sub { font-size: .72rem; color: var(--lk-muted); white-space: nowrap; }
.ra-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); font-variant-numeric: tabular-nums; }
.ra-center.swap > * { animation: raSwap .32s cubic-bezier(.2,.8,.2,1) backwards; }
.ra-center.swap > :nth-child(2) { animation-delay: .03s; }
.ra-center.swap > :nth-child(3) { animation-delay: .06s; }
@keyframes raSwap { from { opacity: 0; translate: 0 5px; scale: .96; } to { opacity: 1; translate: none; scale: none; } }
.ra-list { align-self: stretch; min-width: 0; display: flex; flex-direction: column; gap: 4px; max-height: 346px; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; padding: 3px; margin: -3px; }
.ra-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; cursor: pointer; outline: none; transition: background .25s, opacity .25s, transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .25s; animation: raIn .5s cubic-bezier(.2,.8,.2,1) var(--d, 0ms) backwards; }
.ra-item:hover, .ra-item.hot, .ra-item:focus-visible { background: color-mix(in srgb, var(--c) 8%, #fff); transform: translateX(3px); }
.ra-item:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); }
.ra-item.dim { opacity: .48; }
.ra-dot { width: 10px; height: 10px; margin-top: 5px; flex-shrink: 0; border-radius: 4px; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.ra-item.hot .ra-dot { transform: scale(1.25); }
.ra-main { flex: 1 1 auto; min-width: 0; }
.ra-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ra-name { min-width: 0; font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-pct { font-weight: 700; font-size: .8rem; color: #334155; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ra-bar { height: 6px; margin: 8px 0 6px; border-radius: 999px; background: #eef2f6; overflow: hidden; }
.ra-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--c); }
.ra-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .74rem; color: var(--lk-muted); }
.ra-meta .mono { white-space: nowrap; color: #475569; }
@keyframes raIn { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: none; } }
@container (min-width: 440px) {
  .ra { flex-direction: row; gap: 28px; }
  .ra-list { flex: 1 1 auto; align-self: center; }
}

/* Pergerakan bulan ini */
.move-list { gap: 2px; max-height: 450px; }
.move-row { gap: 14px; padding: 12px 10px; transition: background .25s, box-shadow .25s; }
.move-row + .move-row { border-top-color: #f1f4f8; }
.move-bars { gap: 4px; margin: 8px 0 6px; }
.move-bars .mb { height: 6px; }

/* Daftar rekening */
.acc-toolbar { margin: 4px 0 2px; }
.acc-grp-head { display: flex; align-items: center; gap: 8px; margin: 28px 2px 14px; }
.acc-grp-head .t { font-weight: 700; font-size: .98rem; }
.acc-grp-head .sum { margin-left: auto; font-weight: 700; font-size: .9rem; white-space: nowrap; }
.acc-tile.tilt { transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease; }
.acc-tile .card-body { display: flex; flex-direction: column; padding: 20px 20px 0; }
.acc-tile .acc-chips { gap: 8px; margin-top: 14px !important; }
.acc-tile .acc-chip { padding: 4px 10px; }
.acc-note { position: relative; z-index: 1; margin-top: 14px; padding: 8px 11px; border-radius: 10px; background: #f8fafc; font-size: .76rem; color: var(--lk-muted); overflow-wrap: anywhere; }
.acc-foot { position: relative; z-index: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; min-height: 58px; }
.acc-last { padding-bottom: 16px; font-size: .74rem; color: var(--lk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.acc-tile .acc-foot .spark { position: static; flex: 0 0 48%; width: auto; height: 42px; margin-right: -20px; opacity: .85; }
.acc-tile .card-bill { gap: 2px; padding: 5px; border: 1px solid #eef1f5; border-radius: 14px; background: #fafbfc; }
.acc-tile .card-bill .cb-line { align-items: flex-start; gap: 9px; padding: 7px 8px; border-radius: 10px; font-size: .78rem; transition: background .2s, box-shadow .2s; }
.acc-tile .card-bill .cb-line > i { margin-top: 2px; }
.acc-tile .card-bill .cb-line .txt { display: block; line-height: 1.4; }
.acc-tile .card-bill .cb-line[role=button]:hover { background: #fff; box-shadow: 0 4px 12px -8px rgba(15,23,42,.3); }
.acc-tile .card-bill .cb-line[role=button]:hover .txt { color: inherit; }
.acc-tile .card-bill .cb-line[role=button]:hover .cb-top .k { color: var(--lk-primary); }
.card-bill .cb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.card-bill .cb-top .k { min-width: 0; font-weight: 600; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.card-bill .cb-top b, .card-bill .cb-top .tag { flex-shrink: 0; white-space: nowrap; }
.card-bill .cb-sub { display: block; margin-top: 3px; font-size: .74rem; color: var(--lk-muted); line-height: 1.45; }
.card-bill .cb-sub b { color: var(--lk-text); }
@media (max-width: 575.98px) {
  .rk-kpi .val { font-size: 1.28rem; }
  .ra-chart { width: 184px; height: 184px; }
  .ra-center { inset: 28px; }
  .ra-item { padding: 9px 10px; }
  .acc-grp-head { margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .ra-item, .ra-center.swap > * { animation: none; }
  .rk-kpi, .rk-flow .f, .ra-item, .move-row, .acc-tile.tilt { transition: none; }
}

/* ---------- Ubah cicilan (pop-up Tagihan & cicilan) ---------- */
.inst-item { transition: border-color .2s, box-shadow .2s; }
.inst-item .inst-head .inst-edit-ic { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: #94a3b8; display: grid; place-items: center; transition: background .15s, color .15s, transform .2s cubic-bezier(.2,.8,.2,1); }
.inst-item .inst-head .inst-edit-ic:hover, .inst-item .inst-head .inst-edit-ic:focus-visible { background: var(--lk-primary-50); color: var(--lk-primary); transform: rotate(-10deg); }
.inst-item.editing { border-color: var(--lk-primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .1); }
.inst-item.editing .inst-head .inst-edit-ic { background: var(--lk-primary-50); color: var(--lk-primary); }
.inst-item.editing .inst-body { background: #fff; padding: 0; border-top-color: #e6f4f1; }
.inst-editbox:empty { display: none; }
.inst-editbox .ia { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.inst-editbox .ia-head { padding-top: 14px; }
.inst-acts .inst-edit { font-weight: 600; }
.ia-body.ia-single { grid-template-columns: minmax(0, 1fr); }
.ia-static { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; min-height: 42px; padding: 8px 14px; border: 1px dashed var(--lk-border); border-radius: 12px; background: #f8fafc; font-size: .84rem; }
.ia-static b { font-size: 1rem; }
.ia-static span { color: var(--lk-muted); font-size: .76rem; }
.ia-static .btn-link { font-size: .78rem; font-weight: 600; text-decoration: none; }
.ia-pct input { padding-left: 14px; }
.ia-pct em { padding: 0 14px 0 2px; }
.ia-step.locked { background: #f8fafc; }
.ia-step.locked button { opacity: .35; cursor: not-allowed; }
.ia-step.locked button:hover { background: #f1f5f9; color: #1e293b; }
.ia-step.locked input { background: #f8fafc; color: var(--lk-muted); }
.ia-note .bi-lock-fill { font-size: .64rem; }
.ia-prev { transition: opacity .2s; }
.ia-prev.loading { opacity: .55; }
@media (max-width: 575.98px) { .inst-item .inst-head .inst-edit-ic { order: 5; } }

/* ---------- Cicilan: bunga Rp/%, biaya admin, sakelar "sudah termasuk", pelunasan ---------- */
.ia-bunga { display: flex; flex-direction: column; gap: 14px; padding: 14px; border: 1px dashed #cbd5e1; border-radius: 14px; background: #fafbfc; }
.ia-unitrow { display: flex; gap: 8px; align-items: stretch; }
.ia-unitrow .ia-money { flex: 1 1 auto; min-width: 0; }
.ia-money .u-pct { padding: 0 14px 0 2px; }
.ia-unit { display: inline-flex; flex-shrink: 0; background: #f1f5f9; border-radius: 12px; padding: 4px; gap: 4px; }
.ia-unit button { border: 0; background: transparent; min-width: 44px; border-radius: 9px; font-size: .84rem; font-weight: 800; color: var(--lk-muted); transition: background .18s, color .18s, box-shadow .18s; }
.ia-unit button.active { background: #fff; color: var(--lk-primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.ia-switch { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; }
.ia-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ia-switch .sw { position: relative; flex-shrink: 0; width: 38px; height: 22px; margin-top: 1px; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.ia-switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .25); transition: transform .22s cubic-bezier(.2, .8, .2, 1); }
.ia-switch input:checked + .sw { background: var(--lk-primary-600); }
.ia-switch input:checked + .sw::after { transform: translateX(16px); }
.ia-switch input:focus-visible + .sw { outline: 2px solid var(--lk-primary-600); outline-offset: 2px; }
.ia-switch .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .82rem; line-height: 1.35; }
.ia-switch .t small { font-size: .72rem; color: var(--lk-muted); }
.ia-split { margin: -6px 0 10px; font-size: .74rem; color: var(--lk-muted); font-variant-numeric: tabular-nums; }
.ia-note-box { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid #ccfbf1; font-size: .74rem; line-height: 1.4; color: #334155; }
.ia-note-box i { color: var(--lk-primary); margin-top: 1px; }
.ia-hint { font-size: .68rem; color: var(--lk-muted); margin-top: 2px; }
.lunasi-form { margin-top: 12px; padding: 14px; border-radius: 14px; animation: ia-in .25s cubic-bezier(.2, .8, .2, 1); }
.lunasi-form .ln-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: .8rem; line-height: 1.5; color: #78350f; }
.lunasi-form .ln-head i { color: #d97706; margin-top: 2px; }
.lunasi-form .ln-hint { font-size: .7rem; color: #92400e; margin-top: 4px; }
.lunasi-form .ln-pay { margin-top: 12px; }
.lunasi-form .ln-paybox { margin-top: 6px; animation: ia-in .2s ease; }
.ln-done { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; background: #ecfdf5; color: #065f46; font-size: .76rem; line-height: 1.45; }
.ln-done i { margin-top: 1px; }
.inst-unsettle { color: #b45309; }
.qcard-termrow .qcard-term .cap { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .lunasi-form, .lunasi-form .ln-paybox { animation: none; } .ia-switch .sw::after { transition: none; } }

/* ---------- Pergerakan bulan ini: hanya gulir atas-bawah, hover tanpa geser (dulu
   translateX memicu scrollbar horizontal yang muncul-hilang sehingga berkedip) */
.move-list { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.move-row, .move-row:hover { transform: none; }
.move-row { transition: background .2s, box-shadow .2s; }
.move-row:hover { background: #f8fafc; box-shadow: inset 3px 0 0 var(--lk-primary-600); }
.move-row .flex-fill { min-width: 0; }

/* ---------- Sesudah perubahan tanpa muat ulang (lk.refresh / lk.reload) */
.lk-flash { animation: lkFlash 1.8s ease-out; }
@keyframes lkFlash { 0%, 30% { box-shadow: 0 0 0 3px rgba(13, 148, 136, .35), 0 12px 30px -18px rgba(13, 148, 136, .6); } 100% { box-shadow: none; } }
.acc-tile.lk-flash { animation: flashCard 1.6s ease-out; }
.lk-changed { animation: lkChanged 1.6s ease-out; border-radius: 6px; }
@keyframes lkChanged { 0%, 35% { background: rgba(250, 204, 21, .28); box-shadow: 0 0 0 4px rgba(250, 204, 21, .28); } 100% { background: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .lk-flash, .acc-tile.lk-flash, .lk-changed { animation: none; } }

/* ---------- Simulasi: tabel per rekening, baris tersembunyi tidak ditampilkan */
.simx-acc { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 4px 0 10px; border: 1px solid var(--lk-border); border-radius: 10px; background: #fff; color: var(--lk-muted); transition: border-color .2s, background .2s, box-shadow .2s; }
.simx-acc i { font-size: .85rem; }
.simx-acc select { border: 0; background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 8px center / 10px; font-size: .8rem; font-weight: 600; color: #334155; padding: 6px 26px 6px 2px; appearance: none; cursor: pointer; max-width: 190px; outline: none; }
.simx-acc.on { border-color: var(--lk-primary-600); background: var(--lk-primary-50); color: var(--lk-primary); box-shadow: 0 0 0 3px rgba(13, 148, 136, .1); }
.simx-acc.on select { color: var(--lk-primary); }
.x-chip .x-peek { border: 0; background: transparent; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #475569; padding: 3px 8px; text-decoration: underline; text-underline-offset: 2px; }
.x-chip.hidden-chip.peek { background: #fef3c7; color: #92400e; }
.simx-ledger tr.lg-row.is-leaving { transition: opacity .28s ease; opacity: 0; }
.simx-ledger tr.lg-empty td { text-align: center; padding: 22px 12px; font-size: .82rem; color: var(--lk-muted); }
.simx-ledger .lg-input.semua { border-color: var(--lk-primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
@media (max-width: 575.98px) { .simx-tools-r { width: 100%; } .simx-acc { flex: 1; min-width: 0; } .simx-acc select { max-width: none; flex: 1; } .simx-fresh { margin-left: 0; } }

/* ---------- Rekening terpisah (tidak dihitung ke total utama) */
.badge-sep { background: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; font-weight: 600; }
.acc-sep-hint { display: flex; align-items: center; gap: 10px; width: 100%; margin: 18px 0 0; padding: 10px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #fff; color: #475569; font-size: .8rem; text-align: left; transition: border-color .2s, background .2s; }
.acc-sep-hint:hover { border-color: var(--lk-primary-600); background: var(--lk-primary-50); }
.acc-sep-hint > i { color: #94a3b8; font-size: 1rem; flex-shrink: 0; }
.acc-sep-hint span:first-of-type { flex: 1 1 auto; min-width: 0; }
.acc-sep-hint .go { flex-shrink: 0; font-weight: 700; color: var(--lk-primary); white-space: nowrap; }
.acc-group[data-grp="terpisah"] .acc-tile { border-top-style: dashed; }
.acc-grp-head .sep-note { font-size: .74rem; color: var(--lk-muted); border: 1px dashed #cbd5e1; border-radius: 999px; padding: 1px 8px; }
.acc-sep-switch { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; border: 1px dashed #cbd5e1; border-radius: 12px; background: #fafbfc; cursor: pointer; }
.acc-sep-switch .form-check-input { margin-top: 3px; flex-shrink: 0; }
.acc-sep-switch b { display: block; font-size: .86rem; }
.acc-sep-switch small { display: block; font-size: .74rem; color: var(--lk-muted); line-height: 1.45; }
.acc-sep-switch:has(input:checked) { border-color: var(--lk-primary-600); background: var(--lk-primary-50); }

/* ---------- Lunasi lebih awal: jumlah dibayar lebih dulu, biaya bank tersembunyi */
.lunasi-form .ln-paysec { margin-top: 12px; }
.lunasi-form .ln-money { background: #fff; }
.lunasi-form .ln-money input { font-size: 1rem; padding: 8px 12px 8px 4px; }
.lunasi-form select.form-select { min-height: 42px; border-radius: 12px; }
.lunasi-form .ln-fee-open { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 0; border: 0; background: transparent; font-size: .78rem; font-weight: 600; color: #92400e; }
.lunasi-form .ln-fee-open:hover { text-decoration: underline; }
.lunasi-form .ln-fee { margin-top: 12px; padding: 10px 12px; border: 1px dashed #fcd34d; border-radius: 12px; background: #fff; animation: ia-in .2s ease; }
.lunasi-form .ln-fee .ln-hint { margin-top: 0; font-size: .72rem; line-height: 1.45; }
.lunasi-form .ln-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed #fcd34d; font-size: .8rem; color: #78350f; }
.lunasi-form .ln-total b { font-size: 1rem; color: #451a03; font-variant-numeric: tabular-nums; text-align: right; }
.lunasi-form .ln-total small { font-size: .72rem; font-weight: 500; color: #92400e; }

.inv-sep-row td { background: #f8fafc; font-size: .76rem; color: var(--lk-muted); padding: 8px 12px; border-top: 1px dashed #cbd5e1; }
tr.inv-sep td { opacity: .85; }

/* ---------- Berkas di chat: pratinjau, buka, unduh ulang */
.lf-thumb { flex-shrink: 0; width: 34px; height: 34px; padding: 0; border: 1px solid var(--lk-border); border-radius: 9px; background: #f8fafc; display: inline-grid; place-items: center; overflow: hidden; color: #64748b; font-size: 1rem; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s; }
.lf-thumb:hover:not(:disabled) { border-color: var(--lk-primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .12); }
.lf-thumb:disabled { cursor: default; opacity: .55; }
.lf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lf-thumb.pdf { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.lf-thumb.excel, .lf-thumb.template, .lf-thumb.csv { color: #059669; background: #ecfdf5; border-color: #a7f3d0; }
.lf-thumb.big { width: auto; height: auto; min-width: 96px; min-height: 72px; max-width: min(260px, 100%); border-radius: 12px; background: #f1f5f9; position: relative; }
.lf-thumb.big img { width: auto; height: auto; max-width: 100%; max-height: 220px; object-fit: contain; }
.lf-thumb.big .lf-zoom { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: .78rem; color: #fff; background: rgba(15, 23, 42, .55); opacity: 0; transition: opacity .2s; }
.lf-thumb.big:hover .lf-zoom, .lf-thumb.big:focus-visible .lf-zoom { opacity: 1; }
@media (hover: none) { .lf-thumb.big .lf-zoom { opacity: .9; } }
.lf-big:empty { display: none; }
.lf-big { margin-bottom: 8px; }
.lf-slot:empty, .lf-acts:empty { display: none; }
.lf-acts { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.lf-btn { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #64748b; display: inline-grid; place-items: center; font-size: .86rem; text-decoration: none; transition: background .2s, color .2s; }
.lf-btn:hover { background: #eef2f6; color: var(--lk-primary); }
.lf-gone { color: #cbd5e1; font-size: .9rem; }
.job-card .name { flex: 0 1 auto; }
.job-card .st.compare { background: #eef2ff; color: #4338ca; }
.qc-job .nm { min-width: 0; }
.qc-job .lf-thumb { width: 28px; height: 28px; border-radius: 8px; font-size: .88rem; }
.qc-job .lf-btn { width: 24px; height: 24px; font-size: .78rem; }

.lk-file-modal .modal-content { border: 0; border-radius: 18px; overflow: hidden; }
.lk-file-modal .modal-header { gap: 12px; padding: 12px 16px; align-items: center; }
.lk-file-modal .lf-title { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; font-weight: 700; font-size: .95rem; }
.lk-file-modal .lf-title i { color: var(--lk-primary); font-size: 1.1rem; flex-shrink: 0; }
.lk-file-modal .lf-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lk-file-modal .lf-tools .btn { display: inline-flex; align-items: center; gap: 6px; }
.lk-file-modal .lf-body { padding: 0; background: #0f172a; min-height: 240px; max-height: calc(100vh - 150px); overflow: auto; display: flex; flex-direction: column; }
.lk-file-modal .lf-body.img { align-items: center; justify-content: center; }
.lk-file-modal .lf-img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; display: block; cursor: zoom-in; margin: auto; }
.lk-file-modal .lf-body.zoom { display: block; }
.lk-file-modal .lf-body.zoom .lf-img { max-width: none; max-height: none; cursor: zoom-out; }
.lk-file-modal .lf-load { color: #cbd5e1; font-size: .84rem; padding: 40px 20px; display: flex; align-items: center; gap: 8px; justify-content: center; }
.lk-file-modal .lf-pdf { width: 100%; height: calc(100vh - 190px); min-height: 420px; border: 0; background: #fff; display: block; }
.lk-file-modal .lf-note { padding: 8px 14px; font-size: .76rem; color: #cbd5e1; text-align: center; }
.lk-file-modal .lf-note a { color: #5eead4; }
@media (max-width: 767.98px) {
  .lk-file-modal .modal-content { border-radius: 0; }
  .lk-file-modal .lf-tools .btn span { display: none; }
  .lk-file-modal .lf-body, .lk-file-modal .lf-img { max-height: calc(100vh - 62px); }
  .lk-file-modal .lf-pdf { height: calc(100vh - 110px); }
}

/* ---------- Pertanyaan asisten yang sudah dijawab: tombol pilihannya mati */
.qbox.answered { background: #f8fafc; border-color: var(--lk-border); }
.qbox.answered .q-text { color: #64748b; }
.qbox.answered .q-opt { opacity: .55; pointer-events: none; }
.qbox.answered .q-opt.active { opacity: 1; }
.q-done { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; font-size: .7rem; font-weight: 600; color: #059669; background: #ecfdf5; border-radius: 999px; padding: 1px 8px; white-space: nowrap; vertical-align: middle; }
.qc-q.answered .btn { opacity: .5; pointer-events: none; }
.qc-q.answered .btn.active { opacity: 1; background: var(--lk-primary); color: #fff; border-color: var(--lk-primary); }
.qc-job > .d-flex { flex-wrap: wrap; row-gap: 4px; }
.qc-job .nm { flex: 1 1 96px; }
.job-card > .d-flex { flex-wrap: wrap; row-gap: 6px; }
.job-card .name { flex: 1 1 120px; min-width: 0; }

/* ---------- Pemilih berkas: pilih lagi = bertambah, tiap berkas bisa dibuang */
.file-list:empty { display: none; }
.file-list .fp-chip { padding: 4px 4px 4px 8px; max-width: 100%; min-width: 0; animation: sx-pop .3s ease; }
.file-list .fp-chip .nm { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list .fp-chip small { flex-shrink: 0; font-size: .7rem; }
.file-list .fp-chip > .bi { color: var(--lk-primary); }
.file-list .fp-thumb { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.file-list .fp-x { flex-shrink: 0; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #94a3b8; display: inline-grid; place-items: center; font-size: .62rem; transition: background .2s, color .2s; }
.file-list .fp-x:hover { background: #fee2e2; color: #dc2626; }
.file-list .fp-add { border: 1px dashed #99f6e4; background: var(--lk-primary-50); color: var(--lk-primary); font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.file-list .fp-add:hover:not(:disabled) { background: var(--lk-primary-100); border-color: var(--lk-primary-600); }
.file-list .fp-add:disabled { opacity: .5; cursor: default; }
.chat-scroll.drag, #qcScroll.drag { outline: 2px dashed var(--lk-primary-600); outline-offset: -6px; background: var(--lk-primary-50); }
@media (hover: none) {
  .file-list .fp-chip { padding: 6px 6px 6px 10px; }
  .file-list .fp-x { width: 30px; height: 30px; font-size: .74rem; background: #f1f5f9; color: #475569; }
  .file-list .fp-add { padding: 8px 14px; }
  .file-list .fp-chip .nm { max-width: 130px; }
}

/* ---------- Dompet bersama: tab "Bersama", kartu undangan, undangan di pemberitahuan */
.seg-tabs .tab-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; margin-left: 6px; box-shadow: 0 0 0 3px rgba(245, 158, 11, .22); vertical-align: middle; }
.share-invite-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 12px 16px; border: 1px solid #fde68a; border-radius: 14px; background: #fffbeb; font-size: .86rem; color: #78350f; }
.share-invite-bar .ico { width: 34px; height: 34px; border-radius: 11px; background: #fef3c7; color: #b45309; display: grid; place-items: center; flex-shrink: 0; }
.share-invite-bar .txt { flex: 1 1 220px; min-width: 0; line-height: 1.5; }
.share-invite-bar .txt .tag { margin-left: 4px; }
.share-invite-bar .act { display: flex; gap: 8px; flex-shrink: 0; }
.share-tile.invite { border-top-style: dashed; background: linear-gradient(180deg, #fffdf5, #fff 60%); }
.share-kicker { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #b45309; margin-bottom: 2px; }
.share-role { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #f8fafc; font-size: .8rem; line-height: 1.45; color: #475569; }
.share-role > i { color: #0369a1; margin-top: 2px; }
.share-role b { display: block; color: var(--lk-text); }
.share-steps { margin: 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: #f8fafc; font-size: .78rem; line-height: 1.5; color: #475569; }
.share-steps li + li { margin-top: 6px; }
.share-steps b { color: var(--lk-text); }
#shareMembers .member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f1f4f8; }
#shareMembers .member-row:last-child { border-bottom: 0; }
#shareMembers .member-row .av { width: 34px; height: 34px; border-radius: 50%; background: #e0f2fe; color: #0369a1; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
#shareMembers .member-row .nm { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#shareMembers .member-row .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
#shareMembers .member-row .nm .sub { font-size: .74rem; color: var(--lk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#shareMembers .member-row .nm .sub:empty { display: none; }
#shareMembers .member-row .nm .tag { align-self: flex-start; }
#shareMembers .member-row .form-select { width: auto; min-width: 124px; flex-shrink: 0; padding-right: 2rem; }
@media (max-width: 575.98px) {
  .share-invite-bar .act { width: 100%; }
  .share-invite-bar .act form { flex: 1; }
  .share-invite-bar .act .btn { width: 100%; }
  #shareMembers .member-row { flex-wrap: wrap; }
  #shareMembers .member-row .nm { flex-basis: calc(100% - 50px); }
  #shareMembers .member-row .form-select { flex: 1; margin-left: 44px; }
}
.notif-item.undangan { cursor: default; }
.notif-act { display: flex; gap: 6px; margin-top: 8px; }
.notif-act .btn { padding: .25rem .7rem; font-size: .76rem; border-radius: 9px; }
.notif-done { display: block; margin-top: 6px; font-size: .74rem; font-weight: 600; color: var(--lk-muted); }
.notif-done.ok { color: #047857; }
.notif-done a { color: var(--lk-primary); }

/* ---- Tagihan kartu per bulan (halaman Rekening) + tagihan tiap bulan (pop-up kartu) ---- */
.jk-sum { font-size: .8rem; color: #475569; }
.jk-list { display: flex; flex-direction: column; }
.jk-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 14px 4px; }
.jk-row + .jk-row { border-top: 1px dashed #eef2f6; }
.jk-m { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: .88rem; }
.jk-bar { display: flex; gap: 2px; height: 8px; width: var(--w, 100%); min-width: 18px; }
.jk-bar span { border-radius: 999px; min-width: 5px; }
.jk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.jk-chip { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; border: 1px solid var(--lk-border); border-radius: 12px; padding: 5px 11px; font-size: .75rem; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.jk-chip:hover, .jk-chip:focus-visible { border-color: #cbd5e1; background: #f8fafc; outline: 0; }
.jk-chip i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.jk-chip .nm { font-weight: 600; }
.jk-chip small { color: var(--lk-muted); font-size: .7rem; }
.jk-v { font-weight: 800; font-size: .98rem; white-space: nowrap; text-align: right; }
@media (max-width: 575.98px) {
  .jk-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 2px; }
  .jk-m { flex-direction: row; align-items: center; gap: 8px; grid-column: 1; grid-row: 1; }
  .jk-v { grid-column: 2; grid-row: 1; }
  .jk-mid { grid-column: 1 / -1; grid-row: 2; }
  .jk-sum { margin-left: 0 !important; width: 100%; }
}
.fc-sum { font-size: .78rem; font-weight: 500; color: #475569; }
.fc-list { border: 1px solid var(--lk-border); border-radius: 12px; overflow: hidden; background: #fff; }
.fc-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(50px, 1fr) auto 14px; gap: 12px; align-items: center; padding: 10px 14px; cursor: pointer; font-size: .82rem; transition: background .15s; }
.fc-row ~ .fc-row { border-top: 1px solid #f2f5f9; }
.fc-row:hover { background: #fafbfc; }
.fc-m { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.fc-m small { color: var(--lk-muted); font-size: .7rem; }
.fc-m .tag { vertical-align: 1px; margin-left: 2px; }
.fc-bar { height: 6px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.fc-bar span { display: block; height: 100%; border-radius: 999px; background: var(--lk-primary); }
.fc-row.closed .fc-bar span { background: var(--lk-expense); }
.fc-v { font-weight: 700; white-space: nowrap; }
.fc-ico { font-size: .7rem; color: var(--lk-muted); transition: transform .15s; }
.fc-row.open .fc-ico { transform: rotate(180deg); }
.fc-detail { background: #f8fafc; padding: 8px 14px 10px; border-top: 1px solid #f2f5f9; }
.fc-detail .kr small { color: var(--lk-muted); }
.fc-note { font-size: .7rem; color: var(--lk-muted); margin-top: 6px; }
@media (max-width: 575.98px) { .fc-row { grid-template-columns: minmax(0, 1fr) auto 14px; } .fc-bar { display: none; } }

/* ---- Super admin: rincian harga token & kurs otomatis ---- */
.price-info { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--lk-border); border-radius: 12px; background: #fafbfc; font-size: .76rem; color: #334155; display: flex; flex-direction: column; gap: 6px; }
.price-info .pi-line { line-height: 1.5; }
.price-info .pi-line i { margin-right: 4px; }
.price-info .pi-model { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 6px 0; border-top: 1px dashed #e8edf3; border-bottom: 1px dashed #e8edf3; color: #64748b; }
.price-info .pi-model + .pi-model { border-top: 0; }
.price-info .pi-model .nm { font-weight: 700; color: #0f172a; flex: 1 1 100%; }
.price-info .pi-model .pakai { color: #0f172a; font-weight: 600; }
.price-info .pi-model em { font-style: normal; font-size: .68rem; background: #eef2f6; border-radius: 999px; padding: 0 6px; color: #475569; }
#settingsForm .price-field[readonly] { background: #f8fafc; color: #334155; cursor: default; }

/* ---- Transaksi: "Saldo per rekening" sebagai baris ringkas yang bisa dibuka-tutup ---- */
.sa-card { overflow: hidden; }
.sa-head { display: flex; align-items: center; gap: 10px 16px; padding: 11px 16px; cursor: pointer; user-select: none; transition: background .2s; }
.sa-head:hover { background: #fafbfc; }
.sa-head:focus-visible { outline: 2px solid var(--lk-primary); outline-offset: -2px; }
.sa-ttl { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .86rem; white-space: nowrap; flex-shrink: 0; }
.sa-chev { font-size: .72rem; color: var(--lk-muted); transition: transform .28s cubic-bezier(.4, 0, .2, 1); }
.sa-open .sa-chev { transform: rotate(90deg); }
.sa-chips { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.sa-chips::-webkit-scrollbar { display: none; }
.sa-chip { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border: 1px solid var(--lk-border); background: #fff; border-radius: 999px; padding: 4px 11px; font-size: .74rem; color: #334155; text-decoration: none; white-space: nowrap; transition: border-color .15s, background .15s, box-shadow .15s; }
a.sa-chip:hover { border-color: #cbd5e1; background: #f8fafc; color: #0f172a; }
.sa-chip .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sa-chip .nm { font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.sa-chip b { font-weight: 700; }
.sa-chip em, .sa-total em { font-style: normal; font-size: .68rem; font-weight: 700; }
.sa-chip em.up, .sa-total em.up { color: var(--lk-income); }
.sa-chip em.down, .sa-total em.down { color: var(--lk-expense); }
.sa-chip.on { border-color: var(--lk-primary); background: var(--lk-primary-50); box-shadow: 0 0 0 3px rgba(15, 118, 110, .08); }
.sa-chip .x { font-size: .62rem; color: var(--lk-muted); }
.sa-chip.more { border-style: dashed; color: var(--lk-muted); }
.sa-none { font-size: .76rem; color: var(--lk-muted); white-space: nowrap; }
.sa-total { display: inline-flex; align-items: baseline; gap: 8px; flex-shrink: 0; white-space: nowrap; font-size: .86rem; }
.sa-total small { font-size: .7rem; color: var(--lk-muted); font-weight: 600; }
.sa-total b { font-weight: 800; }
.sa-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s cubic-bezier(.4, 0, .2, 1); }
.sa-open .sa-body { grid-template-rows: 1fr; }
.sa-seketika .sa-body, .sa-seketika .sa-chev { transition: none; }
.sa-inner { overflow: hidden; min-height: 0; }
.sa-open .sa-inner { border-top: 1px solid var(--lk-border); }
.sa-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 16px; font-size: .76rem; color: var(--lk-muted); }
.sa-sub .btn-link { font-size: .76rem; }
.saldo-akun tr.sa-idle { display: none; }
.saldo-akun.sa-all tr.sa-idle { display: table-row; }
@media (max-width: 767.98px) {
  .sa-head { flex-wrap: wrap; padding: 10px 14px; }
  .sa-ttl { order: 1; }
  .sa-total { order: 2; margin-left: auto; }
  .sa-total small { display: none; }
  .sa-chips { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .sa-body, .sa-chev { transition: none; } }
/* Halaman transaksi sedikit lebih lega di antara bagian-bagiannya */
.trx-filter, .kpi-row { margin-bottom: 1.15rem !important; }
#saldoAkunCard { margin-bottom: 1.4rem !important; }

/* ---- Panel transaksi: petunjuk "ini pembayaran kartu / paylater / pinjaman?" ---- */
.qpay-hint { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: .76rem; line-height: 1.5; }
.qpay-hint .t { display: flex; gap: 8px; align-items: flex-start; }
.qpay-hint .t i { margin-top: 2px; }
.qpay-hint .qs-chips { margin-top: 8px; }
.qpay-hint .qs-chips button { border-color: #bfdbfe; color: #1e3a8a; display: inline-flex; align-items: center; gap: 6px; }
.qpay-hint .qs-chips button:hover { background: #dbeafe; }
.qpay-hint .qs-chips button .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Di ponsel, lima kartu ringkasan Transaksi jadi satu baris yang digeser, supaya tabelnya cepat terlihat */
@media (max-width: 767.98px) {
  .trx-kpi { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .trx-kpi::-webkit-scrollbar { display: none; }
  .trx-kpi > [class*="col-"] { flex: 0 0 58%; max-width: 58%; scroll-snap-align: start; }
}

/* ---- Pasang sebagai aplikasi (PWA): lembar panduan, kartu di Pengaturan, ajakan di ponsel ---- */
.pasang-modal .modal-content { border: 0; border-radius: 20px; overflow: hidden; }
.pasang-modal .modal-body { padding: 26px 24px 22px; position: relative; }
.pasang-tutup { position: absolute; top: 16px; right: 16px; z-index: 2; }
.pasang-hero { display: flex; gap: 16px; align-items: center; padding-right: 28px; }
.pasang-hero img { border-radius: 16px; box-shadow: 0 12px 26px -10px rgba(15, 118, 110, .6); flex-shrink: 0; }
.pasang-hero h5 { font-weight: 800; margin: 0 0 4px; font-size: 1.08rem; }
.pasang-hero p { margin: 0; font-size: .82rem; color: var(--lk-muted); line-height: 1.5; }
.pasang-keadaan { margin-top: 18px; display: flex; gap: 10px; align-items: flex-start; font-size: .8rem; line-height: 1.5; border-radius: 12px; padding: 11px 13px; background: #f8fafc; color: #334155; }
.pasang-keadaan.siap { padding: 0; background: transparent; }
.pasang-keadaan.siap .btn { padding: 11px 16px; font-weight: 700; border-radius: 12px; }
.pasang-keadaan.terpasang { background: #ecfdf5; color: #065f46; }
.pasang-keadaan > i { margin-top: 2px; color: var(--lk-primary); }
.pasang-manfaat { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pasang-manfaat span { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 4px 10px; }
.pasang-manfaat i { color: var(--lk-primary); }
.pasang-tab { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #eef2f6; border-radius: 12px; padding: 4px; margin-top: 18px; }
.pasang-tab button { border: 0; background: transparent; border-radius: 9px; padding: 8px 4px; font-size: .78rem; font-weight: 700; color: #64748b; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.pasang-tab button.active { background: #fff; color: var(--lk-primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.pasang-langkah { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: langkah; display: flex; flex-direction: column; gap: 10px; }
.pasang-langkah li { counter-increment: langkah; position: relative; padding-left: 36px; font-size: .84rem; line-height: 1.5; color: #334155; min-height: 24px; }
.pasang-langkah li::before { content: counter(langkah); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--lk-primary-50); color: var(--lk-primary); font-weight: 800; font-size: .74rem; display: grid; place-items: center; }
.pasang-apk { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--lk-border); border-radius: 14px; text-decoration: none; color: #0f172a; transition: border-color .15s, background .15s; }
.pasang-apk:hover { border-color: var(--lk-primary); background: var(--lk-primary-50); color: #0f172a; }
.pasang-apk > i:first-child { font-size: 1.5rem; color: #16a34a; }
.pasang-apk > i:last-child { color: var(--lk-primary); }
.pasang-apk span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: .86rem; }
.pasang-apk small { color: var(--lk-muted); font-size: .72rem; line-height: 1.4; }
.pasang-catatan { margin: 16px 0 0; font-size: .72rem; color: var(--lk-muted); line-height: 1.5; }
.pasang-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pasang-row img { border-radius: 14px; flex-shrink: 0; }
.auth-pasang { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--lk-border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pasang-bar { position: fixed; left: 12px; right: 12px; bottom: 92px; z-index: 1034; max-width: 440px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; background: #fff; border: 1px solid var(--lk-border); border-radius: 16px; box-shadow: 0 18px 40px -14px rgba(15, 23, 42, .35); opacity: 0; transform: translateY(16px); transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.pasang-bar.show { opacity: 1; transform: none; }
.pasang-bar img { border-radius: 11px; flex-shrink: 0; }
.pasang-bar .t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; font-size: .84rem; }
.pasang-bar .t small { color: var(--lk-muted); font-size: .72rem; }
.pasang-x { border: 0; background: transparent; color: var(--lk-muted); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.pasang-x:hover { background: #f1f5f9; color: #334155; }
@media (prefers-reduced-motion: reduce) { .pasang-bar { transition: none; } }

/* Tabel transaksi: sisa kredit kartu / paylater di bawah saldo barisnya */
.saldo-kredit { font-size: .7rem; font-weight: 600; color: var(--lk-muted); white-space: nowrap; line-height: 1.3; margin-top: 1px; font-variant-numeric: tabular-nums; }
.saldo-kredit.over { color: var(--lk-expense); }

/* Halaman masuk: pilihan Keuangan Pribadi (aplikasi ini) atau Keuangan Perusahaan (Manava) */
.lk-ruang { display: grid; gap: 10px; margin-bottom: 20px; }
.lk-ruang-pil { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--lk-border); border-radius: 16px; background: var(--lk-card); color: var(--lk-text); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.lk-ruang-pil:hover, a.lk-ruang-pil:focus-visible { border-color: var(--lk-primary); color: var(--lk-text); box-shadow: 0 6px 18px -10px rgba(15, 118, 110, .45); }
a.lk-ruang-pil:active { transform: scale(.98); }
.lk-ruang-pil.is-aktif { border-color: var(--lk-primary); background: var(--lk-primary-50); }
.lk-ruang-ikon { width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; background: #f1f5f9; color: #334155; }
.lk-ruang-pil.is-aktif .lk-ruang-ikon { background: var(--lk-primary); color: #fff; }
.lk-ruang-teks { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lk-ruang-teks strong { font-size: .95rem; font-weight: 800; }
.lk-ruang-teks small { font-size: .78rem; color: var(--lk-muted); }
.lk-ruang-tanda { color: var(--lk-muted); }
.lk-ruang-pil.is-aktif .lk-ruang-tanda { color: var(--lk-primary); font-size: 1.15rem; }
.lk-ruang-judul { font-weight: 700; font-size: .85rem; color: var(--lk-muted); margin: 0 2px 10px; }

/* ---------- Super admin: sistem tab (views/admin/index.php) ----------
   Satu bagian tampil per tab, daftar pengguna & log berupa baris lega (bukan
   tabel padat), panel masuk dengan transisi halus. */
.adm { --adm-garis: #e8ecf1; }
.adm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; margin: 4px 0 18px; }
.adm-ttl { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; margin: 0; display: flex; align-items: center; gap: 10px; }
.adm-ttl i { color: var(--lk-primary); }
.adm-sub { margin: 4px 0 0; font-size: .85rem; color: var(--lk-muted); }
.adm-head-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-left: auto; }
.adm-head-stats > div { display: flex; flex-direction: column; gap: 3px; }
.adm-head-stats span { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--lk-muted); font-weight: 700; }
.adm-head-stats b { font-size: 1rem; font-weight: 800; white-space: nowrap; }
.adm-head-stats small { font-size: .72rem; color: var(--lk-muted); font-weight: 600; }

.adm-alert { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid #fecdd3; background: #fff1f2; color: #9f1239; border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-size: .86rem; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.adm-alert:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(190, 18, 60, .5); }
.adm-alert > i:first-child { font-size: 1.25rem; }

/* tab */
.adm-tabs { position: sticky; top: var(--lk-topbar-h); z-index: 15; display: flex; gap: 4px; padding: 5px; margin-bottom: 20px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--adm-garis); border-radius: 14px; box-shadow: var(--lk-shadow); overflow-x: auto; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab { position: relative; z-index: 1; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 9px 16px; border-radius: 10px; font-size: .86rem; font-weight: 600; color: #64748b; white-space: nowrap; transition: color .2s ease; }
.adm-tab:hover { color: #0f172a; }
.adm-tab.is-on { color: #fff; }
.adm-tab:focus-visible { outline: 2px solid var(--lk-primary); outline-offset: 2px; }
.adm-tab em { font-style: normal; font-size: .68rem; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(100, 116, 139, .14); color: inherit; text-align: center; }
.adm-tab em.is-bad { background: #fee2e2; color: #be123c; }
.adm-tab.is-on em { background: rgba(255, 255, 255, .22); color: #fff; }
.adm-tab-garis { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 10px; background: var(--lk-primary); box-shadow: 0 6px 16px -8px rgba(15, 118, 110, .7); transition: transform .32s cubic-bezier(.22, .61, .36, 1), width .32s cubic-bezier(.22, .61, .36, 1); }

.adm-panel.is-masuk { animation: adm-masuk .32s cubic-bezier(.22, .61, .36, 1); }
@keyframes adm-masuk { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* kartu & KPI */
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 20px; }
.adm-kpi { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--adm-garis); border-radius: 16px; box-shadow: var(--lk-shadow); padding: 18px 20px; }
.adm-kpi .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.adm-kpi .lbl { font-size: .78rem; color: var(--lk-muted); font-weight: 600; }
.adm-kpi .val { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.adm-kpi .val small { font-size: .74rem; font-weight: 600; color: var(--lk-muted); }
.adm-kpi .sub { font-size: .76rem; color: var(--lk-muted); margin-top: 4px; line-height: 1.45; }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
@media (min-width: 992px) { .adm-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .adm-grid.adm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.adm-card { background: #fff; border: 1px solid var(--adm-garis); border-radius: 16px; box-shadow: var(--lk-shadow); min-width: 0; }
.adm-card-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding: 16px 22px; border-bottom: 1px solid var(--adm-garis); }
.adm-card-head b { font-size: .95rem; }
.adm-card-head span { font-size: .76rem; color: var(--lk-muted); }
.adm-card-body { padding: 20px 22px; }
.adm-bar { display: block; height: 6px; border-radius: 999px; background: #eef2f6; overflow: hidden; margin-top: 7px; }
.adm-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--lk-primary); transition: width .5s ease; }
.adm-bar > span.is-warn { background: #f59e0b; }
.adm-bar > span.is-bad { background: #e11d48; }

/* alat (cari, saring, urut) */
.adm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 10px; }
.adm-toolbar .form-select { width: auto; min-width: 150px; border-radius: 10px; }
.adm-urut { margin-left: auto; }
.adm-cari { position: relative; flex: 1 1 240px; max-width: 320px; }
.adm-cari i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .85rem; }
.adm-cari input { width: 100%; border: 1px solid var(--adm-garis); background: #fff; border-radius: 10px; padding: 8px 12px 8px 36px; font-size: .86rem; transition: border-color .15s, box-shadow .15s; }
.adm-cari input:focus { outline: 0; border-color: var(--lk-primary); box-shadow: 0 0 0 3px rgba(15, 118, 110, .12); }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chips button { border: 1px solid var(--adm-garis); background: #fff; color: #475569; border-radius: 999px; padding: 6px 13px; font-size: .78rem; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.adm-chips button:hover { border-color: #cbd5e1; color: #0f172a; }
.adm-chips button.is-on { background: #0f172a; border-color: #0f172a; color: #fff; }
.adm-note { font-size: .78rem; color: var(--lk-muted); margin: 0 2px 14px; }

/* daftar baris */
.adm-list { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s ease; }
.adm-list.is-memuat { opacity: .55; }
.adm-row { background: #fff; border: 1px solid var(--adm-garis); border-radius: 14px; padding: 14px 18px; transition: border-color .15s ease, box-shadow .15s ease; }
.adm-row:hover { border-color: #d5dde6; box-shadow: 0 10px 26px -18px rgba(15, 23, 42, .35); }
.adm-user { display: grid; grid-template-columns: minmax(220px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1.1fr) minmax(130px, .9fr) auto; align-items: center; gap: 14px 22px; }
.adm-user.is-blocked { background: #fffafa; border-color: #fde2e2; }
.adm-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--lk-primary-100); color: var(--lk-primary); font-weight: 800; font-size: .8rem; }
.adm-who .nm { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.adm-who .em { font-size: .76rem; color: var(--lk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-met { display: flex; flex-direction: column; min-width: 0; }
.adm-met .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--lk-muted); font-weight: 700; }
.adm-met .v { font-weight: 700; font-size: .92rem; margin-top: 2px; white-space: nowrap; }
.adm-met .v small { color: var(--lk-muted); font-weight: 600; }
.adm-met .v sup { color: var(--lk-primary); }
.adm-met .ket { font-size: .72rem; color: var(--lk-muted); margin-top: 4px; }
.adm-ujung { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
@media (max-width: 1199.98px) {
  .adm-user { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-who { grid-column: 1 / -1; }
  .adm-ujung { grid-column: 1 / -1; justify-content: space-between; }
}
@media (max-width: 575.98px) {
  .adm-user { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .adm-met-r { grid-column: 1 / -1; }
  .adm-urut { margin-left: 0; }
}

/* log */
.adm-log { gap: 6px; }
.adm-logrow { display: grid; grid-template-columns: 22px minmax(150px, 1.3fr) auto minmax(120px, 1fr) 96px 64px; align-items: center; gap: 8px 16px; padding: 11px 16px; font-size: .84rem; }
.adm-logrow .adm-st { color: #10b981; font-size: 1rem; }
.adm-logrow.is-gagal { cursor: pointer; border-color: #fde2e2; }
.adm-logrow.is-gagal .adm-st { color: #e11d48; }
.adm-lw { display: flex; flex-direction: column; min-width: 0; }
.adm-lw .w { font-size: .74rem; color: var(--lk-muted); }
.adm-lw .u { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-model { font-size: .76rem; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-tok, .adm-dur { text-align: right; font-size: .8rem; }
.adm-err { grid-column: 2 / -1; font-size: .78rem; color: #9f1239; background: #fff1f2; border-radius: 8px; padding: 0 10px; max-height: 1.6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: max-height .25s ease, padding .25s ease; }
.adm-logrow.is-buka .adm-err { max-height: 12em; white-space: normal; padding: 8px 10px; }
.adm-logrow.is-gagal:focus-visible { outline: 2px solid #e11d48; outline-offset: 2px; }
@media (max-width: 767.98px) {
  .adm-logrow { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .adm-logrow .adm-model, .adm-logrow .adm-dur { display: none; }
  .adm-logrow .tag { justify-self: end; }
  .adm-logrow .adm-tok { grid-column: 2 / -1; text-align: left; }
}
.adm-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: .78rem; color: var(--lk-muted); }
.adm-pager > div { display: flex; gap: 6px; }

/* batas & server */
.adm-aksi { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 24px; }
.adm-php { display: flex; align-items: center; gap: 16px; border-radius: 16px; padding: 18px 22px; margin-bottom: 20px; border: 1px solid; }
.adm-php.is-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.adm-php.is-bad { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.adm-php .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255, 255, 255, .7); flex-shrink: 0; }
.adm-php .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; opacity: .8; }
.adm-php .val { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.adm-php .val small { font-size: .78rem; font-weight: 600; opacity: .75; }
.adm-php .sub { font-size: .84rem; margin-top: 2px; }
.adm-kv { display: flex; flex-direction: column; }
.adm-kv > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--adm-garis); font-size: .86rem; }
.adm-kv > div:last-child { border-bottom: 0; }
.adm-kv > div > span { color: #475569; }
.adm-kv > div > b { text-align: right; font-weight: 700; }
.adm-kv > div.is-ini { background: #f0fdfa; margin: 0 -10px; padding: 10px; border-radius: 10px; border-bottom-color: transparent; }
.adm-kv em { font-style: normal; font-size: .68rem; font-weight: 700; background: var(--lk-primary); color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
@media (prefers-reduced-motion: reduce) {
  .adm-panel.is-masuk { animation: none; }
  .adm-tab-garis, .adm-bar > span, .adm-err { transition: none; }
}

/* ---------- Super admin: model AI per pengguna & per model ---------- */
.adm-user { grid-template-columns: minmax(210px, 1.5fr) minmax(110px, .8fr) minmax(140px, 1fr) minmax(150px, 1.1fr) minmax(110px, .8fr) auto; }
.adm-model-v { overflow: hidden; text-overflow: ellipsis; font-size: .84rem; }
.adm-model-pakai { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.adm-model-pakai span { font-size: .68rem; font-weight: 600; background: #f1f5f9; color: #475569; border-radius: 999px; padding: 1px 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.adm-model-daftar { display: grid; gap: 10px; }
.adm-model-baris { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(80px, 2fr) 110px 110px; align-items: center; gap: 14px; font-size: .84rem; }
.adm-model-baris .adm-bar { margin-top: 0; }
.adm-model-baris .t, .adm-model-baris .c { text-align: right; }
.adm-model-baris .c { font-weight: 700; }
.adm-tab em.is-ok { background: #dcfce7; color: #15803d; }
.adm-tab.is-on em.is-ok { background: rgba(255, 255, 255, .22); color: #fff; }
@media (max-width: 1199.98px) {
  .adm-user { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .adm-user { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-model-baris { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-model-baris .adm-bar { grid-column: 1 / -1; order: 3; }
}

/* ---------- Pengaturan (views/pengaturan/index.php): tab seperti super admin ---------- */
.set .adm-card-body .form-label { font-weight: 600; font-size: .82rem; color: #334155; }
.set-model-kini { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px; border-radius: 14px; background: linear-gradient(120deg, #ecfeff 0%, #f0fdfa 60%, #f5f3ff 100%); border: 1px solid #e0f2f1; }
.set-model-kini .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; background: #fff; color: var(--lk-primary); flex-shrink: 0; box-shadow: 0 6px 16px -10px rgba(15, 118, 110, .6); }
.set-model-kini .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--lk-muted); }
.set-model-kini .val { font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; }
.set-model-kini .sub { font-size: .76rem; color: var(--lk-muted); margin-top: 2px; }
.set-model-daftar { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.set-model-baris { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; transition: background .15s ease; }
.set-model-baris:hover { background: #f8fafc; }
.set-model-baris.is-saya { background: #f0fdfa; }
.set-model-baris > .min-w-0 { flex: 1; }
.set-model-baris .nm { font-size: .84rem; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.set-model-baris .ket { font-size: .74rem; color: var(--lk-muted); margin-top: 2px; }
.set-model-baris .st { font-size: 1rem; }
.set-model-baris .st.ok { color: #10b981; }
.set-model-baris .st.bad { color: #e11d48; }
.set-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.set-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--adm-garis); }
.set-stats b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.set-stats span { font-size: .76rem; color: var(--lk-muted); font-weight: 600; }
.set .mnv-card { margin-bottom: 20px; }

/* Tom Select di Pengaturan: tinggi & sudut sama dengan isian lain, daftar model dengan keterangan */
.set .ts-wrapper.form-select { min-height: 42px; border-radius: 10px; }
.set .ts-wrapper .ts-control { min-height: 40px; padding: .55rem 2.1rem .55rem .8rem; font-size: .9rem; }
.set .ts-wrapper.single.input-active .ts-control { cursor: text; }
.ts-dropdown .ts-model { display: flex; flex-direction: column; gap: 1px; }
.ts-dropdown .ts-model small { font-size: .72rem; color: var(--lk-muted); }
.ts-dropdown .option { padding: 8px 12px; }
.ts-dropdown .option.selected { font-weight: 700; color: var(--lk-primary); }

/* Token AI dari Manava (Pengaturan > Asisten AI) */
.set-token-atas { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.set-token-total { display: flex; flex-direction: column; min-width: 0; }
.set-token-total .lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--lk-muted); }
.set-token-total b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.set-token-total .sub { font-size: .78rem; color: var(--lk-muted); }
.set-token.is-habis .set-token-total b { color: #e11d48; }
.set-token-beli { display: flex; gap: 8px; flex-wrap: wrap; }
.set-token-dompet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.set-token-dompet .dompet { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--lk-border); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.set-token-dompet .dompet.is-dulu { background: #f0fdfa; border-color: #99f6e4; box-shadow: 0 8px 20px -16px rgba(15, 118, 110, .7); }
.set-token-dompet .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--lk-primary); flex-shrink: 0; }
.set-token-dompet .nm { display: block; font-size: .76rem; font-weight: 600; color: var(--lk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-token-dompet b { display: block; font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.set-token-dompet small { display: block; font-size: .72rem; color: var(--lk-muted); }
.set-token-urut { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.set-token .tk-muat { display: inline-block; width: 120px; height: 1.6rem; border-radius: 8px; background: linear-gradient(90deg, #eef2f6 25%, #f8fafc 50%, #eef2f6 75%); background-size: 200% 100%; animation: tk-kilau 1.2s linear infinite; vertical-align: middle; }
@keyframes tk-kilau { to { background-position: -200% 0; } }
.set-token #tkSegar .spin { display: inline-block; animation: tk-putar .8s linear infinite; }
@keyframes tk-putar { to { transform: rotate(360deg); } }
.set-token-ajak { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px dashed #99f6e4; background: #fff; color: inherit; text-decoration: none; transition: background .15s ease; }
.set-token-ajak:hover { background: #f0fdfa; color: inherit; }
.set-token-ajak > i:first-child { font-size: 1.2rem; color: var(--lk-primary); }
.set-token-ajak b { display: block; font-size: .88rem; }
.set-token-ajak small { display: block; font-size: .76rem; color: var(--lk-muted); }
/* Pribadi vs Perusahaan: dua dompet, dua tempat */
.set-token-pisah { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.set-token-pisah .dompet { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--lk-border); color: inherit; text-decoration: none; transition: border-color .2s ease, background .2s ease; }
.set-token-pisah a.dompet:hover { border-color: #99f6e4; background: #f0fdfa; color: inherit; }
.set-token-pisah .dompet.is-dulu { background: #f0fdfa; border-color: #99f6e4; }
.set-token-pisah .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--lk-primary); flex-shrink: 0; }
.set-token-pisah .nm { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--lk-muted); }
.set-token-pisah b { display: block; font-size: .98rem; font-weight: 800; }
.set-token-pisah small { display: block; font-size: .72rem; color: var(--lk-muted); }
.set-token-habis { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: .8rem; }
@media (max-width: 575.98px) {
  .set-token-pisah { grid-template-columns: 1fr; }
  .set-token-dompet { grid-template-columns: 1fr; }
  .set-token-beli, .set-token-beli .btn { width: 100%; }
}
/* Modal atur pengguna: akun Token Manava (batas Money tidak berlaku) */
.um-manava { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(15, 118, 110, .07); border: 1px solid rgba(15, 118, 110, .18); font-size: .8rem; line-height: 1.5; }
.um-manava > i { color: var(--lk-primary, #0f766e); font-size: 1rem; margin-top: 1px; }
.um-manava span { display: block; color: var(--lk-muted); }
.um-manava span b { color: inherit; color: var(--lk-text, #0f172a); }
