* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0d9488;
  --primary-2: #0284c7;
  --primary-grad: linear-gradient(135deg, #0d9488, #0284c7);
  --danger: #e11d48;
  --success: #16a34a;
  --text: #1e293b;
  --text-soft: #64748b;
  --bg: #eef3f2;
  --panel: #ffffff;
  --border: #dde6e5;
  --shadow: 0 2px 10px rgba(15, 45, 50, 0.08);
  --radius: 14px;
  --side-dark: #0e3a43;
  --side-dark-2: #072a31;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}
::-webkit-scrollbar-thumb {
  background: rgba(14, 58, 67, 0.35);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 58, 67, 0.55);
}

/* ================= NAVBAR ATAS ================= */
#sidebar {
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--side-dark) 0%, #0a2f38 55%, var(--side-dark-2) 100%);
  color: #eaf6f4;
  box-shadow: 0 4px 20px rgba(7, 42, 49, 0.28);
}

#main {
  flex: 1;
  padding: 20px 26px 28px;
  overflow-x: hidden;
  max-width: 1680px;
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 18px 4px 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}
.brand-mark svg {
  width: 20px;
  height: 20px;
}
.brand-text {
  min-width: 0;
}
.brand-title {
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 1.4px;
  color: #7ce8dc;
  white-space: nowrap;
}
.brand-sub {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(234, 246, 244, 0.55);
  white-space: nowrap;
}

#nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  padding: 2px 0;
  flex: 1;
}
.nav-section {
  display: none;
}
.nav-item,
.nav-group-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  color: rgba(234, 246, 244, 0.84);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav-item:hover,
.nav-group-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.nav-item.active {
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

/* ------------- Grup / dropdown ------------- */
.nav-group {
  position: relative;
}
.nav-group-btn {
  font-weight: 600;
  letter-spacing: 0.2px;
}
.nav-group.active .nav-group-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(124, 232, 220, 0.35);
}
.caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.2s ease;
}
.nav-group.open .caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(7, 42, 49, 0.28);
  border: 1px solid rgba(7, 42, 49, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 70;
}
.nav-group.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.nav-dropdown-item:hover {
  background: #f0f7f6;
  color: var(--primary);
  padding-left: 16px;
}
.nav-dropdown-item.active {
  background: linear-gradient(135deg, #0d9488, #0284c7);
  color: #fff;
  font-weight: 600;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 4px 0 4px 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}
.user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #7ce8dc, #0d9488);
  color: #04302c;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}
.user-meta {
  min-width: 0;
  margin-right: 4px;
}
.user-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.user-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(234, 246, 244, 0.55);
  white-space: nowrap;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(234, 246, 244, 0.88);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(124, 232, 220, 0.5);
  color: #ffffff;
}

/* ================= MAIN (halaman: polos, tipis, warna menyesuaikan) ================= */
.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 13px 20px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
#topbar h1 {
  font-size: 18px;
  letter-spacing: 0.3px;
  color: var(--primary);
  white-space: nowrap;
  margin: 0;
}
.topbar-sub {
  font-size: 12.5px;
  color: var(--text-soft);
  padding-left: 12px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-sub:empty {
  display: none;
}
.topbar-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6f6f4, #e4f0fb);
  color: #0e5c4f;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.topbar-period .ico {
  width: 14px;
  height: 14px;
}
.btn .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}
#topbarExtra {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}
#topbarExtra input[type="month"] {
  width: auto;
  min-width: 150px;
  flex-shrink: 0;
}
#topbarExtra .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.page {
  animation: pageIn 0.3s ease;
}
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ================= KARTU (dashboard) ================= */
.section-title {
  margin: 8px 2px 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.5), transparent);
}

.rekap-block {
  margin-top: 24px;
}
.rekap-block tbody td {
  color: #0e4f48;
  font-weight: 800;
}
.rekap-block .cell-danger {
  color: var(--danger);
  font-weight: 800;
}
.rekap-block .section-title .rekap-saldo {
  order: 3;
  margin-left: 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: right;
  white-space: nowrap;
}
.rekap-block .section-title .rekap-saldo b {
  color: var(--text);
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(15, 45, 50, 0.14);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #0d9488, #0284c7, #7c3aed);
}
.card .card-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.card .card-value {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.card .card-value.danger {
  color: var(--danger);
}
.card .card-sub {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 4px;
}
.card.neg::before {
  background: linear-gradient(90deg, #e11d48, #f97316);
}
.card.pos::before {
  background: linear-gradient(90deg, #16a34a, #0d9488);
}

/* Baris centang opsi di dalam form modal */
.field-check {
  grid-column: 1 / -1;
  gap: 4px;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #2f463f;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7fbfa;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.check-line:hover {
  border-color: #9ac7bd;
}
.check-line:has(input:checked) {
  border-color: rgba(13, 148, 136, 0.5);
  background: #eef8f6;
}
.check-line input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #0d9488;
  flex: 0 0 auto;
}

/* ================= DASHBOARD (tampilan profesional & modern) ================= */
.dash-section {
  margin-top: 22px;
}
.dash-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.dash-section-head .section-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.dash-section-head .section-note,
.dash-section-head .section-link {
  margin-left: auto;
}
.section-note {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 0.2px;
}
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}
.section-link .ico {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  transition: transform 0.18s ease;
}
.section-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.24);
}
.section-link:hover .ico {
  transform: translateX(2px);
}

