/* =========================================================================
   TapakKita — desain sistem
   Profesional, bergradasi navy → biru, ramah mobile (navbar bawah ala m-banking).
   ========================================================================= */

@font-face { font-family: "Jakarta"; font-weight: 400; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 500; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 600; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 700; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 800; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-800-normal.woff2") format("woff2"); }

:root {
  --navy-900: #071330;
  --navy-800: #0b1d47;
  --navy-700: #12296b;
  --blue-600: #1f4fd8;
  --blue-500: #2f66f0;
  --blue-100: #e6eeff;
  --blue-50: #f2f6ff;
  --grad: linear-gradient(135deg, #0a1a44 0%, #143096 55%, #2a63ec 100%);
  --grad-soft: linear-gradient(135deg, #eef3ff 0%, #f7f9ff 100%);

  --bg: #f2f4f9;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --text: #0e1630;
  --text-2: #3b4562;
  --muted: #6b7591;
  --border: #e3e7f0;
  --border-strong: #cfd6e4;

  --green: #0f9f6e;  --green-bg: #e3f7ef;
  --amber: #b86e00;  --amber-bg: #fff3dc;
  --red: #d33a3a;    --red-bg: #fde8e8;
  --blue: #1f4fd8;   --blue-bg: #e6eeff;
  --gray: #5d6680;   --gray-bg: #eceff5;
  --violet: #6a3fd6; --violet-bg: #efe8ff;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 22, 48, .06);
  --shadow: 0 1px 3px rgba(14, 22, 48, .06), 0 6px 20px rgba(14, 22, 48, .06);
  --shadow-lg: 0 12px 40px rgba(10, 26, 68, .22);

  --sidebar-w: 264px;
  --bottomnav-h: 68px;
  --font: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; font-weight: 800; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.text-green { color: var(--green); } .text-red { color: var(--red); } .text-amber { color: var(--amber); } .text-blue { color: var(--blue); }
.strong { font-weight: 700; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
[x-cloak] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 26px; height: 26px; }

/* ------------------------------------------------------------------ shell */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 30;
  background: var(--navy-900); background-image: linear-gradient(180deg, #0a1a44 0%, #071330 100%);
  color: #c9d3f0; display: none; flex-direction: column; overflow-y: auto;
}
.sidebar .brand { display: flex; align-items: center; gap: .7rem; padding: 1.3rem 1.25rem 1rem; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); color: #fff; font-weight: 800;
}
.brand-name { font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.brand-sub { font-size: .74rem; color: #8f9cc4; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-group { padding: .4rem .75rem; }
.nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #6f7ca6; padding: .7rem .6rem .35rem; font-weight: 700; }
.nav-link {
  display: flex; align-items: center; gap: .7rem; padding: .58rem .7rem; border-radius: 10px;
  color: #c9d3f0; font-weight: 500; font-size: .92rem;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgba(77, 124, 255, .18); color: #fff; box-shadow: inset 3px 0 0 #5b8cff; }
.nav-link .ic { width: 19px; height: 19px; opacity: .9; }
.nav-link .count { margin-left: auto; background: var(--red); color: #fff; font-size: .7rem; border-radius: 99px; padding: 0 .45rem; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 1rem; border-top: 1px solid rgba(255,255,255,.07); }

.main { min-height: 100vh; padding-bottom: calc(var(--bottomnav-h) + 18px + env(safe-area-inset-bottom)); }

/* app bar (mobile: bergradasi) */
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1rem; padding-top: calc(.8rem + env(safe-area-inset-top));
  background: var(--grad); color: #fff; box-shadow: 0 2px 12px rgba(10,26,68,.18);
}
.appbar h1 { font-size: 1.05rem; margin: 0; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .icon-btn { color: #fff; background: rgba(255,255,255,.12); }
.appbar .icon-btn:hover { background: rgba(255,255,255,.2); }
.appbar-actions { display: flex; gap: .4rem; align-items: center; }
.appbar .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: .9rem; background: rgba(255,255,255,.16); }
.appbar .user-chip { display: none; }

.page { padding: 1rem; max-width: 1180px; margin: 0 auto; }
.page-head { display: none; }

.acting-bar { background: #fff3dc; color: #7a4a00; padding: .5rem 1rem; font-size: .85rem; display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.acting-bar form { display: inline; }

/* bottom nav */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  box-shadow: 0 -4px 20px rgba(14,22,48,.06);
}
.bn-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--muted); padding: .4rem 0; }
.bn-item:hover { text-decoration: none; color: var(--blue-600); }
.bn-item .ic { width: 22px; height: 22px; }
.bn-item.active { color: var(--blue-600); }
.bn-center { position: relative; }
.bn-pay {
  width: 58px; height: 58px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  margin-top: -30px; box-shadow: 0 8px 22px rgba(31,79,216,.45), 0 0 0 5px #fff;
}
.bn-pay .ic { width: 26px; height: 26px; }
.bn-center span { margin-top: 2px; }

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 2rem; }
  .bottomnav { display: none; }
  .appbar { background: rgba(242,244,249,.85); backdrop-filter: blur(10px); color: var(--text); box-shadow: none; border-bottom: 1px solid var(--border); padding: .85rem 1.75rem; }
  .appbar h1 { font-size: 1.2rem; font-weight: 800; }
  .appbar .icon-btn { color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
  .appbar .icon-btn:hover { background: var(--surface-2); }
  .appbar .brand-mark.mobile-only { display: none; }
  .appbar .user-chip { display: flex; }
  .page { padding: 1.5rem 1.75rem; }
}
.mobile-only { }
@media (min-width: 1024px) { .mobile-only { display: none !important; } }
@media (max-width: 1023px) { .desktop-only { display: none !important; } }

.user-chip { align-items: center; gap: .55rem; padding: .25rem .65rem .25rem .25rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .85rem; }
.user-chip:hover { text-decoration: none; background: var(--surface-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.3rem; }

/* ------------------------------------------------------------------ komponen dasar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 1.1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.1rem .2rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card + .card, .stack > * + * { margin-top: 1rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 1.4rem 0 .7rem; gap: .5rem; }
.section-title h2 { margin: 0; font-size: 1.02rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; } }

.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem 1rem; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(31,79,216,.28); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.07); }
.btn-success { background: var(--green); color: #fff; border-color: transparent; }
.btn-success:hover { background: #0c8a5f; }
.btn-danger { background: var(--surface); color: var(--red); border-color: #f2c4c4; }
.btn-danger:hover { background: var(--red-bg); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--gray-bg); }
.btn-sm { padding: .42rem .7rem; font-size: .82rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { padding: .85rem 1.2rem; font-size: 1rem; border-radius: 13px; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; border: 0; cursor: pointer; background: var(--gray-bg); color: var(--text-2); flex: none; }
.icon-btn:hover { text-decoration: none; }
.btn-wa { background: #1fa855; color: #fff; border-color: transparent; }
.btn-wa:hover { background: #18924a; }

/* form */
.form-grid { display: grid; gap: .95rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: span 2; } }
.field label, .label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: .35rem; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.input, select.input, textarea.input {
  width: 100%; padding: .68rem .85rem; border: 1px solid var(--border-strong); border-radius: 11px; font: inherit; color: var(--text);
  background: #fff; transition: border-color .15s, box-shadow .15s; min-height: 44px;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(47,102,240,.15); }
.input.is-invalid { border-color: var(--red); }
.field-error { color: var(--red); font-size: .8rem; margin-top: .3rem; font-weight: 500; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 .8rem; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .85rem; }
.input-group .addon:first-child { border-radius: 11px 0 0 11px; border-right: 0; }
.input-group .addon:last-child { border-radius: 0 11px 11px 0; border-left: 0; }
.input-group .input { border-radius: 0; }
.input-group .input:first-child { border-radius: 11px 0 0 11px; }
.input-group .input:last-child { border-radius: 0 11px 11px 0; }
.input-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue-600); }
.form-actions { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1.2rem; }
@media (max-width: 719px) { .form-actions .btn { flex: 1; } }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--gray-bg); border-radius: 12px; padding: 4px; gap: 4px; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; text-align: center; padding: .55rem .5rem; border-radius: 9px; font-weight: 600; font-size: .88rem; color: var(--text-2); cursor: pointer; }
.segmented input:checked + span { background: #fff; color: var(--blue-600); box-shadow: var(--shadow-sm); }

/* filter bar */
.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar .search { flex: 1 1 220px; position: relative; }
.toolbar .search .ic { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.toolbar .search .input { padding-left: 2.4rem; }
.toolbar select.input { width: auto; flex: 1 1 140px; max-width: 230px; }
@media (max-width: 719px) { .toolbar select.input { max-width: none; } }

/* badge & chip */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: var(--gray-bg); color: var(--gray); }
.badge-violet { background: var(--violet-bg); color: var(--violet); }
.chips { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { padding: .42rem .85rem; border-radius: 99px; border: 1px solid var(--border-strong); background: #fff; color: var(--text-2); font-weight: 600; font-size: .83rem; white-space: nowrap; }
.chip:hover { text-decoration: none; background: var(--surface-2); }
.chip.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* tabel → kartu di mobile */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .7rem .9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table .actions { text-align: right; white-space: nowrap; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table .clickable { cursor: pointer; }
@media (max-width: 719px) {
  .table.responsive thead { display: none; }
  .table.responsive, .table.responsive tbody, .table.responsive tr, .table.responsive td { display: block; width: 100%; }
  .table.responsive tr { padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
  .table.responsive td { border: 0; padding: .16rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table.responsive td::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; flex: none; }
  .table.responsive td.primary { font-size: 1rem; font-weight: 700; justify-content: flex-start; text-align: left; padding-bottom: .3rem; }
  .table.responsive td.primary::before { display: none; }
  .table.responsive td.actions { justify-content: flex-end; padding-top: .5rem; }
  .table.responsive td.actions::before { display: none; }
  .table.responsive tfoot tr { background: var(--surface-2); }
}

/* list item ala m-banking */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: #fafbff; text-decoration: none; }
.list-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--blue-bg); color: var(--blue-600); }
.list-icon.green { background: var(--green-bg); color: var(--green); }
.list-icon.amber { background: var(--amber-bg); color: var(--amber); }
.list-icon.red { background: var(--red-bg); color: var(--red); }
.list-icon.violet { background: var(--violet-bg); color: var(--violet); }
.list-icon.gray { background: var(--gray-bg); color: var(--gray); }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 650; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-end { text-align: right; flex: none; }
.list-amount { font-weight: 700; font-variant-numeric: tabular-nums; }

/* hero beranda */
.hero {
  background: var(--grad); color: #fff; border-radius: 22px; padding: 1.25rem 1.25rem 1.1rem; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,0) 70%);
}
.hero::before {
  content: ""; position: absolute; left: -40px; bottom: -90px; width: 260px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(118,169,255,.28), rgba(255,255,255,0) 70%);
}
.hero > * { position: relative; z-index: 1; }
.hero .greet { font-size: .85rem; opacity: .85; }
.hero .hero-label { font-size: .8rem; opacity: .8; margin-top: .9rem; }
.hero .hero-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.16); }
.hero-stats .k { font-size: .72rem; opacity: .78; }
.hero-stats .v { font-weight: 700; font-size: .98rem; font-variant-numeric: tabular-nums; }

/* grid menu fitur */
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem .2rem; padding: 1rem .6rem; }
@media (min-width: 720px) { .menu-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1200px) { .menu-grid { grid-template-columns: repeat(7, 1fr); } }
.menu-item { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .55rem .2rem; border-radius: 14px; color: var(--text-2); font-size: .76rem; font-weight: 600; text-align: center; position: relative; line-height: 1.2; }
.menu-item:hover { text-decoration: none; background: var(--surface-2); }
.menu-icon { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--grad-soft); color: var(--blue-600); border: 1px solid #dfe7fb; }
.menu-icon .ic { width: 24px; height: 24px; }
.menu-item .dot { position: absolute; top: 2px; right: calc(50% - 32px); background: var(--red); color: #fff; border-radius: 99px; font-size: .66rem; padding: 0 .38rem; font-weight: 800; border: 2px solid #fff; }

/* stat */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } .stats.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .9rem 1rem; box-shadow: var(--shadow-sm); }
.stat .k { font-size: .76rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: .35rem; }
.stat .v { font-size: clamp(1rem, 4.3vw, 1.2rem); font-weight: 800; margin-top: .15rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .s { font-size: .76rem; color: var(--muted); }
.stat.accent { background: var(--grad); color: #fff; border: 0; }
.stat.accent .k, .stat.accent .s { color: rgba(255,255,255,.8); }

/* progress */
.progress { height: 8px; background: var(--gray-bg); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, #2a63ec, #0f9f6e); border-radius: 99px; }

/* detail key-value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

/* tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: .7rem .95rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .9rem; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab.active { color: var(--blue-600); border-color: var(--blue-600); }

/* alert & flash */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: .9rem; font-weight: 500; border: 1px solid transparent; }
.alert .ic { margin-top: 1px; }
.alert-success { background: var(--green-bg); color: #0a6e4c; border-color: #bfe9d7; }
.alert-error { background: var(--red-bg); color: #a32424; border-color: #f4c7c7; }
.alert-warning { background: var(--amber-bg); color: #7a4a00; border-color: #f6dcaa; }
.alert-info { background: var(--blue-bg); color: #163a9e; border-color: #cbd9fb; }
.flash-stack { position: relative; }

/* kosong */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; color: #b8c1d8; margin-bottom: .6rem; }
.empty h3 { color: var(--text); margin-bottom: .25rem; }

/* pagination */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .85rem 1rem; border-top: 1px solid var(--border); }
.pg-info { font-size: .82rem; color: var(--muted); }
.pg-links { display: flex; gap: .3rem; align-items: center; }
.pg-btn { min-width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-weight: 600; font-size: .85rem; padding: 0 .5rem; }
.pg-btn:hover { text-decoration: none; background: var(--surface-2); }
.pg-btn.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.pg-btn.disabled { opacity: .4; }
.pg-btn .ic { width: 16px; height: 16px; }
.pg-gap { color: var(--muted); padding: 0 .2rem; }

/* modal (Alpine) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(7,19,48,.5); z-index: 80; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal { background: #fff; width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h3 { margin: 0; }
.modal-body { padding: 1.15rem; }
@media (min-width: 720px) { .modal-backdrop { align-items: center; padding: 1rem; } .modal { border-radius: 20px; } }

/* peta kavling */
.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .82rem; color: var(--text-2); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: .35rem; }
.block-map { margin-top: 1rem; }
.block-map h3 { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.plot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: .45rem; }
.plot-tile {
  aspect-ratio: 1 / 1; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem; border: 1.5px solid; transition: transform .1s, box-shadow .1s; color: inherit; position: relative;
}
.plot-tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.plot-tile small { font-size: .62rem; font-weight: 600; opacity: .8; }
.plot-tile.tersedia { background: #eafaf3; border-color: #9bdcc2; color: #0a7a54; }
.plot-tile.berjalan { background: #fff4de; border-color: #f2c77b; color: #8a5300; }
.plot-tile.lunas { background: #e7eeff; border-color: #a8bff7; color: #1a43b8; }
.plot-tile.ditahan { background: #eef0f5; border-color: #cdd3df; color: #5d6680; }
.plot-tile .inv { position: absolute; top: 4px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }
.sw-tersedia { background: #9bdcc2; } .sw-berjalan { background: #f2c77b; } .sw-lunas { background: #a8bff7; } .sw-ditahan { background: #cdd3df; }

/* kwitansi & laporan cetak */
.doc { background: #fff; max-width: 760px; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.doc-head { background: var(--grad); color: #fff; padding: 1.3rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.doc-head h1 { font-size: 1.2rem; margin: 0; }
.doc-body { padding: 1.4rem 1.5rem; }
.doc-amount { background: var(--blue-50); border: 1px dashed #b9c9f3; border-radius: 14px; padding: 1rem 1.1rem; margin: 1rem 0; }
.doc-amount .v { font-size: 1.6rem; font-weight: 800; color: var(--navy-800); }
.doc-sign { display: flex; justify-content: space-between; margin-top: 2rem; gap: 2rem; text-align: center; font-size: .88rem; }
.doc-sign div { flex: 1; }
.doc-sign .line { margin-top: 3.5rem; border-top: 1px solid var(--border-strong); padding-top: .3rem; }
.doc-tools { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin: 1rem auto; max-width: 760px; }
.stamp-void { border: 3px solid var(--red); color: var(--red); font-weight: 800; padding: .3rem .8rem; border-radius: 8px; transform: rotate(-8deg); display: inline-block; letter-spacing: .1em; }

/* auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: var(--grad); position: relative; overflow: hidden; }
.auth-wrap::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); }
.auth-wrap::after { content: ""; position: absolute; width: 480px; height: 480px; left: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(120,170,255,.25), transparent 70%); }
.auth-card { position: relative; z-index: 1; background: #fff; width: 100%; max-width: 430px; border-radius: 24px; padding: 1.75rem 1.5rem; box-shadow: 0 30px 80px rgba(3,10,30,.35); }
.auth-card.wide { max-width: 620px; }
.auth-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.4rem; }
.auth-brand .brand-mark { width: 46px; height: 46px; font-size: 1.15rem; border-radius: 14px; }
.auth-brand .brand-name { font-size: 1.35rem; }
.auth-foot { text-align: center; color: rgba(255,255,255,.7); font-size: .8rem; margin-top: 1.1rem; position: relative; z-index: 1; }

/* htmx */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
#topbar-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, #7fb0ff, #fff); z-index: 100; transition: width .3s ease; box-shadow: 0 0 8px rgba(127,176,255,.8); }
body.loading #topbar-progress { width: 70%; transition: width 4s cubic-bezier(.1,.7,.2,1); }
#results.htmx-request { opacity: .55; transition: opacity .15s; }

/* utilitas jarak */
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.p-0 { padding: 0 !important; }
.divider { height: 1px; background: var(--border); margin: 1rem 0; }

/* cetak */
@media print {
  .sidebar, .bottomnav, .appbar, .doc-tools, .no-print, .acting-bar { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .page { padding: 0 !important; max-width: none; }
  body { background: #fff; }
  .doc { box-shadow: none; border-radius: 0; max-width: none; }
  .doc-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card { box-shadow: none; }
}
