@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --navy: #0e1b33;
  --ink: #1b2740;
  --muted: #5d6b82;
  --line: #e2e7f0;
  --bg: #f4f6fa;
  --surface: #fff;
  --blue: #0b5fe8;
  --blue-dark: #094bb8;
  --blue-soft: #e8f0fe;
  --red: #b42318;
  --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 "Plus Jakarta Sans", system-ui, sans-serif; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--navy); letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--navy); }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ic { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px; padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line); }
.side-logo { display: block; padding: 2px 8px 4px; }
.side-logo img { display: block; width: 100%; max-width: 172px; height: auto; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.side-nav a:hover { background: var(--bg); color: var(--ink); text-decoration: none; }
.side-nav a.on { background: var(--blue-soft); color: var(--blue-dark); }
.side-user { padding: 12px 10px 0; border-top: 1px solid var(--line); }
.side-user-name { font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.main { padding: 28px 32px 48px; min-width: 0; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.back { font-size: 13px; font-weight: 600; }
.back::before { content: "← "; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 14px; border: 1px solid #cdd5e2; border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--bg); text-decoration: none; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-danger { color: var(--red); border-color: #f0c8c4; }
.btn-danger:hover { background: #fdf0ef; }
.btn-block { width: 100%; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.link-btn:hover { color: var(--blue); }
.link-btn .ic { width: 15px; height: 15px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: #fdf0ef; color: var(--red); }

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
input, select, textarea { width: 100%; min-height: 38px; margin-top: 4px; padding: 8px 10px; border: 1px solid #cdd5e2; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; }
input[type=file] { padding: 6px; font-size: 12px; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.form-sticky { position: sticky; bottom: 0; z-index: 5; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 35%); }

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-head.flush { padding: 0; border: 0; }
.card-head select { width: auto; max-width: 280px; margin: 0; }
.form-card { padding: 20px; max-width: 760px; }
.form-card.wide { max-width: none; }
.stack > .card + .card { margin-top: 0; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 16px; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.tile-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.tile-value { margin-top: 4px; font-size: 21px; line-height: 1.25; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.tile-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th.num { text-align: right; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .strong { font-weight: 600; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table .strong.wrap { white-space: normal; overflow-wrap: anywhere; }
.table .actions { width: 1%; padding-block: 4px; text-align: right; }
.cell-sub { font-size: 12px; color: var(--muted); }

.filters { display: flex; gap: 10px; margin-bottom: 14px; }
.filters input { flex: 1; max-width: 360px; margin: 0; }
.filters select { width: auto; margin: 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-draft { background: #eceff4; color: #47536a; }
.badge-unpaid { background: var(--blue-soft); color: var(--blue-dark); }
.badge-partial { background: #fdf1d8; color: #8a5a00; }
.badge-overdue { background: #fde8e6; color: #a32015; }
.badge-paid { background: #dcf5ea; color: #0b6b45; }
.badge-pending { background: #fff; color: #47536a; box-shadow: inset 0 0 0 1px #cdd5e2; }
.badge-cancelled { background: #eceff4; color: #47536a; text-decoration: line-through; }

.alert { margin-bottom: 14px; padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.alert-success { background: #dcf5ea; color: #0b5238; }
.alert-error { background: #fde8e6; color: #8f1c12; }
.alert-warn { background: #fdf1d8; color: #6e4800; }

/* invoice editor */
.field-with-action { position: relative; }
.field-with-action .link-btn { position: absolute; top: -1px; right: 0; }
.m-label { display: none; }
.item-field { display: contents; }
.item-head, .item-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 96px 140px 136px 36px; gap: 8px; align-items: start; }
.item-head { padding-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.item-row { padding: 8px 0; border-top: 1px solid var(--line); }
.item-row input, .item-row textarea { margin-top: 0; }
.item-desc { display: flex; flex-direction: column; gap: 6px; }
.item-desc textarea { min-height: 34px; font-size: 13px; }
.item-qty, .item-price { text-align: right; }
.item-total { padding-top: 9px; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.form-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.form-split .form-card { max-width: none; }
.totals-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-variant-numeric: tabular-nums; }
.totals-input { display: grid; grid-template-columns: 76px 62px 74px minmax(0, 1fr); gap: 8px; align-items: center; }
.totals-input input, .totals-input select { margin: 0; padding-inline: 8px; }
.totals-input strong { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tax-suffix { text-align: right; color: var(--muted); }
.totals-grand { padding-top: 12px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 700; color: var(--navy); }
.dialog { width: min(560px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.dialog::backdrop { background: rgba(14, 27, 51, .4); }

/* dashboard */
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-grid .card + .card { margin-top: 0; }
.chart { --income: #0b5fe8; --expense: #f08a24; position: relative; margin: 0; padding: 12px 16px 14px; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; font-weight: 600; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 2px; }
.key-income { background: var(--income); }
.key-expense { background: var(--expense); }
.chart-plot { position: relative; height: 200px; margin: 12px 0 26px 48px; }
.chart-tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.chart-tick span { position: absolute; right: 100%; top: -8px; padding-right: 8px; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-bars { position: absolute; inset: 0; display: flex; }
.chart-group { position: relative; flex: 1; min-width: 0; padding: 0; border: 0; border-radius: 6px 6px 0 0; background: none; font: inherit; cursor: default; }
.chart-group:hover { background: rgba(14, 27, 51, .035); }
.chart-columns { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; gap: 2px; }
.bar { display: block; width: min(24px, 34%); border-radius: 4px 4px 0 0; }
.bar-income { background: var(--income); }
.bar-expense { background: var(--expense); }
.chart-month { position: absolute; top: 100%; left: 0; right: 0; padding-top: 6px; font-size: 12px; color: var(--muted); text-align: center; }
.chart-tooltip { position: absolute; z-index: 3; width: max-content; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 6px 18px rgba(14, 27, 51, .14); font-size: 12px; pointer-events: none; }
.chart-tooltip-title { margin-bottom: 4px; color: var(--muted); }
.chart-tooltip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tooltip-row i { width: 12px; height: 2px; }
.chart-tooltip-row strong { font-variant-numeric: tabular-nums; color: var(--navy); }
.chart-tooltip-row span { color: var(--muted); }
.chart-table { margin-top: 2px; font-size: 13px; }
.chart-table summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.chart-table .table th, .chart-table .table td { padding: 7px 8px; }
.chart-empty { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.cat-list { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 14px 16px; list-style: none; }
.cat-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.cat-name { min-width: 0; overflow-wrap: anywhere; }
.cat-row strong { flex: none; font-variant-numeric: tabular-nums; color: var(--navy); }
.meter { height: 8px; margin-top: 4px; border-radius: 999px; background: #fdeedd; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: #f08a24; }

/* expenses */
.filter-total { margin-left: auto; font-size: 13px; color: var(--muted); }
.filter-total strong { display: block; font-size: 17px; color: var(--navy); text-align: right; }
.filters input[type=month] { flex: none; width: 170px; }

/* payment plan */
.segmented { display: inline-flex; align-self: flex-start; padding: 3px; border-radius: 9px; background: #e9edf4; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.segmented span { display: block; padding: 7px 16px; border-radius: 7px; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: #fff; color: var(--blue-dark); box-shadow: 0 1px 2px rgba(14, 27, 51, .12); }
.segmented input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }
.plan-dp { display: grid; grid-template-columns: minmax(0, 1fr) 70px 150px 150px; gap: 8px; align-items: center; }
.plan-dp-title { font-weight: 600; }
.plan-dp select, .plan-dp input { margin: 0; }
.plan-dp strong { text-align: right; font-variant-numeric: tabular-nums; }
.term-head, .term-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 170px 36px; gap: 8px; align-items: center; }
.term-head { font-size: 12px; font-weight: 600; color: var(--muted); }
.term-row { padding: 6px 0; border-top: 1px solid var(--line); }
.term-row input { margin: 0; }
.term-amount { text-align: right; }
.term-amount[readonly] { background: var(--bg); color: var(--muted); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.term-list li { align-items: center; }
.term-list .is-current { margin-inline: -8px; padding-inline: 8px; border-radius: 6px; background: var(--blue-soft); }

/* settings */
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.media-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.media-preview { display: flex; align-items: center; justify-content: center; height: 120px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.media-preview img { max-width: 100%; max-height: 100%; }
.file-label { margin-top: 6px; font-size: 12px; color: var(--muted); }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* invoice detail */
.view-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.paper-scroll { overflow-x: auto; padding-bottom: 4px; }
.view-panel { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.view-panel .card + .card { margin-top: 0; }
.panel-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.action-list { display: flex; flex-direction: column; gap: 8px; }
.pay-list { margin: 0; padding: 0; list-style: none; }
.pay-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.switch { display: flex; align-items: center; gap: 10px; min-height: 28px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: #c5cedc; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: .5; }
.switch:has(input:disabled) { cursor: not-allowed; }

/* auth */
.auth { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.auth-logo { display: block; width: 190px; margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media screen and (max-width: 1180px) {
  .view-grid { display: flex; flex-direction: column; align-items: stretch; }
  .view-grid > * { width: 100%; }
  .view-panel { display: contents; }
  .view-panel > .card { order: 3; }
  .view-panel > .card:first-child { order: 1; }
  .paper-scroll { order: 2; }
}
@media screen and (max-width: 960px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .form-split { grid-template-columns: minmax(0, 1fr); }
  .filters { flex-wrap: wrap; }
}
@media screen and (max-width: 760px) {
  :root { --bottom-nav: calc(60px + env(safe-area-inset-bottom)); }

  /* kerangka: logo di atas, menu tetap di bawah */
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-logo { padding: 0; }
  .side-logo img { max-width: 124px; }
  .side-user { padding: 0; border: 0; }
  .side-user-name { display: none; }
  .side-user .link-btn { min-height: 44px; }
  .side-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; height: var(--bottom-nav); padding: 0 2px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
  .side-nav a { flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 0; border-radius: 0; font-size: 10px; font-weight: 600; letter-spacing: -.01em; }
  .side-nav a:hover { background: none; }
  .side-nav a.on { background: none; color: var(--blue); }
  .side-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-nav .ic { width: 21px; height: 21px; }
  .main { padding: 16px 14px calc(var(--bottom-nav) + 24px); }

  /* ukuran sentuh; font 16px mencegah zoom otomatis di iPhone */
  h1 { font-size: 22px; }
  input, select, textarea { min-width: 0; min-height: 44px; font-size: 16px; }
  input[type=date], input[type=month] { display: block; }
  input::-webkit-date-and-time-value { text-align: left; }
  input[type=file] { font-size: 13px; }
  .btn { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .switch, .check { min-height: 44px; }

  .page-head { flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
  .head-actions { flex: 1 0 100%; flex-wrap: nowrap; }
  .head-actions .btn { flex: 1; min-width: 0; padding-inline: 8px; font-size: 13px; }
  .tile { padding: 12px; }
  .tile-value { font-size: 18px; }
  .form-card { padding: 16px; max-width: none; }
  .card + .card { margin-top: 12px; }
  .grid-2, .grid-3, .media-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-3 + .grid-3 { padding-top: 14px; border-top: 1px solid var(--line); }
  .form-split { gap: 12px; }

  .form-actions { flex-wrap: nowrap; }
  .form-actions .btn { flex: 1; min-width: 0; padding-inline: 8px; white-space: normal; line-height: 1.2; }
  .form-sticky { bottom: var(--bottom-nav); margin: 0 -14px; padding: 8px 14px; background: var(--surface); border-top: 1px solid var(--line); }

  /* filter */
  .filters { flex-wrap: wrap; gap: 8px; }
  .filters input, .filters select { flex: 1 1 45%; width: auto; min-width: 0; max-width: none; }
  .filters input[type=search] { flex: 1 0 100%; }
  .filters input[type=month] { flex: 1 1 45%; width: auto; }
  .filters .btn { flex: 1 1 30%; }
  .filter-total { order: -1; flex: 1 0 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .filter-total strong { text-align: right; }

  /* tabel menjadi kartu */
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-cards, .table-cards tbody { display: block; }
  .table-cards tbody tr { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
  .table-cards tbody tr:last-child { border-bottom: 0; }
  .table-cards tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 0; border: 0; font-size: 13px; text-align: right; overflow-wrap: anywhere; }
  .table-cards tbody td[data-label]::before { content: attr(data-label); flex: none; color: var(--muted); }
  .table-cards tbody td:empty { display: none; }
  .table-cards .m-title { order: -2; display: block; margin-bottom: 2px; font-size: 14px; text-align: left; }
  .table-cards .m-title .strong { white-space: normal; overflow-wrap: anywhere; }
  .table-cards .m-title .strong::after { content: ""; position: absolute; inset: 0; }
  .table-cards .m-has-badge { padding-right: 118px; }
  .table-cards .m-has-action { padding-right: 34px; }
  .table-cards .m-sub { order: -1; display: block; margin: -2px 0 4px; color: var(--muted); text-align: left; }
  .table-cards .m-hide { display: none; }
  .table-cards .m-strong { font-size: 14px; font-weight: 700; color: var(--navy); }
  .table-cards .m-strong::before { font-size: 13px; font-weight: 400; }
  .table-cards .m-badge { position: absolute; top: 12px; right: 16px; }
  .table-cards .actions { position: absolute; top: 3px; right: 4px; z-index: 1; width: auto; padding: 0; }
  .table-cards .cell-sub { margin-top: 1px; }

  /* item invoice */
  .card-head.flush { flex-wrap: wrap; }
  .card-head select { flex: 1 1 60%; max-width: none; }
  .item-head, .term-head { display: none; }
  .item-desc textarea { font-size: 16px; }
  .m-label { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
  .item-field { display: block; min-width: 0; }
  .item-row { grid-template-columns: 62px 88px minmax(0, 1fr); padding: 14px 0; }
  .item-desc { grid-column: 1 / -1; }
  .item-total { grid-column: 1 / 3; align-self: center; padding: 0; text-align: left; white-space: nowrap; }
  .item-total::before { content: "Jumlah "; font-weight: 400; color: var(--muted); }
  .item-row .icon-btn { justify-self: end; }
  .field-with-action .link-btn { top: -13px; min-height: 44px; }

  .totals-input { grid-template-columns: minmax(0, 1fr) 64px 84px; }
  .totals-input strong { grid-column: 1 / -1; }
  .segmented { display: flex; align-self: stretch; }
  .segmented label { flex: 1; }
  .segmented span { padding-block: 10px; text-align: center; }
  .plan-dp { grid-template-columns: 76px minmax(0, 1fr); }
  .plan-dp-title { grid-column: 1 / -1; }
  .plan-dp strong { grid-column: 1 / -1; }
  .term-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; padding: 12px 0; align-items: end; }
  .term-row > input:first-child { grid-column: 1 / -1; }

  .chart-table .table-cards tbody tr { padding-inline: 0; }
  .view-grid { gap: 12px; }
  .media-preview { height: 104px; }
  .auth-card { padding: 22px 18px; }
}
@media screen and (max-width: 360px) {
  .side-nav a { font-size: 9px; letter-spacing: -.02em; }
  .filters input, .filters select, .filters input[type=month] { flex: 1 0 100%; }
  .item-row { grid-template-columns: 54px 76px minmax(0, 1fr); }
  .term-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .term-row .item-field:first-of-type { grid-column: 1 / -1; }
  .tile-value { font-size: 16px; }
  .head-actions .btn { font-size: 12px; }
  .head-actions .ic { display: none; }
}