/* ---------- Hero ringkasan ---------- */
.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 24px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, #0c3f47 0%, #08303a 55%, #072a31 100%);
  color: #eaf6f4;
  box-shadow: 0 18px 40px rgba(7, 42, 49, 0.28);
}
.dash-hero::after {
  content: "";
  position: absolute;
  top: -60%;
  right: -8%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.45), transparent 65%);
  pointer-events: none;
}
.dash-hero > * {
  position: relative;
  z-index: 1;
}
.dash-hero-kicker {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(124, 232, 220, 0.14);
  box-shadow: inset 0 0 0 1px rgba(124, 232, 220, 0.28);
  color: #7ce8dc;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.dash-hero-title {
  margin: 12px 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(234, 246, 244, 0.72);
}
.dash-hero-title span {
  display: block;
  margin-top: 2px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
  text-transform: none;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.dash-hero-sub {
  font-size: 12.5px;
  color: rgba(234, 246, 244, 0.7);
}
.dash-hero-sub b {
  color: #7ce8dc;
  font-weight: 700;
}
.dash-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* ---------- Visual komposisi arus kas ---------- */
.flow {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}
.flow-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(234, 246, 244, 0.62);
}
.flow-total {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-transform: none;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.flow-track {
  display: flex;
  height: 34px;
  margin: 12px 0 14px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.flow-seg {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.flow-in {
  background: linear-gradient(90deg, #0d9488, #14b8a6);
}
.flow-out {
  background: linear-gradient(90deg, #f97316, #e11d48);
  justify-content: flex-end;
}
.flow-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.flow-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: rgba(234, 246, 244, 0.68);
}
.flow-legend b {
  width: 100%;
  padding-left: 16px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.flow-legend .txt-danger {
  color: #ff9db1;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dot-in {
  background: #2dd4bf;
}
.dot-out {
  background: #fb7185;
}
.dot-net {
  background: #fbbf24;
}

/* ---------- Kartu statistik ---------- */
.stat-grid {
  display: grid;
  gap: 14px;
}
.stat-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.stat-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  margin-top: 18px;
}
.stat-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.stat {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #0d9488, #0284c7);
}
.stat::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -46px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.1), transparent 70%);
  pointer-events: none;
}
.stat:hover {
  transform: translateY(-3px);
  border-color: #bcd8d4;
  box-shadow: 0 12px 30px rgba(15, 45, 50, 0.13);
}
.stat-pos::before {
  background: linear-gradient(180deg, #16a34a, #0d9488);
}
.stat-pos::after {
  background: radial-gradient(circle, rgba(22, 163, 74, 0.13), transparent 70%);
}
.stat-neg::before {
  background: linear-gradient(180deg, #e11d48, #f97316);
}
.stat-neg::after {
  background: radial-gradient(circle, rgba(225, 29, 72, 0.12), transparent 70%);
}
.stat-accent::before {
  background: linear-gradient(180deg, #0284c7, #7c3aed);
}
.stat-accent::after {
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 70%);
}
.stat-top {
  display: flex;
  align-items: center;
  gap: 11px;
}
.stat-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: linear-gradient(135deg, #e6f6f4, #e4f0fb);
  color: var(--primary);
}
.stat-ico .ico {
  width: 20px;
  height: 20px;
}
.stat-pos .stat-ico {
  background: linear-gradient(135deg, #e3f7ec, #ddf3ef);
  color: #15803d;
}
.stat-neg .stat-ico {
  background: linear-gradient(135deg, #ffe9ed, #fff0e3);
  color: #be123c;
}
.stat-accent .stat-ico {
  background: linear-gradient(135deg, #e2edfd, #ede9fe);
  color: #6d28d9;
}
.stat-head-text {
  min-width: 0;
}
.stat-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--text-soft);
}
.stat-desc {
  font-size: 11.5px;
  color: #8aa099;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f6f5;
  color: #4c6b63;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.stat-pill .ico {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.pill-ok {
  background: #e4f7ec;
  color: #15803d;
}
.pill-bad {
  background: #ffe6ec;
  color: #be123c;
}
.pill-in {
  background: rgba(45, 212, 191, 0.16);
  color: #9df3e4;
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.3);
}
.pill-out {
  background: rgba(251, 113, 133, 0.16);
  color: #ffc3cd;
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.3);
}
.stat-meter {
  height: 6px;
  border-radius: 999px;
  background: #eef3f2;
  overflow: hidden;
}
.stat-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0d9488, #0284c7);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-neg .stat-meter > span {
  background: linear-gradient(90deg, #f97316, #e11d48);
}

/* ---------- Kartu rekening bank ---------- */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.bank-card {
  position: relative;
  overflow: hidden;
  padding: 16px 18px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}
.bank-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(15, 45, 50, 0.13);
}
.bank-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bank-ico {
  background: linear-gradient(135deg, #0e3a43, #0d9488);
  color: #d8f6f1;
}
.bank-id {
  min-width: 0;
  flex: 1;
}
.bank-name {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bank-no {
  font-family: Consolas, "Courier New", monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-soft);
}
.bank-holder {
  font-size: 11.5px;
  color: #8aa099;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bank-saldo {
  text-align: right;
  flex: 0 0 auto;
}
.bank-saldo span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bank-saldo b {
  font-size: 16px;
  font-weight: 800;
  color: #0e4f48;
  font-variant-numeric: tabular-nums;
}
.bank-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 10px;
}
.bank-metrics > div {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f6faf9;
}
.bank-metrics span {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-soft);
}
.bank-metrics b {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: #1e3a34;
  font-variant-numeric: tabular-nums;
}
.txt-in {
  color: #15803d !important;
}
.txt-out {
  color: #be123c !important;
}
.txt-danger {
  color: var(--danger) !important;
}
.bank-bar {
  height: 6px;
  border-radius: 999px;
  background: #fee2e2;
  overflow: hidden;
}
.bank-bar-in {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #0d9488);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.bank-card-total {
  background: linear-gradient(135deg, #f4fbfa, #eef6f5);
  border-color: #c9e2dd;
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.14);
}
.bank-card-total .bank-metrics > div {
  background: #ffffff;
}

