/* Kas Saya (Portal Utama): compact three-column PC layout and mobile sheets.
   One scoped stylesheet, no  declarations. */
#keuangan.f4-finance-personal-active .f4-user-finance {
  background:transparent;border:0;box-shadow:none;padding:0;margin:0 0 12px;min-width:0;
}
#keuangan .f4-user-finance-heading {
  display:flex;flex-direction:row;align-items:center;gap:9px;
  margin:0 0 13px;padding:0;min-width:0;
}
#keuangan .f4-user-finance-heading svg {
  width:24px;height:24px;flex:none;color:var(--f4-portal-primary,#4f46e5);
}
#keuangan .f4-user-finance-heading h3 {
  margin:0;color:#111d38;font-size:23px;line-height:1.25;
  font-weight:850;letter-spacing:-.025em;
}
#keuangan.f4-finance-personal-active .f4-user-finance-controls {
  margin-bottom:14px;padding:4px;background:#fff;border-color:#dfe4f0;
}
/* Kas Warga: tab and cards use the same frameless outer structure as Kas Saya. */
#keuangan:not(.f4-finance-personal-active) .f4-user-finance {
  background:transparent;border:0;box-shadow:none;padding:0;margin:0 0 12px;min-width:0;
}

#keuangan:not(.f4-finance-personal-active) .f4-user-finance-controls {
  margin:0;padding:4px;background:#fff;border:1px solid #dfe4f0;border-radius:13px;
}
#keuangan:not(.f4-finance-personal-active) .f4-cash-toolbar {
  display:flex;align-items:center;justify-content:flex-end;
  gap:8px;min-width:0;margin:0 0 10px;
}
#keuangan:not(.f4-finance-personal-active) .f4-cash-toolbar .f4-controls {
  margin-left:auto;gap:8px;
}
#keuangan .f4-cash-mobile-actions{display:none;align-items:center;gap:5px;flex:none}
#keuangan .f4-cash-mobile-actions button{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:34px;flex:none;padding:0 7px;border:1px solid #ffffff55;border-radius:9px;background:#ffffff20;color:#fff;font:600 11px/1.2 system-ui,sans-serif;white-space:nowrap;cursor:pointer}
#keuangan .f4-cash-mobile-actions button:hover{background:#ffffff35}
#keuangan .f4-cash-mobile-actions svg{width:15px;height:15px;display:block;flex:none}
#keuangan .f4-cash-balance-tools{display:flex;align-items:center;gap:5px;flex:none}
#keuangan .f4-cash-balance-tools .f4-cash-active{white-space:nowrap}
@media(max-width:360px){#keuangan .f4-cash-mobile-actions button{padding-inline:5px;gap:3px}}
body:not([data-preview-role]) #keuangan .f4-cash-mobile-actions,body[data-preview-role="public"] #keuangan .f4-cash-mobile-actions{display:none}
#keuangan .f4-cash-section-title {margin:0 0 10px;color:#28364d;font-size:clamp(17px,2vw,22px);font-weight:800;line-height:1.3}
#keuangan .f4-cash-overview {
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.95fr);
  align-items:stretch;gap:14px;min-width:0;height:476px;
}
#keuangan .f4-cash-summary {
  display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0;height:100%;
}
#keuangan .f4-cash-pair {display:contents}
#keuangan .f4-cash-summary>div:first-child,
#keuangan .f4-cash-pair>div {
  display:flex;flex-direction:column;justify-content:space-between;
  min-width:0;min-height:0;flex:1 1 0;padding:15px 17px;border-radius:var(--f4-portal-card-radius,12px);transform:none;
  box-shadow:0 5px 16px rgba(34,39,91,.035);
}
#keuangan .f4-cash-summary>div:first-child {
  justify-content:center;gap:7px;background:linear-gradient(125deg,#4338ca 0%,#6550dd 55%,#794ce5 100%);border-color:#5145cd;
}
#keuangan .f4-cash-summary .mt-4 {margin-top:8px}
#keuangan:not(.f4-finance-personal-active) .f4-cash-overview #f4-private-transactions,
body[data-preview-role]:not([data-preview-role="public"]) #keuangan:not(.f4-finance-personal-active) .f4-cash-overview #f4-private-transactions {
  min-width:0;min-height:0;height:100%;max-height:100%;
  display:flex;flex-direction:column;
  overflow:hidden;border-radius:var(--f4-portal-card-radius,12px);box-shadow:0 5px 16px rgba(34,39,91,.035);
}
#keuangan .f4-cash-overview #f4-private-transactions>div.overflow-x-auto {
  min-width:0;min-height:0;flex:1;overflow-x:auto;overflow-y:auto;scrollbar-width:thin;
}
#keuangan .f4-cash-overview #f4-private-transactions table {
  min-width:600px;table-layout:fixed;font-size:12px;
}
#keuangan .f4-cash-overview #f4-private-transactions :is(th,td):nth-child(1) {width:42px}
#keuangan .f4-cash-overview #f4-private-transactions :is(th,td):nth-child(2) {width:19%}
#keuangan .f4-cash-overview #f4-private-transactions :is(th,td):nth-child(3) {width:36%}
#keuangan .f4-cash-overview #f4-private-transactions :is(th,td):nth-child(4) {width:18%}
#keuangan .f4-cash-overview #f4-private-transactions :is(th,td):nth-child(5) {width:21%}
#keuangan .f4-cash-overview .f4-cash-number-cell {
  color:#79839a;font-size:11px;font-weight:700;text-align:center;
  font-variant-numeric:tabular-nums;
}
#keuangan .f4-cash-overview .f4-cash-no-results {
  padding:20px 12px;text-align:center;color:#7f8899;font-size:12px;
}
#keuangan .f4-cash-overview .f4-cash-table-toolbar {
  display:flex;align-items:center;justify-content:space-between;
  flex-wrap:wrap;gap:9px;padding:10px 13px;
  border-bottom:1px solid #e7eaf2;background:#fff;
}
#keuangan .f4-cash-table-heading {display:flex;flex-direction:column;gap:3px;min-width:0}
#keuangan .f4-cash-table-heading h3 {margin:0;color:#28364d;font-size:14px;font-weight:800;line-height:1.3}
#keuangan .f4-cash-overview .f4-cash-last-update {
  color:#64708a;font-size:11px;line-height:1.25;font-weight:600;
  white-space:nowrap;
}
#keuangan .f4-cash-overview .f4-cash-table-actions {
  display:flex;align-items:center;justify-content:flex-end;gap:7px;
  margin-left:auto;min-width:0;
}
#keuangan .f4-cash-overview .f4-cash-date-control {
  display:flex;align-items:center;gap:6px;min-width:0;
  min-height:35px;padding:5px 8px;border:1px solid #dbdef0;
  border-radius:9px;background:#f9f9ff;color:var(--f4-portal-primary,#4f46e5);
  cursor:pointer;
}
#keuangan .f4-cash-overview .f4-cash-date-control:focus-within {
  border-color:var(--f4-portal-primary,#4f46e5);box-shadow:0 0 0 2px var(--f4-portal-soft-hover,#e0e7ff);
}
#keuangan .f4-cash-overview .f4-cash-date-trigger {
  display:flex;align-items:center;gap:7px;min-height:25px;
  width:100%;padding:0;background:transparent;border:0;cursor:pointer;
  color:var(--f4-portal-primary-ink,#3730a3);font-size:12px;font-weight:750;
}
#keuangan .f4-cash-overview .f4-cash-date-trigger>span {
  min-width:0;flex:1;text-align:left;white-space:nowrap;
}
#keuangan .f4-cash-overview .f4-cash-date-trigger svg {
  flex:none;width:16px;height:16px;
}
#keuangan .f4-cash-overview .f4-cash-date-trigger svg:last-child {
  width:14px;height:14px;
}
#keuangan .f4-cash-overview .f4-cash-date-trigger.has-date>span {
  color:#2d3259;
}
/* Isolated calendar for Kas Warga — independent of native Firefox/Chrome pickers. */
.f4-cash-calendar {
  position:fixed;z-index:30001;width:326px;max-width:calc(100vw - 20px);
  box-sizing:border-box;padding:14px;
  border:1px solid #dcd7f2;border-radius:16px;
  background:#fff;color:#2b3652;box-shadow:0 16px 48px rgba(41,35,92,.19);
  font:13px/1.4 system-ui,-apple-system,Segoe UI,sans-serif;
}
.f4-cash-calendar * {box-sizing:border-box}
.f4-cash-calendar button {border:0;background:transparent;color:inherit;cursor:pointer}
.f4-cash-calendar select {font:inherit}
.f4-cash-calendar :focus-visible {outline:2px solid var(--f4-portal-primary,#4f46e5);outline-offset:2px}
.f4-cash-calendar-grip {display:none}
.f4-cash-calendar-header {
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;margin-bottom:12px;
}
.f4-cash-calendar-header strong {font-size:14px;font-weight:850;color:#313454}
.f4-cash-calendar-header button {
  display:grid;place-items:center;width:30px;height:30px;
  border-radius:9px;color:#69748b;
}
.f4-cash-calendar-header button:hover {background:var(--f4-portal-soft,#eef2ff);color:var(--f4-portal-primary,#4f46e5)}
.f4-cash-calendar-nav {
  display:grid;grid-template-columns:32px minmax(0,1fr) 32px;
  align-items:center;gap:7px;margin-bottom:10px;
}
.f4-cash-calendar-nav>button {
  display:grid;place-items:center;width:32px;height:33px;
  background:var(--f4-portal-soft,#eef2ff);color:var(--f4-portal-primary-ink,#3730a3);border-radius:9px;
}
.f4-cash-calendar-nav>button:hover {background:var(--f4-portal-soft-hover,#e0e7ff)}
.f4-cash-calendar-selects {display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:7px}
.f4-cash-calendar-selects select {
  min-width:0;height:33px;padding:5px 6px;border:1px solid #e1def1;
  border-radius:8px;background:#fff;color:#493f91;font-size:12px;font-weight:750;
}
.f4-cash-calendar-weekdays,.f4-cash-calendar-days {
  display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;
}
.f4-cash-calendar-weekdays {margin-bottom:4px}
.f4-cash-calendar-weekdays span {
  display:grid;place-items:center;min-height:27px;
  color:#7c849b;font-size:11px;font-weight:750;
}
.f4-cash-calendar-weekdays span:first-child {color:#d05e79}
.f4-cash-calendar-day {
  display:grid;place-items:center;min-width:0;min-height:35px;
  padding:0;border-radius:9px;font-size:12px;font-weight:650;
  font-variant-numeric:tabular-nums;
}
.f4-cash-calendar .f4-cash-calendar-day:hover {background:var(--f4-portal-soft-hover,#e0e7ff);color:var(--f4-portal-primary,#4f46e5)}
.f4-cash-calendar .f4-cash-calendar-day.is-outside {color:#b0b6c5}
.f4-cash-calendar .f4-cash-calendar-day.is-today {box-shadow:inset 0 0 0 1px var(--f4-portal-primary,#4f46e5)}
.f4-cash-calendar .f4-cash-calendar-day.is-selected {
  background:var(--f4-portal-primary,#4f46e5);color:#fff;box-shadow:none;font-weight:800;
}
.f4-cash-calendar-footer {
  display:flex;justify-content:space-between;gap:8px;
  margin-top:12px;padding-top:11px;border-top:1px solid #ebeaf3;
}
.f4-cash-calendar-footer button {
  min-height:33px;padding:7px 11px;border-radius:9px;
  background:var(--f4-portal-soft,#eef2ff);color:var(--f4-portal-primary-ink,#3730a3);font-size:12px;font-weight:750;
}
.f4-cash-calendar-footer button:last-child {background:#fff;border:1px solid #e1def1}
.f4-cash-calendar-footer button:hover {background:var(--f4-portal-soft-hover,#e0e7ff)}
.f4-cash-calendar-backdrop {display:none}
@media(max-width:767px){
  body.f4-cash-calendar-open {overflow:hidden}
  .f4-cash-calendar-backdrop {
    display:block;position:fixed;inset:0;z-index:30000;
    background:rgba(21,24,45,.42);
  }
  .f4-cash-calendar.is-mobile {
    left:0;right:0;top:auto;bottom:0;width:100%;max-width:none;
    border-radius:20px 20px 0 0;
    padding:19px 17px calc(18px + env(safe-area-inset-bottom,0px));
    max-height:90dvh;overflow-y:auto;
  }
  .f4-cash-calendar-grip {
    display:block;width:42px;height:5px;margin:-10px auto 14px;
    border-radius:99px;background:#d5d6e2;
  }
  .f4-cash-calendar-header strong {font-size:17px}
  .f4-cash-calendar-day {min-height:42px;font-size:14px}
  .f4-cash-calendar-weekdays span {font-size:12px}
  .f4-cash-calendar-footer button {min-height:40px;font-size:13px}
}

#keuangan .f4-cash-overview .f4-cash-clear-date {
  display:grid;place-items:center;flex:none;
  width:31px;height:35px;border-radius:9px;
  border:1px solid #dbdef0;background:#fff;color:#63708d;
}
#keuangan .f4-cash-overview .f4-cash-clear-date[hidden] {display:none}
#keuangan .f4-cash-overview .f4-cash-table-print {
  display:flex;align-items:center;justify-content:center;
  gap:6px;min-height:35px;padding:7px 11px;
  background:#101a36;color:#fff;border:1px solid #101a36;
  border-radius:9px;font-size:12px;font-weight:750;white-space:nowrap;
}
#keuangan .f4-cash-overview .f4-cash-table-print:hover {background:#253156}
#keuangan .f4-cash-overview .f4-cash-loading-status {
  display:block;padding:0 13px;font-size:11px;color:#77829a;
}
#keuangan .f4-cash-overview .f4-cash-loading-status:empty {display:none}

#keuangan .f4-cash-overview #f4-private-transactions thead {
  position:sticky;top:0;z-index:2;background:#f1f3f9;
}
#keuangan .f4-cash-overview #f4-private-transactions th,
#keuangan .f4-cash-overview #f4-private-transactions td {
  padding:9px 10px;
}
@media (min-width:768px) and (max-width:1150px) {
  #keuangan .f4-cash-overview {grid-template-columns:minmax(0,1fr);height:auto}
  #keuangan .f4-cash-summary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:auto}
  #keuangan .f4-cash-summary>div:first-child,
  #keuangan .f4-cash-pair>div {padding:13px;min-height:145px}
  #keuangan .f4-cash-summary>div:first-child {grid-column:auto}
  #keuangan:not(.f4-finance-personal-active) .f4-cash-overview #f4-private-transactions {height:350px;max-height:350px}
}
@media (max-width:767px) {
  body[data-preview-role]:not([data-preview-role="public"]) #keuangan .f4-cash-mobile-actions{display:flex}
  /* Mobile cash overview: balance and paired cash-flow slides. */
  #keuangan .f4-cash-overview {
    display:grid;grid-template-columns:minmax(0,1fr);
    gap:5px;height:auto;align-items:center;min-width:0;
  }
  #keuangan .f4-cash-summary {
    grid-column:1/-1;
    display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:100%;grid-template-rows:minmax(124px,auto);
    gap:16px;align-items:stretch;justify-items:stretch;
    box-sizing:border-box;height:auto;min-height:0;width:calc(100% + 26px);max-width:none;margin-inline:-13px;padding-inline:13px;scroll-padding-inline:13px;
    overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;
  }
  #keuangan .f4-cash-summary::-webkit-scrollbar {display:none}
  #keuangan .f4-cash-summary>div {
    min-width:0;width:100%;max-width:100%;scroll-snap-align:start;scroll-snap-stop:always;
  }
  #keuangan .f4-cash-summary>div:first-child,
  #keuangan .f4-cash-pair>div {
    box-sizing:border-box;min-width:0;min-height:124px;height:auto;width:100%;max-width:100%;
    display:grid;grid-template-columns:minmax(0,1fr);
    grid-template-rows:minmax(24px,auto) minmax(32px,1fr) minmax(25px,auto);
    gap:5px;align-items:center;justify-content:stretch;
    padding:11px 14px;border-radius:var(--f4-portal-card-radius,12px);overflow:hidden;touch-action:auto;
  }
  #keuangan .f4-cash-pair {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:stretch;
  }
  #keuangan .f4-cash-pair>div {padding:10px 11px;grid-template-rows:minmax(28px,auto) minmax(32px,1fr) minmax(25px,auto)}
  #keuangan .f4-cash-pair .f4-cash-card-heading {gap:2px}
  #keuangan .f4-cash-pair .f4-cash-card-heading .space-x-1 {margin:0;gap:0}
  #keuangan .f4-cash-pair .f4-cash-card-heading .space-x-1 button {padding:1px}
  #keuangan .f4-cash-pair .f4-cash-card-heading .space-x-1 svg {width:13px;height:13px}
  #keuangan .f4-cash-pair .f4-cash-card-value svg {display:none}
  #keuangan .f4-cash-pair .f4-cash-card-footer {gap:3px;flex-wrap:wrap;align-content:center}
  #keuangan .f4-cash-pair .f4-cash-card-footer>span:last-child {white-space:nowrap;margin-left:auto}
  #keuangan .f4-cash-card-main {display:contents}
  #keuangan .f4-cash-card-heading {grid-row:1;margin:0;min-width:0;align-items:center}
  #keuangan .f4-cash-card-heading>p {font-size:12px;line-height:1.3}
  #keuangan .f4-cash-card-value {grid-row:2;align-self:center;margin:0;min-width:0}
  #keuangan .f4-cash-card-footer {grid-row:3;align-self:stretch;margin:0;padding-top:6px;min-width:0;font-size:11px}
  #keuangan .f4-cash-overview>.f4-home-slide-nav:not(:empty) {display:flex;grid-column:1/-1;margin:0;justify-content:center;align-items:center;gap:3px;height:12px;min-height:0;padding:0}
  #keuangan .f4-home-slide-nav button {display:grid;place-items:center;width:22px;height:12px;padding:0;border:0;background:transparent;cursor:pointer}
  #keuangan .f4-home-slide-nav button::before {content:"";display:block;width:5px;height:5px;border-radius:5px;background:#c7cde0}
  #keuangan .f4-home-slide-nav button[aria-current="true"]::before {width:14px;background:var(--f4-portal-primary,#4f46e5)}
  #keuangan .f4-cash-card-footer #label-saldo-bulan {font-size:10px}
  #keuangan .f4-cash-card-footer #saldo-bulan {font-size:11px}
  #keuangan .f4-cash-summary :is(#sisa-saldo,#pemasukan-bulan-ini,#pengeluaran-bulan-ini) {
    display:block;line-height:1.18;white-space:nowrap;overflow-wrap:normal;
    font-size:clamp(20px,6.5vw,29px);font-weight:900;letter-spacing:-.025em;
    font-variant-numeric:tabular-nums;
  }
  #keuangan .f4-cash-summary .f4-cash-card-heading {gap:5px;align-items:center}
  #keuangan .f4-cash-summary :is(#label-pemasukan-bulan,#label-pengeluaran-bulan) {
    font-size:clamp(10px,2.9vw,12px);line-height:1.25;white-space:normal;min-width:0;
  }
  #keuangan .f4-cash-pair :is(#pemasukan-bulan-ini,#pengeluaran-bulan-ini) {
    font-size:clamp(15px,5.25vw,23px);
  }
  #keuangan .f4-cash-summary .space-x-1 {display:flex;flex:none;gap:0}
  #keuangan .f4-cash-summary .space-x-1 button {padding:2px}
  #keuangan .f4-cash-summary .f4-cash-card-footer {margin-top:0}
  #keuangan .f4-cash-summary #total-pemasukan-all,
  #keuangan .f4-cash-summary #total-pengeluaran-all {font-size:11px}
  /* Mobile: the original journal becomes a compact recent-activity list. */
  body[data-preview-role]:not([data-preview-role="public"]) #keuangan:not(.f4-finance-personal-active) .f4-cash-overview #f4-private-transactions {
    display:flex;height:auto;max-height:none;margin-top:6px;
  }
  #keuangan .f4-cash-overview #f4-private-transactions>div.overflow-x-auto {overflow:visible;flex:none}
  #keuangan .f4-cash-overview #f4-private-transactions table,
  #keuangan .f4-cash-overview #f4-private-transactions tbody {display:block;min-width:0;width:100%;table-layout:auto}
  #keuangan .f4-cash-overview #f4-private-transactions thead {display:none}
  #keuangan .f4-cash-overview #f4-private-transactions tbody tr {
    display:grid;grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:"note amount" "date amount";gap:3px 10px;
    align-items:center;padding:10px 13px;min-width:0;
  }
  #keuangan .f4-cash-overview #f4-private-transactions :is(th,td):nth-child(n) {width:auto;min-width:0;padding:0}
  #keuangan .f4-cash-overview #f4-private-transactions tbody td:nth-child(1):not([colspan]),
  #keuangan .f4-cash-overview #f4-private-transactions tbody td:nth-child(4) {display:none}
  #keuangan .f4-cash-overview #f4-private-transactions tbody td:nth-child(2) {grid-area:date;font-size:11px;color:#64708a}
  #keuangan .f4-cash-overview #f4-private-transactions tbody td:nth-child(3) {grid-area:note;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
  #keuangan .f4-cash-overview #f4-private-transactions tbody td:nth-child(5) {grid-area:amount;font-size:12px;font-variant-numeric:tabular-nums}
  #keuangan .f4-cash-overview #f4-private-transactions td.f4-cash-no-results {grid-column:1/-1;padding:10px 0}
  #keuangan .f4-cash-overview .f4-cash-table-print {display:none}
  #keuangan .f4-cash-overview .f4-cash-table-toolbar {gap:8px;align-items:center}
  #keuangan .f4-cash-overview .f4-cash-table-actions {flex-wrap:wrap}
  #keuangan .f4-cash-overview #btn-container-keuangan-all {padding:9px 12px}
  #keuangan .f4-cash-overview #btn-container-keuangan-all button {min-height:30px}
  /* Rincian opens the existing searchable modal, formatted as compact rows. */
  #modal-keuangan .overflow-x-auto.overflow-y-auto {
    overflow-x:hidden;padding:8px 12px;
  }
  #modal-keuangan table,#modal-keuangan tbody {
    display:block;width:100%;min-width:0;border-spacing:0;
  }
  #modal-keuangan thead {display:none}
  #modal-keuangan tbody tr {
    display:grid;grid-template-columns:minmax(0,1fr) max-content;
    grid-template-areas:"note amount" "date amount";
    gap:3px 9px;align-items:center;min-width:0;
    padding:10px 3px;border-bottom:1px solid #edf0f5;
  }
  #modal-keuangan tbody tr>td {
    display:block;min-width:0;max-width:none;width:auto;
    padding:0;margin:0;line-height:1.3;
  }
  #modal-keuangan tbody tr>td:nth-child(1) {
    grid-area:date;color:#8992a4;font-size:11px;
    white-space:nowrap;overflow-wrap:normal;
  }
  #modal-keuangan tbody tr>td:nth-child(2) {
    grid-area:note;font-size:12px;font-weight:700;
    color:#28364d;white-space:normal;overflow-wrap:break-word;
  }
  #modal-keuangan tbody tr>td:nth-child(3) {display:none}
  #modal-keuangan tbody tr>td:nth-child(4) {
    grid-area:amount;justify-self:end;text-align:right;
    white-space:nowrap;font-size:12px;font-weight:800;
    font-variant-numeric:tabular-nums;
  }
  #keuangan .f4-user-finance {
    width:100%;max-width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;
    align-items:center;gap:10px 7px;
  }
  #keuangan .f4-user-finance-heading {margin:0;gap:6px}
  #keuangan .f4-user-finance-heading h3 {font-size:clamp(15px,4.5vw,19px);white-space:nowrap}
  #keuangan .f4-user-finance-heading svg {width:19px;height:19px}
  #keuangan .f4-user-finance .f4-user-finance-controls {
    width:auto;max-width:100%;margin:0;padding:3px;gap:2px;
    min-height:33px;box-sizing:border-box;border-radius:8px;
    grid-template-columns:repeat(2,max-content);
  }
  #keuangan .f4-user-finance .f4-user-finance-controls>button{
    min-height:27px;width:auto;padding:5px 8px;font-size:11px;font-weight:650;
    border-radius:6px;white-space:nowrap;box-shadow:none;
  }
  #keuangan .f4-user-finance #f4-personal-finance {grid-column:1/-1;min-width:0}
}
@media (max-width:390px){
  #keuangan .f4-cash-overview .f4-cash-last-update {white-space:normal}
  #keuangan .f4-cash-overview .f4-cash-table-actions {max-width:100%;justify-content:flex-end}
  #keuangan .f4-cash-summary>div:first-child {padding:11px 13px}
  #keuangan .f4-cash-pair>div {padding:10px 9px}
  #keuangan .f4-user-finance .f4-user-finance-controls>button {padding-inline:6px}
}