/* ---------- Utilitas ---------- */
.dash-section .empty-state {
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 30px 20px;
}
.dash-section .table-wrap {
  max-height: none;
}

@media (max-width: 1080px) {
  .dash-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }
}
@media (max-width: 720px) {
  .flow-legend {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .flow-legend b {
    display: inline;
    width: auto;
    padding-left: 0;
  }
  .flow-legend li {
    justify-content: space-between;
  }
  .bank-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .stat-value {
    font-size: 20px;
  }
  .dash-hero-title span {
    font-size: 24px;
  }
}

/* ================= TOOLBAR & TOMBOL ================= */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar label {
  font-size: 12px;
  font-weight: 800;
  color: #3f5f57;
  letter-spacing: 0.4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 5px 16px rgba(13, 148, 136, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 7px 22px rgba(13, 148, 136, 0.42);
}
.btn-success {
  background: linear-gradient(135deg, #16a34a, #0d9488);
  color: #fff;
  box-shadow: 0 5px 16px rgba(22, 163, 74, 0.3);
}
.btn-danger {
  background: linear-gradient(135deg, #e11d48, #f97316);
  color: #fff;
  box-shadow: 0 5px 16px rgba(225, 29, 72, 0.3);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f7fbfb;
}
.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 9px;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
.btn-icon {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-soft);
  transition: color 0.2s;
}
.btn-icon:hover {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: all 0.18s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
}
select {
  cursor: pointer;
}

input.fmt-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ================= SEARCH COMBOBOX (pilih akun) ================= */
.search-combo {
  position: relative;
}
.search-combo-input {
  width: 100%;
}
.search-combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 240px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 45, 50, 0.18);
  padding: 4px;
}
.search-combo-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #2f463f;
  cursor: pointer;
}
.search-combo-item:hover,
.search-combo-item.hl {
  background: #e7f6f3;
  color: #0e5c4f;
}
.search-combo-item .sc-code {
  color: #7d9189;
  font-size: 11.5px;
  font-family: Consolas, "Courier New", monospace;
}
.search-combo-empty {
  padding: 10px;
  font-size: 12.5px;
  color: #8aa099;
  text-align: center;
}
.search-combo.clearable .search-combo-input {
  padding-right: 30px;
}
.sc-clear {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  z-index: 2;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #eef4f2;
  color: #5b7268;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.sc-clear:hover {
  background: #d9e8e3;
  color: #0e5c4f;
}
.toolbar .search-combo {
  width: 380px;
  max-width: 100%;
}

/* ================= MODAL KONFIRMASI (Ya/Tidak) ================= */
.modal-confirm {
  max-width: 400px;
}
.modal-confirm .modal-body p {
  margin: 0;
  font-size: 14px;
  color: #3f524c;
  line-height: 1.6;
}
.modal-confirm .modal-head {
  border-bottom: 2px solid #f3d9d9;
}
.modal-confirm .btn-danger:disabled {
  opacity: 0.65;
  cursor: progress;
}

/* ================= MODAL EXPORT LEDGER (pilih akun) ================= */
.modal-ledger-export {
  max-width: 520px;
}
.modal-ledger-export .modal-body {
  overflow: visible;
}
.ledger-export-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #4a635b;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f2f7f6;
  border-radius: 10px;
  line-height: 1.45;
}
.ledger-export-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 54px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  background: #2f5d50;
}
.ledger-export-badge.is-pdf {
  background: #b45309;
}
.ledger-export-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.ledger-export-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid #d5e3de;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.ledger-export-opt:hover {
  border-color: #2f5d50;
  background: #f7fbf9;
}
.ledger-export-opt.is-active,
.ledger-export-opt:has(input:checked) {
  border-color: #2f5d50;
  background: #eef6f3;
  box-shadow: 0 0 0 1px #2f5d50;
}
.ledger-export-opt input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #2f5d50;
  cursor: pointer;
}
.ledger-export-opt-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ledger-export-opt-body b {
  font-size: 13.5px;
  color: #1f3a33;
}
.ledger-export-opt-body small {
  font-size: 12px;
  color: #6b827a;
  line-height: 1.4;
}
.ledger-export-acc {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f7fbf9;
  border: 1px solid #d5e3de;
  border-radius: 12px;
}
.ledger-export-acc-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #3f5f57;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.ledger-export-acc .search-combo {
  width: 100%;
  position: relative;
  z-index: 5;
}
.ledger-export-acc .search-combo-list {
  z-index: 120;
  max-height: 220px;
}

/* ================= MENU CETAK LAPORAN ================= */
.modal-print {
  max-width: 460px;
}
.print-note {
  font-size: 12px;
  color: #6b827a;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f2f7f6;
  border-radius: 8px;
  line-height: 1.5;
}
.print-period-label {
  font-size: 12px;
  font-weight: 800;
  color: #3f5f57;
}
.print-period {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 6px 0;
}
.print-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px dashed #e3ece9;
}
.print-row:last-child {
  border-bottom: none;
}
.print-label {
  font-size: 13px;
  font-weight: 600;
  color: #2f463f;
}
.print-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ================= LAPORAN AKUNTANSI (Ledger / Jurnal / Neraca) ================= */
.ledger-block {
  margin-bottom: 22px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d5e3de;
}
.ledger-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.ledger-block-title {
  font-size: 14px;
  font-weight: 800;
  color: #1f3a33;
  margin: 4px 0 8px;
  letter-spacing: 0.2px;
}
.ledger-info {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  margin-top: 12px;
  font-size: 14px;
}
.ledger-info .ledger-info-right {
  margin-left: auto;
  font-size: 13px;
}
.neraca-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.neraca-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  animation: pageIn 0.3s ease;
}
.neraca-box h3 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 14px;
  letter-spacing: 0.4px;
}
.neraca-box table {
  width: 100%;
}
.neraca-footer {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 800;
  font-size: 13px;
}
.neraca-footer.ok {
  color: #0e5c4f;
  background: #e9f4f2;
  border-color: #bfd9d4;
}
.neraca-footer.bad {
  color: #a33a3a;
  background: #fdeeee;
  border-color: #eccaca;
}
.neraca-note {
  margin-top: 14px;
  background: #fff8e6;
  border: 1px solid #ecd9a8;
  border-left: 4px solid #d9a41a;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 12.5px;
  color: #5c4a14;
  white-space: pre-line;
}
.neraca-note-title {
  font-weight: 800;
  color: #8a6d0b;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.neraca-note-line {
  margin: 2px 0;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
tbody tr.section-row td {
  background: #f0f6f5;
  color: #0e4f48;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 11px;
  border-bottom: 1px solid #cfdfdc;
}
tr.laba-row td {
  background: #dfeee9;
  color: #0e5c4f;
}
tr.laba-row.rugi td {
  background: #fdeeee;
  color: #a33a3a;
}
/* ================= NERACA (gaya laporan keuangan perusahaan) ================= */
.meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  color: var(--text-soft);
  box-shadow: var(--shadow);
}
.meta-bar .meta-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta-bar .meta-right .btn {
  flex-shrink: 0;
}
.search-empty-row td {
  padding: 20px 12px !important;
}
.table-wrap.np-table {
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
  max-height: calc(100vh - 360px);
}
.table-wrap.np-table thead th {
  border-radius: 0;
}
.np-note {
  margin-top: 14px;
  padding: 10px 14px;
  background: #f4faf8;
  border-left: 3px solid #0d9488;
  border-radius: 6px;
  font-size: 12px;
  color: #5c756c;
  line-height: 1.6;
}
.neraca-paper {
  width: 100%;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 36px 42px;
  animation: pageIn 0.3s ease;
}
.np-head {
  text-align: center;
  margin-bottom: 24px;
}
.np-company {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #2f5d50;
}
.np-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #123a35;
  margin: 8px 0 4px;
}
.np-period {
  font-size: 12.5px;
  color: #3f524c;
}
.np-unit {
  font-size: 10.5px;
  color: #7d9189;
  margin-top: 4px;
  letter-spacing: 0.4px;
}
.np-section {
  margin-bottom: 18px;
}
.np-sec-title {
  font-size: 12px;
  font-weight: 800;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-bottom: 2px solid #0d9488;
  padding-bottom: 5px;
  margin-bottom: 6px;
}
.np-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 2px;
  font-size: 13.5px;
  color: #22352f;
  border-bottom: 1px solid #f0f5f4;
}
.np-row.muted {
  color: #8aa099;
  font-style: italic;
}
.np-row .np-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.np-row .np-code {
  display: inline-block;
  min-width: 64px;
  color: #7d9189;
  font-size: 12px;
  font-family: Consolas, "Courier New", monospace;
}
.np-row .np-desc {
  color: #8aa099;
  font-size: 12px;
}
.np-row .np-ndash {
  color: #a7bab4;
  padding: 0 2px;
}
.np-val {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 700;
}
.np-total {
  font-weight: 800;
  color: #0e5c4f;
  background: #f4faf8;
  padding: 9px 6px;
  margin-top: 4px;
  border-bottom: none;
}
.np-total .np-val {
  font-weight: 800;
}
.np-border-top {
  border-top: 1.5px solid #9fbfb7;
}
.np-grand {
  border-top: 2px solid #0e5c4f;
  border-bottom: 3px double #0e5c4f;
  background: #e9f4f2;
  font-size: 14px;
  padding: 11px 6px;
}
.np-grand .np-val {
  font-size: 14.5px;
}

/* ================= CHART OF ACCOUNT (tampilan profesional) ================= */
.coa-code {
  font-family: Consolas, "Courier New", monospace;
  white-space: nowrap;
  color: #33544b;
}
tr.subtotal-row td {
  background: #edf5f2;
  color: #0e5c4f;
  font-weight: 800;
  border-top: 2px solid #bfd9d4;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .neraca-grid {
    grid-template-columns: 1fr;
  }
}

.input-group {
  display: flex;
  gap: 8px;
}