#keuangan .f4-resident-layout {
  display:grid;grid-template-columns:minmax(0,1.33fr) minmax(0,.92fr) minmax(0,1.75fr);
  align-items:stretch;gap:12px;min-width:0;
}
#keuangan .f4-resident-dues,
#keuangan .f4-resident-right,
#keuangan .f4-resident-history-pane {
  box-sizing:border-box;min-width:0;height:294px;
  background:#fff;border:1px solid #e1e5f0;border-radius:var(--f4-portal-card-radius,12px);
  padding:14px 15px;box-shadow:0 5px 16px rgba(34,39,91,.035);
}
#keuangan .f4-resident-dues {display:flex;flex-direction:column;gap:8px}
#keuangan .f4-resident-card-heading {display:flex;align-items:center;gap:10px;flex:none}
#keuangan .f4-resident-card-icon {
  flex:none;width:34px;height:34px;border-radius:10px;display:grid;place-items:center;
  color:var(--f4-portal-primary,#4f46e5);background:var(--f4-portal-soft,#eef2ff);
}
#keuangan .f4-resident-card-heading h3,
#keuangan .f4-resident-status-heading h3 {
  margin:0;color:#26344f;font-size:15px;line-height:1.35;font-weight:800;
}
#keuangan .f4-resident-card-heading p,
#keuangan .f4-resident-status-heading p {
  margin:2px 0 0;font-size:11px;color:#7a8498;line-height:1.4;
}
#keuangan .f4-resident-dues-content {min-height:0;display:flex;flex:1;flex-direction:column}
#keuangan .f4-resident-dues-rows {
  display:flex;flex:1;min-height:0;flex-direction:column;justify-content:flex-start;
  gap:8px;padding:11px 0 2px;
}
#keuangan .f4-resident-dues-row,
#keuangan .f4-resident-dues-total {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  font-size:13px;line-height:1.3;color:#49556e;
}
#keuangan .f4-resident-dues-row strong {font-weight:750;color:#283651;white-space:nowrap;font-variant-numeric:tabular-nums}
#keuangan .f4-resident-dues-total {
  flex:none;padding-top:10px;margin-top:auto;border-top:1px solid #e8eaf3;font-weight:800;
  color:#283651;
}
#keuangan .f4-resident-dues-total strong {font-size:18px;color:var(--f4-portal-primary,#4f46e5);font-variant-numeric:tabular-nums}
/* Mini-resi: compact enough for the equal-height desktop grid. */
#keuangan .f4-resident-right {
  display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden;
}
#keuangan .f4-resident-status-heading {
  display:flex;flex:none;align-items:center;justify-content:space-between;
  gap:10px;padding:10px 13px;color:#fff;
  background:var(--f4-portal-primary,#4f46e5);
}
#keuangan .f4-resident-status-heading h3 {
  margin:2px 0 0;color:#fff;font-size:14px;font-weight:800;line-height:1.3;
}
#keuangan .f4-resident-status-heading p {
  margin:1px 0 0;font-size:10px;color:#e0e7ff;
}
#keuangan .f4-resident-ticket-brand {
  color:#e0e7ff;font-size:9px;letter-spacing:.065em;font-weight:850;
}
#keuangan .f4-resident-ticket-mark {
  flex:none;display:grid;place-items:center;width:32px;height:32px;
  border-radius:50%;background:#fff;color:var(--f4-portal-primary,#4f46e5);
}
#keuangan .f4-resident-ticket-mark svg {width:21px;height:21px}
#keuangan .f4-resident-status-content {
  display:flex;flex:1;min-height:0;min-width:0;
  align-items:stretch;overflow:hidden;padding:9px 13px 6px;
}
#keuangan .f4-resident-receipt-body {
  display:flex;flex:1;min-width:0;min-height:0;
  flex-direction:column;gap:7px;
}
#keuangan .f4-resident-receipt-total {
  display:flex;flex-direction:column;gap:1px;flex:none;
}
#keuangan .f4-resident-receipt-total>span {
  color:#64748b;font-size:9px;font-weight:850;letter-spacing:.045em;
}
#keuangan .f4-resident-receipt-total>strong {
  color:var(--f4-portal-primary,#4f46e5);font-size:23px;font-weight:900;line-height:1.17;
  font-variant-numeric:tabular-nums;
}
#keuangan .f4-resident-receipt-details {display:flex;flex-direction:column;gap:4px;margin:0;min-width:0}
#keuangan .f4-resident-receipt-detail {
  display:grid;grid-template-columns:minmax(0,82px) minmax(0,1fr);
  align-items:baseline;gap:6px;min-width:0;line-height:1.25;
}
#keuangan .f4-resident-receipt-detail dt {
  font-size:10px;color:#788198;white-space:nowrap;
}
#keuangan .f4-resident-receipt-detail dd {
  margin:0;min-width:0;font-size:10px;font-weight:800;color:#293047;
  text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#keuangan .f4-resident-receipt-id {
  margin-top:auto;padding-top:6px;min-width:0;
  display:flex;align-items:center;justify-content:space-between;gap:5px;
  border-top:1px dashed #cbd5e1;color:#7b8295;font-size:9px;
}
#keuangan .f4-resident-receipt-id span:last-child {
  min-width:0;max-width:56%;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;font-variant-numeric:tabular-nums;
}
#keuangan .f4-resident-receipt-due {
  display:flex;align-items:center;justify-content:space-between;gap:7px;
  background:#fff4e9;border-radius:7px;padding:5px 7px;
  font-size:10px;color:#985420;
}
#keuangan .f4-resident-receipt-due strong {white-space:nowrap;font-size:11px}
#keuangan .f4-resident-receipt-empty {
  margin:5px 0;color:#7f8494;font-size:11px;line-height:1.45;
}
#keuangan .f4-resident-status-band {
  display:flex;align-items:center;justify-content:space-between;
  gap:8px;flex:none;min-height:31px;
  margin:0 12px 10px;padding:6px 10px;
  border-radius:8px;background:#f0f2f8;color:#606a81;
}
#keuangan .f4-resident-status-band>span {
  font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.04em;
}
#keuangan .f4-resident-status-band:has(.is-paid) {background:#d9f7e9;color:#087850}
#keuangan .f4-resident-status-band:has(.is-unpaid) {background:#fff3df;color:#975c06}
#keuangan .f4-resident-status-band:has(.is-partial) {background:#fff0e0;color:#ad551b}
#keuangan .f4-resident-badge {
  font-size:13px;font-weight:900;line-height:1.2;text-align:right;color:inherit;
}
#keuangan .f4-resident-badge.is-paid {color:#087850}
#keuangan .f4-resident-badge.is-unpaid {color:#975c06}
#keuangan .f4-resident-badge.is-partial {color:#ad551b}
#keuangan .f4-resident-badge.is-neutral {color:#58647d}
#keuangan .f4-resident-history-pane {display:flex;flex-direction:column;min-width:0;min-height:0}
#keuangan .f4-resident-history-pane .f4-user-finance-intro {
  gap:7px;margin:0 0 6px;padding:0;border:0;flex:none;
}
#keuangan .f4-resident-history-pane .f4-user-finance-icon {width:25px;height:25px;flex-basis:25px;border-radius:7px}
#keuangan .f4-resident-history-pane .f4-user-finance-icon svg {width:16px;height:16px}
#keuangan .f4-resident-history-pane .f4-user-finance-intro h3 {font-size:13px;line-height:1.35}
#keuangan .f4-resident-history-pane .f4-user-finance-intro p {display:none}
#keuangan .f4-resident-history-pane .f4-user-finance-sub {
  flex:none;gap:5px;padding:1px 0 5px;margin:0 0 3px;min-height:0;
}
#keuangan .f4-resident-history-pane .f4-user-finance-sub>button {
  min-height:31px;padding:6px 9px;font-size:11px;border-radius:8px;
}
#keuangan .f4-resident-history-pane #f4-personal-data {
  display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;
}
#keuangan .f4-resident-history-pane .f4-user-category-heading {
  margin:0 0 5px;flex:none;gap:5px;
}
#keuangan .f4-resident-history-pane .f4-user-category-heading h4 {font-size:12px}
#keuangan .f4-resident-history-pane .f4-user-year-filter>span {display:none}
#keuangan .f4-resident-history-pane .f4-user-year-trigger {
  min-height:30px;min-width:90px;padding:5px 9px;font-size:11px;
}
#keuangan .f4-resident-history-pane .f4-user-year-picker {min-width:90px}
#keuangan .f4-resident-history-pane .f4-user-year-content {
  display:flex;flex:1;flex-direction:column;min-width:0;min-height:0;
}
#keuangan .f4-resident-history-pane .f4-user-year-context {display:none}
#keuangan .f4-resident-history-pane .f4-user-list-heading {display:none}
#keuangan .f4-resident-history-pane .f4-user-entries {
  min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;
  scrollbar-width:thin;scrollbar-color:#cbd0e5 transparent;
}
#keuangan .f4-resident-history-pane .f4-user-row {padding:9px 11px;gap:6px}
#keuangan .f4-resident-history-pane .f4-user-row-content>strong {font-size:11px}
#keuangan .f4-resident-history-pane .f4-user-row-details {font-size:10px;margin-top:3px}
#keuangan .f4-resident-history-pane .f4-user-amount {font-size:12px;align-self:center}
#keuangan .f4-resident-history-pane .f4-user-more-controls {
  flex:none;margin-top:5px;gap:5px;
}
#keuangan .f4-resident-history-pane .f4-user-more-controls>span {font-size:10px}
#keuangan .f4-resident-history-pane .f4-user-more-controls button.f4-user-more-button {
  min-height:28px;padding:5px 9px;font-size:11px;
}
#keuangan .f4-resident-placeholder {font-size:12px;color:#7a8599;line-height:1.55;margin:7px 0}
#keuangan .f4-resident-mobile-actions {display:none}
#keuangan .f4-resident-sheet-overlay[hidden] {display:none}
/* Intermediate laptop widths retain readable cards instead of cramped third column. */
@media(min-width:768px) and (max-width:1199px) {
  #keuangan .f4-resident-layout {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  #keuangan .f4-resident-history-pane {grid-column:1 / -1;height:272px}
  #keuangan .f4-resident-payment-split {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:767px) {
  #keuangan .f4-resident-layout {display:block}
  #keuangan .f4-resident-layout>.f4-resident-dues {display:none}
  #keuangan .f4-resident-layout>.f4-resident-right {height:auto;padding:0;border-radius:var(--f4-portal-card-radius,12px);gap:0}
  #keuangan .f4-resident-layout .f4-resident-history-pane {display:none}
  #keuangan .f4-resident-status-content {padding:12px 15px}
  #keuangan .f4-resident-receipt-body {gap:10px}
  #keuangan .f4-resident-receipt-details {gap:7px}
  #keuangan .f4-resident-receipt-detail {grid-template-columns:105px minmax(0,1fr)}
  #keuangan .f4-resident-receipt-detail :is(dt,dd) {font-size:12px}
  #keuangan .f4-resident-receipt-total>strong {font-size:26px}
  #keuangan .f4-resident-status-band {margin:0 15px 13px}
  #keuangan .f4-resident-mobile-actions {padding:0 15px 15px}
  #keuangan .f4-resident-mobile-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  #keuangan .f4-resident-mobile-actions button.f4-resident-sheet-opener {
    display:flex;align-items:center;justify-content:space-between;gap:5px;
    min-width:0;min-height:48px;padding:10px 9px;background:var(--f4-portal-soft,#eef2ff);
    border:1px solid var(--f4-portal-line,#c7d2fe);border-radius:10px;color:var(--f4-portal-primary-ink,#3730a3);
    font-size:11px;font-weight:800;text-align:left;
  }
  #keuangan .f4-resident-sheet-opener svg {flex:none;width:17px;height:17px}
  #keuangan .f4-resident-sheet-opener svg:last-child {width:13px;height:13px;margin-left:auto}
  #keuangan .f4-resident-sheet-opener span {line-height:1.25;min-width:0}
  body.f4-resident-sheet-open {overflow:hidden}
  /* Only this sheet raises the existing dock's stacking order, never its geometry. */
  body.f4-resident-sheet-open #f4-shell-bottom {z-index:26001}
  #keuangan .f4-resident-sheet-overlay {
    /* Full travel area behind the persistent dock; reserve the dock only
       for the final resting position of the panel. */
    position:fixed;inset:0 0 auto;z-index:26000;display:flex;
    box-sizing:border-box;overflow:hidden;
    height:var(--f4-shell-viewport,100dvh);
    align-items:flex-end;justify-content:center;padding:0 0 var(--f4-shell-footer,0px);
    background:rgba(21,27,49,.48);
  }
  #keuangan .f4-resident-sheet-panel {
    display:flex;flex-direction:column;min-width:0;width:100%;
    box-sizing:border-box;height:85dvh;max-height:var(--f4-sheet-collapsed-height,72dvh);overflow:hidden;
    border-radius:20px 20px 0 0;background:#fff;
    box-shadow:0 -15px 40px rgba(27,30,61,.24);
    padding:32px 15px calc(17px + env(safe-area-inset-bottom,0px));
    animation:f4-resident-rise .32s cubic-bezier(.22,.72,.27,1) both;
  }
  @keyframes f4-resident-rise {
    from {transform:translate3d(0,calc(100% + var(--f4-shell-footer,0px)),0)}
    to {transform:translate3d(0,0,0)}
  }
  #keuangan .f4-resident-sheet-panel.f4-sheet-gesture-ready {animation:none}
  #keuangan .f4-resident-sheet-panel>.f4-sheet-handle[hidden] {display:none}
  #keuangan .f4-resident-sheet-overlay[data-kind="dues"] .f4-resident-sheet-panel {
    height:auto;max-height:var(--f4-sheet-collapsed-height,72dvh);
  }
  #keuangan .f4-resident-sheet-panel .f4-resident-sheet-top {
    display:flex;align-items:center;justify-content:space-between;
    gap:12px;margin-bottom:15px;flex:none;
  }
  #keuangan .f4-resident-sheet-top h3 {margin:0;font-size:17px;font-weight:800;color:#283550}
  #keuangan .f4-resident-sheet-top button.f4-resident-sheet-close {
    width:34px;height:34px;display:grid;place-items:center;
    background:#f1f3f9;color:#65718c;border:0;border-radius:10px;
    padding:0;min-height:0;
  }
  #keuangan .f4-resident-sheet-content {
    display:flex;flex:1;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain;
  }
  #keuangan .f4-resident-sheet-content .f4-resident-dues {
    display:flex;width:100%;height:auto;min-height:0;max-height:none;padding:0;
    border:0;border-radius:0;box-shadow:none;
  }
  #keuangan .f4-resident-sheet-content .f4-resident-card-heading {display:none}
  #keuangan .f4-resident-sheet-content .f4-resident-dues-rows {gap:15px;padding:3px 0 15px}
  #keuangan .f4-resident-sheet-content .f4-resident-dues-total {margin-top:6px}
  #keuangan .f4-resident-sheet-content .f4-resident-history-pane {
    display:flex;flex:1;min-height:0;
  }
  #keuangan .f4-resident-sheet-content .f4-user-finance-intro {display:none}
  #keuangan .f4-resident-sheet-content .f4-user-finance-sub {margin-bottom:9px}
  #keuangan .f4-resident-sheet-content .f4-user-entries {min-height:100px}
}
@media(prefers-reduced-motion:reduce){
  #keuangan .f4-resident-sheet-panel {animation:none}
}