/* Bar pencarian inline di baris sub-header meta-bar */
.meta-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-left: auto;
  min-width: 0;
}
.meta-search .search-ico {
  font-size: 13px;
  opacity: 0.6;
  line-height: 1;
  flex: 0 0 auto;
}
.meta-search .search-input {
  flex: 0 0 300px;
  min-width: 220px;
  width: 300px;
  padding: 6px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: inherit;
}
.meta-search .search-input:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.meta-search .search-col {
  flex: 0 0 150px;
  max-width: 150px;
  width: 150px;
  padding: 5px 8px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: inherit;
}
.meta-search .search-rek {
  flex: 0 0 190px;
  max-width: 190px;
  width: 190px;
}
.meta-search .btn {
  flex: 0 0 auto;
}
.table-wrap {
  overflow: auto;
  max-height: calc(100vh - 235px);
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: pageIn 0.3s ease;
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
/* Tabel data lebar: scroll kiri-kanan bila melebihi layar */
.table-wrap.table-scroll tbody td {
  white-space: nowrap;
}
/* Kolom teks dibatasi lebar: otomatis menjadi 2 baris */
.table-wrap.table-scroll tbody td.wrap-2-limit {
  max-width: 300px;
}
/* Kolom Akun Lawan & Catatan: lebar sama, text wrap dua baris wajar */
.table-wrap.table-scroll thead th.wrap-col,
.table-wrap.table-scroll tbody td.wrap-col {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 250px;
  max-width: 250px;
  width: 250px;
}
.table-wrap.table-scroll tbody td .clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f0f6f5;
  color: #0e4f48;
  text-align: left;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 13px 14px;
  white-space: nowrap;
  border-bottom: 2px solid #cfdfdc;
}
thead th:first-child {
  border-top-left-radius: var(--radius);
}
thead th:last-child {
  border-top-right-radius: var(--radius);
}
tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef3f2;
  font-size: 13px;
  vertical-align: middle;
  background: #fff;
}
tbody tr {
  transition: background 0.15s ease;
}
tbody tr:hover td {
  background: #f0f8f7;
}
tbody tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius);
}
tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius);
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
td.center,
th.center {
  text-align: center;
}
td.strong-col {
  font-weight: 800;
  background: #f0faf8;
  color: #0e5c4f;
}
tr:hover td.strong-col {
  background: #e7f6f3;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.bulk-check {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding-left: 10px;
  padding-right: 4px;
}
.bulk-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #c0392b;
}
.lamp-link {
  color: #0e5c4f;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(14, 92, 79, 0.4);
  cursor: pointer;
  white-space: nowrap;
}
.lamp-link:hover { color: #083f36; border-bottom-style: solid; }
.lamp-list { display: block; }
.lamp-link-stack { display: block; line-height: 1.35; margin: 1px 0; }

.rekap-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 8px;
  margin: -4px -8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #0e5c4f;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.rekap-btn::after {
  content: '\2192';
  font-weight: 800;
  transition: transform 0.15s ease;
}
.rekap-btn:hover { background: #e2f1ee; }
tr.grand-total-row td {
   position: sticky;
   bottom: 0;
   z-index: 3;
   font-weight: 800;
   background: #0e5c4f;
   color: #ffffff;
   border-top: 2px solid #0d9488;
   font-size: 13px;
   white-space: nowrap;
   box-shadow: 0 -3px 6px rgba(14, 92, 79, 0.15);
}
tr.grand-total-row td.num {
   background: #0d9488;
   color: #ffffff;
}
.rekap-btn:hover::after { transform: translateX(3px); }
.rekap-btn:active { transform: scale(0.99); }

tr.total-row td {
  position: sticky;
  bottom: 0;
  z-index: 2;
  font-weight: 800;
  background: #e9f4f2;
  color: #0e5c4f;
  border-top: 2px solid #bfd9d4;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 -3px 6px rgba(47, 93, 80, 0.08);
}
tr.keterangan-row td.keterangan-cell {
  background: #f7faf9;
  color: #5c756c;
  font-size: 12px;
  padding: 6px 12px;
  border-bottom: 1px solid #eef3f2;
  line-height: 1.5;
}
tr.keterangan-row:hover td.keterangan-cell {
  background: #f7faf9;
}
table td.num,
table td.nowrap {
  white-space: nowrap;
}

/* ================= CHIP ================= */
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.chip-asset {
  background: #e0f2fe;
  color: #0369a1;
}
.chip-liability {
  background: #fee2e2;
  color: #b91c1c;
}
.chip-equity {
  background: #ede9fe;
  color: #6d28d9;
}
.chip-revenue {
  background: #dcfce7;
  color: #15803d;
}
.chip-expense {
  background: #ffedd5;
  color: #c2410c;
}

/* Keterangan sumber data: Manual (input aplikasi) vs Auto (tarik DB luar) */
.chip-sumber {
  white-space: nowrap;
  font-weight: 700;
  border: 1px solid transparent;
}
.chip-manual {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.chip-auto {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
/* Baris yang sudah diedit manual → nilai tidak lagi mengikuti database luar */
.chip-Edited {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  white-space: nowrap;
}
.sumber-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
}
.sumber-legend .sumber-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.empty-state {
  text-align: center;
  padding: 46px;
  color: var(--text-soft);
  font-weight: 500;
}

/* ================= MODAL ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 45, 50, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 580px;
  max-width: 94vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(7, 42, 49, 0.35);
  animation: modalIn 0.25s ease;
}
.modal.dragging {
  user-select: none;
  -webkit-user-select: none;
  animation: none;
  will-change: transform;
  backface-visibility: hidden;
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: var(--primary-grad);
  color: #fff;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.modal-head h3 {
  font-size: 15px;
  letter-spacing: 0.3px;
}
.modal-head .btn-icon {
  color: rgba(255, 255, 255, 0.85);
}
.modal-head .btn-icon:hover {
  color: #fff;
}
.modal.dragging .modal-head {
  cursor: grabbing;
}
.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(90vh - 150px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  overscroll-behavior: contain;
}
.modal-foot {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: #fafcfc;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field.full {
  grid-column: 1 / -1;
}
.field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}
.field .hint {
  font-size: 11px;
  color: var(--text-soft);
}
.field.readonly input {
  background: #f1f5f4;
  color: var(--text-soft);
  border-style: dashed;
}

/* ------------- Modal Perhitungan PPh 25/29 (mode lebar) ------------- */
.modal-wide {
  width: 760px;
  max-width: 96vw;
}

.modal-jurnal {
  width: 980px;
  max-width: 96vw;
}

/* Form pembelian BKP: tabel rincian barang butuh ruang horizontal. */
.modal-pembelian {
  width: min(1180px, 96vw);
}
.modal-pembelian .modal-body {
  gap: 12px 16px;
}
.modal-pembelian .field.full .hint {
  line-height: 1.45;
}

/* ------------- Modal Riwayat Cicilan Piutang Karyawan ------------- */
.modal-cicilan {
  width: min(820px, 96vw);
}
.modal-cicilan .modal-body {
  display: block;
  max-height: calc(90vh - 170px);
}
.cicilan-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafcfc;
  font-size: 12px;
}
.cicilan-summary b {
  font-size: 13px;
}
.cicilan-summary .neg {
  color: var(--danger, #c0392b);
}
.cicilan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.cicilan-table th,
.cicilan-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cicilan-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--text-soft);
  background: #f4f8f7;
  position: sticky;
  top: 0;
  z-index: 1;
}
.cicilan-table input[type="month"],
.cicilan-table input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.cicilan-table td.num input {
  text-align: right;
}
.cicilan-table .chip {
  white-space: nowrap;
}
.cicilan-hint {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-soft);
}
.cicilan-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  line-height: 1.35;
}
.cicilan-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  white-space: nowrap;
}
.cicilan-item b {
  font-size: 11px;
  font-weight: 600;
}
.cicilan-item.is-active {
  color: var(--primary, #2f5d50);
  font-weight: 700;
}
.cicilan-item.is-active b {
  color: var(--primary, #2f5d50);
}
.cicilan-total-cell {
  vertical-align: top;
}
.cicilan-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}
.cicilan-total b {
  font-weight: 700;
}
.jurnal-head-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.jurnal-lines-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.jurnal-lines {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.jurnal-lines th,
.jurnal-lines td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 12.5px;
}
.jurnal-lines th {
  background: #f4f8f7;
  text-align: left;
  font-size: 11.5px;
}
.jurnal-lines td:nth-child(2),
.jurnal-lines td:nth-child(3),
.jurnal-lines th:nth-child(2),
.jurnal-lines th:nth-child(3) {
  width: 140px;
}
.jurnal-lines input[type="text"] {
  width: 100%;
  min-width: 0;
}
.jurnal-lines tfoot td {
  font-weight: 700;
  background: #fafcfc;
}
.jurnal-balance.ok { color: #0e7a4b; }
.jurnal-balance.bad { color: #b42318; }
.jurnal-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.jurnal-manual-list {
  margin-top: 16px;
}
.jurnal-manual-title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.jurnal-search-bar {
  margin-bottom: 12px;
}
.jurnal-search-bar .jurnal-combo {
  width: min(440px, 100%);
  flex: 1 1 280px;
}
.jurnal-search-combo {
  position: relative;
}
.jurnal-sumber-bar {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 10px;
}
.jurnal-manual-row td {
  background: #faf8ff;
}
.jurnal-add-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.np-table td[rowspan] {
  vertical-align: top;
}
.jurnal-umum-card {
  margin-top: 16px;
  padding: 0;
}
.jurnal-umum-card::before {
  display: none;
}
.jurnal-umum-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.jurnal-umum-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.jurnal-umum-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.jurnal-umum-card .table-wrap {
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.jurnal-umum-card .compute-note {
  margin: 12px 16px 16px;
}

.modal-body-wide {
  grid-template-columns: 1fr;
  display: block;
}
.compute-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.compute-head label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}
.compute-head select,
.compute-head input {
  max-width: 150px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}
.compute-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #f4faf8;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.compute-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compute-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.compute-check:hover { border-color: #9ac7bd; }
.compute-check:has(input:checked) {
  border-color: rgba(13, 148, 136, .55);
  background: #f0faf7;
}
.compute-check input[type="checkbox"] { margin-top: 3px; accent-color: #0d9488; }
.cc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-title { font-weight: 700; color: #14524a; font-size: 12.5px; }
.cc-desc { font-size: 11.5px; color: #7d9189; }
.cc-val { font-weight: 800; color: #0e5c4f; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .compute-checks { grid-template-columns: 1fr; }
}
.compute-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f4faf8;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.compute-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.compute-opts-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.compute-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.compute-table th,
.compute-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #eef3f2;
  vertical-align: top;
}
.compute-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7d9189;
  font-weight: 700;
  background: #f6faf9;
}
.compute-table td.num,
.compute-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.compute-table tr.section td {
  font-weight: 800;
  color: #0e5c4f;
  background: #eef6f4;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 11.5px;
}
.compute-table tr.total td {
  font-weight: 800;
  color: #0e5c4f;
  background: #f4faf8;
}
.compute-table tr.grand td {
  font-weight: 800;
  color: #0e5c4f;
  background: #e9f4f2;
  border-top: 2px solid #0e5c4f;
  font-size: 14px;
}
.compute-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: #f4faf8;
  border-left: 3px solid #0d9488;
  border-radius: 6px;
  font-size: 12px;
  color: #5c756c;
   line-height: 1.6;
}

/* ------------- Lampiran PDF ------------- */
input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 13px;
  color: var(--text);
  background: #f6faf9;
  border: 1px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
input[type="file"]:hover {
  border-color: var(--primary);
  background: #f0f8f7;
}
input[type="file"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.attach-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-soft);
}
.attach-remove {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
}
.attach-remove input {
  width: auto;
  margin: 0;
}
.attach-remove:has(input:disabled) {
  opacity: 0.45;
  pointer-events: none;
}
.attach-remove-in {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  font-size: 11px;
  color: #c0392b;
  cursor: pointer;
  vertical-align: middle;
}
.attach-remove-in input {
  width: auto;
  margin: 0;
}

/* ================= TOAST ================= */
.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  padding: 13px 20px;
  border-radius: 13px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  z-index: 200;
  max-width: 380px;
  box-shadow: 0 12px 36px rgba(7, 42, 49, 0.35);
  animation: toastIn 0.3s ease;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.toast.success {
  background: linear-gradient(135deg, #16a34a, #0d9488);
}
.toast.error {
  background: linear-gradient(135deg, #e11d48, #b91c1c);
}
.toast:not(.success):not(.error) {
  background: linear-gradient(135deg, #0e3a43, #072a31);
}

/* ================= NOTIFIKASI PEMBARUAN ================= */
.update-notif {
  position: fixed;
  left: 26px;
  bottom: 26px;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 400px);
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0e5c4f, #083f36);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 38px rgba(8, 63, 54, 0.42);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.update-notif.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.update-notif-icon {
  font-size: 19px;
  line-height: 1;
  color: #7fe3c9;
  animation: updateSpin 1.8s linear infinite;
}
@keyframes updateSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.update-notif-text { flex: 1; }
.update-notif-btn {
  border: none;
  border-radius: 9px;
  padding: 7px 12px;
  background: #fff;
  color: #0e5c4f;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.update-notif-btn:hover { background: #d8f0ea; }
.update-notif-btn:active { transform: scale(0.97); }
.update-notif-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.update-notif-close:hover { color: #fff; }

/* ================= AUTO LOGOUT (IDLE) ================= */
.idle-notif {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 3100;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 440px);
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #8a4b12, #5c2f0a);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 38px rgba(92, 47, 10, 0.45);
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.idle-notif.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.idle-notif-icon {
  font-size: 18px;
  line-height: 1;
  color: #ffd39b;
}
.idle-notif-text { flex: 1; }
.idle-notif-btn {
  border: none;
  border-radius: 9px;
  padding: 7px 12px;
  background: #fff;
  color: #5c2f0a;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.idle-notif-btn:hover { background: #ffe9cd; }
.idle-notif-btn:active { transform: scale(0.97); }

.hidden {
  display: none !important;
}

/* ================= LOGIN ================= */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #0b3540 0%, #072a31 100%);
}
.login-card {
  width: 380px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 34px 32px;
  animation: modalIn 0.35s ease;
}
.login-brand {
  text-align: center;
  margin-bottom: 26px;
}
.login-brand .brand-title {
  font-size: 22px;
  background: var(--primary-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-brand .brand-sub {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.login-card .field {
  margin-bottom: 15px;
}
.login-error {
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 13px;
  padding: 9px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

/* ================= SPINNER ================= */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(13, 148, 136, 0.25);
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================= IMPOR EXCEL ================= */
.modal-import .modal-body {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  gap: 14px;
}
.imp-steps {
  background: #f2f9f7;
  border: 1px solid #cfe8e2;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  counter-reset: imp;
}
.imp-step {
  font-size: 13px;
  color: #354f4a;
  line-height: 1.5;
  padding-left: 26px;
  position: relative;
}
.imp-step::before {
  content: counter(imp);
  counter-increment: imp;
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0d9488;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.imp-step b {
  color: #0f5b4e;
}
.imp-status {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.imp-result {
  padding: 0 20px 14px;
}
.imp-summary {
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 10px;
  text-align: center;
}
.imp-summary.ok {
  background: #e8f7f0;
  border: 1px solid #a8dfc5;
}
.imp-summary.warn {
  background: #fdf3e0;
  border: 1px solid #f0cf9a;
}
.imp-count {
  font-size: 32px;
  font-weight: 800;
  color: #0f5b4e;
}
.imp-summary.warn .imp-count {
  color: #b26a09;
}
.imp-count-label {
  font-size: 13px;
  color: #3f524c;
}
.imp-errors {
  background: #fdf6f3;
  border: 1px solid #efc9bb;
  border-radius: 10px;
  padding: 10px 14px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.imp-err-head {
  font-weight: 700;
  font-size: 12px;
  color: #a2453b;
}
.imp-err {
  font-size: 12px;
  color: #5b4a45;
  line-height: 1.5;
}
.imp-result:empty {
  display: none;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1180px) {
  #topbar {
    flex-wrap: wrap;
  }
  #topbarExtra {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
  }
  .topbar-sub {
    display: none;
  }
}
@media (max-width: 900px) {
  #main {
    padding: 16px;
  }
  #sidebar {
    flex-wrap: wrap;
    padding: 10px 14px;
  }
  .brand {
    padding-right: 10px;
  }
  .user-meta,
  .brand-sub {
    display: none;
  }
  #nav {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .modal-body {
    grid-template-columns: 1fr;
  }
  .modal {
    width: 96vw;
  }
}

/* ================= TBS MULTI-LINE DETAIL (sesuai mockup invoice) ================= */
.tbs-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  white-space: normal !important;
  line-height: 1.35;
  text-align: left;
}
.tbs-line {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #1e3a34;
  text-align: left;
}
.tbs-kg {
  font-weight: 700;
  color: #0e5c4f;
}
.tbs-tgl {
  font-weight: 500;
  color: #7a958d;
  font-size: 12px;
}
.tbs-total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0e5c4f;
  white-space: nowrap;
}
/* TBS (kg): header + data rata kiri */
.table-wrap.table-scroll thead th.c-kg_basah,
.table-wrap.table-scroll thead th.align-left,
.table-wrap.table-scroll tbody td.c-kg_basah,
.table-wrap.table-scroll tbody td.align-left {
  text-align: left !important;
}
/* Izinkan stack multi-baris di dalam sel tabel scroll */
.table-wrap.table-scroll tbody td.c-kg_basah,
.table-wrap.table-scroll tbody td.c-harga_per_kg,
.table-wrap.table-scroll tbody td.c-dpp,
.table-wrap.table-scroll tbody td.c-ppn {
  white-space: normal;
  vertical-align: top;
}
.table-wrap.table-scroll tbody td.c-periode,
.table-wrap.table-scroll tbody td.c-pembeli,
.table-wrap.table-scroll tbody td.c-no_dokumen,
.table-wrap.table-scroll tbody td.c-total {
  vertical-align: middle;
}
.periode-single,
.periode-range {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.periode-range {
  color: #0e5c4f;
  font-weight: 600;
}

/* ---------- Editor rincian TBS di modal Edit ---------- */
.tbs-detail-editor {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbfa;
  padding: 10px;
}
.tbs-detail-head {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.1fr 1.1fr 1.1fr 36px;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #0e4f48;
  margin-bottom: 6px;
  padding: 0 2px;
}
.tbs-detail-head span:first-child {
  text-align: left;
}
.tbs-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tbs-detail-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.1fr 1.1fr 1.1fr 36px;
  gap: 6px;
  align-items: center;
}
.tbs-detail-row input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.tbs-detail-row input.tbs-in-kg {
  text-align: left;
  font-weight: 700;
}
.tbs-detail-row .tbs-out-dpp,
.tbs-detail-row .tbs-out-ppn {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0e5c4f;
  font-size: 12px;
  text-align: right;
  padding: 0 4px;
}
.tbs-detail-row .tbs-row-del {
  padding: 4px 0;
  min-width: 32px;
}
.tbs-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
@media (max-width: 720px) {
  .tbs-detail-head,
  .tbs-detail-row {
    grid-template-columns: 1fr 1fr;
  }
  .tbs-detail-head span:nth-child(n+5),
  .tbs-detail-row .tbs-out-dpp,
  .tbs-detail-row .tbs-out-ppn {
    display: none;
  }
}

/* ---------- Editor rincian Barang di modal Tambah/Edit Pembelian BKP ----------
   Kolom: Nama Barang | Jumlah | Satuan | Harga/Satuan | Total | PBBKB | hapus */
.pembelian-detail-editor {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbfa;
  padding: 12px;
  overflow-x: auto;
}
.pembelian-detail-head,
.pembelian-detail-row {
  display: grid;
  grid-template-columns: minmax(280px, 2.6fr) 96px 110px 150px 150px 78px 36px;
  gap: 8px;
  align-items: center;
  min-width: 920px;
}
.pembelian-detail-head {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  color: #0e4f48;
  margin-bottom: 8px;
  padding: 0 2px 6px;
  border-bottom: 1px solid #d7e6e3;
}
.pembelian-detail-head span:first-child,
.pembelian-detail-head span:nth-child(3) {
  text-align: left;
}
.pembelian-detail-head span:nth-child(2),
.pembelian-detail-head span:nth-child(4),
.pembelian-detail-head span:nth-child(5) {
  text-align: right;
}
.pembelian-detail-head span:nth-child(6) {
  text-align: center;
}
.pembelian-detail-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pembelian-detail-row input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.pembelian-detail-row .pb-satuan-combo {
  position: relative;
  min-width: 0;
}
.pembelian-detail-row .pb-satuan-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 80;
  width: max(100%, 180px);
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15, 45, 50, 0.18);
}
.pembelian-detail-row .pb-satuan-item,
.pembelian-detail-row .pb-satuan-empty {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #2f463f;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.pembelian-detail-row .pb-satuan-item:hover,
.pembelian-detail-row .pb-satuan-item.hl {
  background: #e7f6f3;
  color: #0e5c4f;
}
.pembelian-detail-row .pb-satuan-custom {
  color: #0e5c4f;
  font-weight: 700;
}
.pembelian-detail-row .pb-satuan-empty {
  color: #8aa099;
  font-size: 12px;
  text-align: center;
  cursor: default;
}
.pembelian-detail-row .pb-in-jumlah,
.pembelian-detail-row .pb-in-harga {
  text-align: right;
  font-weight: 700;
}
.pembelian-detail-row .pb-out-total {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: #0e5c4f;
  font-size: 12px;
  text-align: right;
  padding: 0 4px;
}
.pembelian-detail-row .pb-in-pbbkb {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #0e4f48;
  cursor: pointer;
  white-space: nowrap;
}
.pembelian-detail-row .pb-in-pbbkb input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}
.pembelian-detail-row .pb-row-del {
  padding: 4px 0;
  min-width: 32px;
}
.pembelian-detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}
@media (max-width: 860px) {
  .pembelian-detail-head,
  .pembelian-detail-row {
    grid-template-columns: 1fr 1fr;
  }
  .pembelian-detail-head span:nth-child(n+5),
  .pembelian-detail-row .pb-out-total {
    display: none;
  }
  .pembelian-detail-row .pb-in-pbbkb {
    grid-column: 1 / -1;
  }
}
