
/* KDMP ERP - Pendowo Asri
   Stylesheet utama + modul akuntansi dan rekonsiliasi bank
*/

:root {
  --red: #ff002d;
  --dark: #bd001f;
  --bg: #f5f6fa;
  --white: #ffffff;
  --text: #252a34;
  --muted: #858b98;
  --border: #eceef2;
  --green: #159765;
  --blue: #3478db;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* LAYOUT */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 255px;
  background: #fff;
  border-right: 1px solid var(--border);
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 23px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: bold;
  font-size: 17px;
}

.brand h2 {
  margin: 0;
  font-size: 16px;
  color: var(--red);
}

.brand p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.menu-title {
  padding: 23px 20px 10px;
  color: #a1a5ae;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
}

.menu {
  padding: 0 12px 20px;
}

.menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #666d79;
  text-align: left;
  font-size: 13px;
  margin-bottom: 4px;
}

.menu button:hover,
.menu button.active {
  background: #fff0f1;
  color: var(--red);
}

.menu button.active {
  font-weight: bold;
}

.menu-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
  flex: 0 0 20px;
}

/* MAIN / HEADER */

.main {
  margin-left: 255px;
  width: calc(100% - 255px);
  min-width: 0;
}

.topbar {
  height: 75px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.topbar h2 {
  margin: 0;
  font-size: 18px;
}

.topbar p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffe3e5;
  color: var(--red);
  display: grid;
  place-items: center;
  font-weight: bold;
}

.user-info {
  font-size: 12px;
  font-weight: bold;
}

.user-info small {
  display: block;
  color: var(--muted);
  font-weight: normal;
  margin-top: 4px;
}

.mobile-menu {
  display: none;
  border: 0;
  background: transparent;
  font-size: 23px;
}

.content {
  padding: 30px;
  max-width: 1600px;
  margin: auto;
}

/* DASHBOARD */

.welcome {
  margin-bottom: 25px;
}

.welcome h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.welcome p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 21px;
  min-width: 0;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
  gap: 8px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
}

.red-bg {
  background: #fff0f1;
}

.green-bg {
  background: #e8f8f0;
}

.blue-bg {
  background: #edf3ff;
}

.orange-bg {
  background: #fff4e8;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-card h3 {
  margin: 0 0 9px;
  font-size: 21px;
  overflow-wrap: anywhere;
}

.stat-note {
  font-size: 11px;
  color: var(--muted);
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

/* PANELS */

.panels {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  min-width: 0;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 10px;
}

.panel-header h3 {
  margin: 0;
  font-size: 15px;
}

.panel-header p {
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.period {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  color: var(--text);
}

.chart {
  height: 190px;
  display: flex;
  align-items: end;
  justify-content: space-around;
  border-bottom: 1px solid var(--border);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 46px,
    #f0f1f4 47px
  );
  padding: 10px 5px 0;
}

.chart-group {
  height: 100%;
  display: flex;
  align-items: end;
  gap: 5px;
  position: relative;
}

.bar {
  width: 12px;
  border-radius: 4px 4px 0 0;
}

.bar.income {
  background: var(--red);
}

.bar.expense {
  background: #f2a3aa;
}

.chart-label {
  position: absolute;
  bottom: -23px;
  font-size: 10px;
  color: var(--muted);
  left: 50%;
  transform: translateX(-50%);
}

.legend {
  display: flex;
  gap: 18px;
  margin-top: 35px;
  font-size: 11px;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}

.quick-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.quick-menu button {
  padding: 15px 10px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 9px;
  text-align: left;
  font-size: 12px;
  color: var(--text);
}

.quick-menu button:hover {
  border-color: var(--red);
  background: #fff8f8;
}

.quick-menu span {
  display: block;
  font-size: 20px;
  margin-bottom: 9px;
}

/* TABLES */

.table-wrap,
.erp-table-wrap,
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
}

th {
  background: #fafafa;
  color: #777e8b;
  font-size: 11px;
  font-weight: bold;
  text-align: left;
  padding: 14px 12px;
}

td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.status {
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: bold;
}

.status.success {
  color: #128452;
  background: #e6f7ef;
}

.status.pending {
  color: #bd791d;
  background: #fff4df;
}

.module-page {
  display: none;
}

.empty-state {
  padding: 65px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-state .big-icon {
  font-size: 45px;
  margin-bottom: 15px;
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 9px;
}

footer {
  padding: 25px 30px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* LOGIN */

#loginScreen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f5f6fa;
  font-family: Arial, sans-serif;
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: #fff;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}

.login-logo {
  width: 58px;
  height: 58px;
  background: #ff002d;
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
}

.login-card h2 {
  color: #222;
  margin: 0 0 8px;
}

.login-card p {
  color: #777;
  font-size: 14px;
  margin: 0 0 25px;
}

.login-card label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin: 15px 0 7px;
  color: #444;
}

.login-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
}

.login-card button {
  width: 100%;
  padding: 14px;
  margin-top: 22px;
  border: 0;
  border-radius: 8px;
  background: #ff002d;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
}

.login-card button:disabled {
  opacity: .6;
  cursor: wait;
}

#loginError {
  color: #ff002d;
  font-size: 13px;
  margin-top: 14px;
}

#logoutButton {
  border: 1px solid #ddd;
  background: #fff;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  margin-left: 15px;
}

/* ERP MODULES */

.erp-content {
  margin-top: 25px;
  width: 100%;
}

.erp-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.erp-button {
  background: #ff002d;
  color: #fff;
  border: 0;
  padding: 11px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.erp-button:disabled {
  opacity: .6;
  cursor: wait;
}

.erp-button.secondary {
  background: #eee;
  color: #444;
}

.erp-form {
  display: none;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.erp-form h3 {
  margin-top: 0;
}

.erp-field label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 7px;
  color: #555;
}

.erp-field input,
.erp-field select,
.erp-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 11px;
  border: 1px solid #ddd;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
}

.erp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.erp-table-wrap {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
}

.erp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

.erp-table th,
.erp-table td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 13px;
  white-space: nowrap;
}

.erp-table th {
  background: #fafafa;
  color: #555;
}

.erp-table tr:last-child td {
  border-bottom: 0;
}

.erp-message {
  font-size: 13px;
  margin: 12px 0;
}

.erp-error {
  color: #ff002d;
}

.erp-success {
  color: #18743b;
}

.erp-muted {
  color: #777;
  font-size: 13px;
}

.erp-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.erp-actions button {
  border: 0;
  border-radius: 7px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: bold;
}

.financial-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.financial-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
}

.financial-card small {
  display: block;
  color: #777;
  margin-bottom: 10px;
}

.financial-card strong {
  color: #ff002d;
  font-size: 21px;
}

.journal-line {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 1fr 1fr auto;
  gap: 9px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.journal-line .erp-field {
  min-width: 0;
}

.journal-line input,
.journal-line select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.journal-remove {
  border: 0;
  background: #fee;
  color: #ff002d;
  padding: 10px;
  border-radius: 7px;
}

/* BANK RECONCILIATION */

#bankContent {
  width: 100%;
  max-width: 1200px;
  margin: 24px auto;
  color: #292929;
}

#bankContent .erp-card {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(0,0,0,.035);
}

#bankContent h2 {
  margin: 0 0 10px;
  color: #ff002d;
  font-size: 22px;
}

#bankContent h3 {
  margin: 0 0 16px;
  color: #333;
  font-size: 18px;
}

#bankContent p {
  color: #777;
  line-height: 1.6;
  font-size: 14px;
}

#bankContent .form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
  margin: 22px 0;
}

#bankContent .form-grid label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 13px;
  font-weight: 600;
}

#bankContent .erp-input {
  display: block;
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 14px;
  outline: none;
}

#bankContent .erp-input:focus {
  border-color: #ff002d;
  box-shadow: 0 0 0 3px rgba(167,25,37,.08);
}

#bankContent .btn-primary {
  display: inline-block;
  padding: 12px 19px;
  border: 0;
  border-radius: 8px;
  background: #ff002d;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#bankContent .btn-primary:hover {
  background: #86131d;
}

#bankContent .financial-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 15px;
  margin: 20px 0;
}

#bankContent .summary-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #eee;
  border-radius: 11px;
  background: #fffafa;
}

#bankContent .summary-card span {
  display: block;
  margin-bottom: 10px;
  color: #777;
  font-size: 13px;
}

#bankContent .summary-card h3 {
  margin: 0;
  color: #ff002d;
  font-size: 19px;
  overflow-wrap: anywhere;
}

#bankContent .table-responsive {
  width: 100%;
  margin: 16px 0 20px;
  overflow-x: auto;
  border: 1px solid #eee;
  border-radius: 10px;
}

#bankContent .erp-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: #fff;
}

#bankContent .erp-table th,
#bankContent .erp-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
  font-size: 13px;
  white-space: nowrap;
}

#bankContent .erp-table th {
  background: #fafafa;
  color: #555;
  font-weight: 700;
}

#bankContent .erp-table tr:last-child td {
  border-bottom: 0;
}

#bankContent .error {
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff0f0;
  color: #ff002d;
  font-size: 13px;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 30px #0002;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  .topbar {
    padding: 0 17px;
    height: 65px;
  }

  .mobile-menu {
    display: block;
  }

  .content {
    padding: 22px 15px;
  }

  .welcome h1 {
    font-size: 21px;
  }

  .stats {
    gap: 10px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-card h3 {
    font-size: 16px;
  }

  .stat-label {
    font-size: 10px;
  }

  .top-actions {
    gap: 8px;
  }

  .user-info {
    display: none;
  }

  .panel {
    padding: 16px;
  }

  #bankContent .erp-card {
    padding: 17px;
  }

  #bankContent .form-grid,
  #bankContent .financial-summary {
    grid-template-columns: 1fr;
  }

  #bankContent .btn-primary {
    width: 100%;
  }

  .erp-grid,
  .financial-summary {
    grid-template-columns: 1fr;
  }

  .journal-line {
    grid-template-columns: 1fr;
  }
}

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

  .login-card {
    padding: 25px 20px;
  }
}

/* JURNAL UMUM - RIWAYAT LEBIH RINGKAS */
#journalContent .erp-table-wrap {
  overflow-x: hidden;
}

#journalContent .erp-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#journalContent .erp-table th,
#journalContent .erp-table td {
  padding: 8px 9px;
  font-size: 11px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

#journalContent .erp-table th:nth-child(1) { width: 14%; }
#journalContent .erp-table th:nth-child(2) { width: 10%; }
#journalContent .erp-table th:nth-child(3) { width: 25%; }
#journalContent .erp-table th:nth-child(4) { width: 10%; }
#journalContent .erp-table th:nth-child(5),
#journalContent .erp-table th:nth-child(6) { width: 15%; }
#journalContent .erp-table th:nth-child(7) { width: 11%; }

#journalContent .journal-detail-button {
  padding: 6px 8px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 700px) {
  #journalContent .erp-table-wrap {
    overflow-x: auto;
  }

  #journalContent .erp-table {
    min-width: 680px;
    table-layout: auto;
  }
}


/* BUKU BESAR - TABEL RINGKAS, KOLOM AKSI SELALU TERLIHAT */
#ledgerContent .ledger-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

#ledgerContent .ledger-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#ledgerContent .ledger-table th,
#ledgerContent .ledger-table td {
  padding: 8px 7px;
  font-size: 10px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

#ledgerContent .ledger-table th:nth-child(1) { width: 10%; }
#ledgerContent .ledger-table th:nth-child(2) { width: 16%; }
#ledgerContent .ledger-table th:nth-child(3) { width: 22%; }
#ledgerContent .ledger-table th:nth-child(4),
#ledgerContent .ledger-table th:nth-child(5) { width: 12%; }
#ledgerContent .ledger-table th:nth-child(6) { width: 16%; }
#ledgerContent .ledger-table th:nth-child(7) { width: 12%; }

#ledgerContent .ledger-table .journal-detail-button {
  padding: 5px 7px;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 700px) {
  #ledgerContent .ledger-table-wrap { overflow-x: hidden; }
  #ledgerContent .ledger-table { min-width: 0; table-layout: fixed; }
  #ledgerContent .ledger-table th,
  #ledgerContent .ledger-table td { padding: 6px 4px; font-size: 9px; }
  #ledgerContent .ledger-table th:nth-child(1) { width: 10%; }
  #ledgerContent .ledger-table th:nth-child(2) { width: 15%; }
  #ledgerContent .ledger-table th:nth-child(3) { width: 21%; }
  #ledgerContent .ledger-table th:nth-child(4),
  #ledgerContent .ledger-table th:nth-child(5) { width: 12%; }
  #ledgerContent .ledger-table th:nth-child(6) { width: 17%; }
  #ledgerContent .ledger-table th:nth-child(7) { width: 13%; }
  #ledgerContent .ledger-table .journal-detail-button { padding: 4px 5px; font-size: 9px; }
}


/* RUMUS EXCEL & KAMUS AKUNTANSI */
.reference-library{max-width:1200px;margin:24px auto 0;color:var(--text,#252a34)}
.reference-hero{display:flex;align-items:center;gap:18px;padding:24px;background:linear-gradient(120deg,#fff 0%,#f4f7ff 100%);border:1px solid #e6ebf4;border-radius:15px;margin-bottom:20px}
.reference-hero-icon{width:64px;height:64px;flex:0 0 64px;display:grid;place-items:center;border-radius:16px;background:#eaf1ff;font-size:30px}
.reference-eyebrow{font-size:10px;font-weight:800;letter-spacing:1.2px;color:#3478db}
.reference-hero h2{font-size:22px;margin:6px 0;color:#202a3a}
.reference-hero p{font-size:13px;line-height:1.6;color:#6d7788;margin:0;max-width:760px}
.reference-tabs{display:flex;gap:9px;margin:20px 0 15px;flex-wrap:wrap}
.reference-tab{border:1px solid #e1e5ec;background:#fff;color:#596273;border-radius:9px;padding:11px 16px;font-size:13px;font-weight:700}
.reference-tab.active{background:#ff002d;border-color:#ff002d;color:#fff}
.reference-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:12px;margin-bottom:12px}
.reference-search{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid #dfe3eb;border-radius:9px;padding:0 12px;min-width:0}
.reference-search>span{font-size:22px;color:#7b8493}.reference-search input{width:100%;min-width:0;border:0;outline:0;padding:12px 0;background:transparent;color:#252a34;font-size:13px}
.reference-search button{border:0;background:transparent;color:#7b8493;font-size:20px;padding:3px 5px}
#referenceCategory{width:100%;border:1px solid #dfe3eb;border-radius:9px;background:#fff;color:#343b49;padding:11px;font-size:13px}
.reference-meta{display:flex;justify-content:space-between;gap:10px;color:#7b8493;font-size:11px;margin:12px 2px}
.reference-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.reference-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;min-width:0;min-height:185px;padding:16px;border:1px solid #e7eaf0;border-radius:12px;background:#fff;color:#252a34;transition:border-color .18s,transform .18s,box-shadow .18s}
.reference-card:hover{border-color:#9db8ee;transform:translateY(-2px);box-shadow:0 8px 22px rgba(35,65,120,.08)}
.reference-card-top{width:100%;display:flex;justify-content:space-between;align-items:center}.reference-category{display:inline-flex;padding:5px 8px;border-radius:20px;background:#edf3ff;color:#3569b8;font-size:10px;font-weight:700}.reference-arrow{color:#8a94a5}
.reference-card strong{font-size:16px;color:#202a3a}.reference-card-description{font-size:12px;line-height:1.55;color:#697386;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.reference-card code{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:7px 9px;border-radius:7px;background:#f5f7fa;color:#ff002d;font-size:11px}
.reference-card-link{margin-top:auto;color:#ff002d;font-size:11px;font-weight:700}
.reference-empty{grid-column:1/-1;display:flex;flex-direction:column;gap:7px;align-items:center;padding:45px 15px;border:1px dashed #d9dee8;border-radius:12px;color:#737d8d;font-size:13px}.reference-empty strong{color:#313b4b}
.reference-detail{margin-top:18px;padding:22px;border:1px solid #dfe6f1;border-radius:13px;background:#fff;box-shadow:0 8px 25px rgba(30,50,90,.05)}
.reference-detail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.reference-back{border:0;background:#f2f4f8;color:#465166;border-radius:7px;padding:8px 11px;font-size:12px;font-weight:700}
.reference-detail h3{font-size:22px;margin:18px 0 8px;color:#202a3a}.reference-detail>p{font-size:13px;line-height:1.7;color:#626e80}
.reference-detail-block{display:grid;grid-template-columns:150px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 0;border-top:1px solid #edf0f4}.reference-detail-block>span{font-size:12px;font-weight:700;color:#485366}.reference-detail-block code{min-width:0;overflow-wrap:anywhere;background:#f5f7fa;border-radius:7px;padding:10px;color:#ff002d;font-size:12px}.reference-detail-block p{grid-column:2/-1;margin:0;color:#626e80;font-size:13px;line-height:1.6}.reference-detail-block button{border:1px solid #e1e5ec;background:#fff;border-radius:7px;padding:8px 10px;color:#485366;font-size:11px;font-weight:700}
.reference-note{margin-top:17px;padding:13px 15px;border:1px solid #f0e2bd;border-radius:9px;background:#fffaf0;color:#755b26;font-size:11px;line-height:1.6}
@media(max-width:900px){.reference-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.reference-hero{align-items:flex-start;padding:17px}.reference-hero-icon{width:48px;height:48px;flex-basis:48px;font-size:23px}.reference-hero h2{font-size:18px}.reference-toolbar{grid-template-columns:1fr}.reference-cards{grid-template-columns:1fr}.reference-card{min-height:0}.reference-meta{flex-direction:column}.reference-detail{padding:16px}.reference-detail-block{grid-template-columns:1fr;gap:8px}.reference-detail-block p{grid-column:1}.reference-detail-block button{justify-self:start}}


/* About DAGBOEK - Nusa Pixel */

.about-brand-card{display:flex;align-items:flex-start;gap:18px;overflow:hidden;position:relative;background:linear-gradient(135deg,#fff 0%,#fff8f8 100%);border-color:#f0d9dc}
.about-brand-mark{flex:0 0 58px;width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#ff002d,#bd001f);color:#fff;font-size:29px;font-weight:800;box-shadow:0 8px 20px rgba(137,20,34,.18)}
.about-brand-content{min-width:0}
.about-brand-eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:800;color:#ff002d}
.about-brand-content h3{font-size:25px;letter-spacing:1px;margin:5px 0 2px;color:#252a34}
.about-brand-tagline{margin:0 0 12px;font-size:12px;font-weight:700;color:#ff002d}
.about-brand-description{max-width:760px;margin:0;color:#687080;font-size:13px;line-height:1.65}
.about-brand-divider{height:1px;background:#eadde0;margin:16px 0}
.about-brand-credit{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap;margin:6px 0;font-size:12px}
.about-brand-credit span{color:#858b98;min-width:115px}
.about-brand-credit strong{color:#252a34}
.about-brand-footer{margin:14px 0 0;color:#9298a3;font-size:11px;font-style:italic}
body[data-kdmp-theme="dark"] .about-brand-card{background:linear-gradient(135deg,#202633 0%,#2b222b 100%);border-color:#45404b}
body[data-kdmp-theme="dark"] .about-brand-content h3,body[data-kdmp-theme="dark"] .about-brand-credit strong{color:#edf0f5}
body[data-kdmp-theme="dark"] .about-brand-description{color:#c0c7d2}
body[data-kdmp-theme="dark"] .about-brand-divider{background:#45404b}
@media(max-width:600px){.about-brand-card{gap:13px;padding:15px}.about-brand-mark{flex-basis:48px;width:48px;height:48px;border-radius:13px;font-size:24px}.about-brand-content h3{font-size:22px}.about-brand-credit{display:block}.about-brand-credit span{display:block;margin-bottom:2px}}



/* DAGBOEK by Nusa Pixel — modern classic enterprise identity */
:root{
  --dagboek-charcoal:#172033;
  --dagboek-charcoal-soft:#222d43;
  --dagboek-gold:#c7a65b;
  --dagboek-gold-light:#e4cf98;
  --dagboek-ivory:#f5f3ed;
}
body{font-family:"Inter",Arial,sans-serif;background:var(--dagboek-ivory)}
.brand h2,.topbar h2,.welcome h1,.panel-header h3{font-family:"Playfair Display",Georgia,serif}
.sidebar{background:var(--dagboek-charcoal);border-right:1px solid #303b50}
.brand{border-bottom-color:#303b50}
.brand-logo{background:var(--dagboek-gold);color:var(--dagboek-charcoal);border-radius:9px;box-shadow:0 5px 16px #0003}
.brand h2{color:#f6f1e5;letter-spacing:.3px}
.brand p{color:#aeb8ca}
.menu-title{color:#bba66f}
.menu button{color:#c5ccda}
.menu button:hover,.menu button.active{background:#2b354a;color:var(--dagboek-gold-light)}
.menu button.active{box-shadow:inset 3px 0 0 var(--dagboek-gold)}
.topbar{background:#fffdf8}
.topbar h2{color:#202a3c}
.avatar{background:#f0e7d0;color:#79602b}
#loginScreen{background:linear-gradient(135deg,#111a2d,#26344c)!important}
.login-card{border:1px solid #e6dcc2;box-shadow:0 24px 70px #05091466}
.login-logo{background:var(--dagboek-charcoal)!important;color:var(--dagboek-gold)!important;border:1px solid #8f7948}
.login-card h2{font-family:"Playfair Display",Georgia,serif;color:var(--dagboek-charcoal)}
.login-card button,.erp-button:not(.secondary),.settings-btn:not(.secondary){background:var(--dagboek-charcoal);color:var(--dagboek-gold-light)}
.login-card button:hover,.erp-button:not(.secondary):hover,.settings-btn:not(.secondary):hover{background:#26334b}
.menu button:focus-visible,.erp-button:focus-visible{outline:2px solid var(--dagboek-gold);outline-offset:2px}

/* Complete readable dark mode for shared ERP surfaces */
body[data-kdmp-theme="dark"]{background:#101726;color:#e9edf5}
body[data-kdmp-theme="dark"] .main,
body[data-kdmp-theme="dark"] .content{background:#101726;color:#e9edf5}
body[data-kdmp-theme="dark"] .topbar{background:#172033;border-bottom-color:#303b50}
body[data-kdmp-theme="dark"] .topbar h2,
body[data-kdmp-theme="dark"] .panel h3,
body[data-kdmp-theme="dark"] .welcome h1{color:#f0f2f7}
body[data-kdmp-theme="dark"] .topbar p,
body[data-kdmp-theme="dark"] .muted,
body[data-kdmp-theme="dark"] .erp-muted{color:#aab4c6}
body[data-kdmp-theme="dark"] .panel,
body[data-kdmp-theme="dark"] .stat-card,
body[data-kdmp-theme="dark"] .settings-card,
body[data-kdmp-theme="dark"] .erp-form,
body[data-kdmp-theme="dark"] .erp-table-wrap,
body[data-kdmp-theme="dark"] .financial-card,
body[data-kdmp-theme="dark"] .ledger-card,
body[data-kdmp-theme="dark"] .report-card,
body[data-kdmp-theme="dark"] .invoice-card,
body[data-kdmp-theme="dark"] .loan-panel,
body[data-kdmp-theme="dark"] .arap-card,
body[data-kdmp-theme="dark"] .arap-panel,
body[data-kdmp-theme="dark"] .export-center{background:#192338;color:#e9edf5;border-color:#303d55}
body[data-kdmp-theme="dark"] .erp-table th,
body[data-kdmp-theme="dark"] .erp-table td,
body[data-kdmp-theme="dark"] table th,
body[data-kdmp-theme="dark"] table td{border-color:#303d55;color:#e1e6ef}
body[data-kdmp-theme="dark"] .erp-table th,
body[data-kdmp-theme="dark"] table th{background:#222e45;color:#e9edf5}
body[data-kdmp-theme="dark"] input,
body[data-kdmp-theme="dark"] select,
body[data-kdmp-theme="dark"] textarea{background:#101a2b;color:#e9edf5;border-color:#3a4861}
body[data-kdmp-theme="dark"] input::placeholder,
body[data-kdmp-theme="dark"] textarea::placeholder{color:#8996ad}
body[data-kdmp-theme="dark"] .menu button:hover,
body[data-kdmp-theme="dark"] .menu button.active{background:#2b354a;color:var(--dagboek-gold-light)}
body[data-kdmp-theme="dark"] .settings-help,
body[data-kdmp-theme="dark"] .settings-card p,
body[data-kdmp-theme="dark"] .report-description{color:#aab4c6}
body[data-kdmp-theme="dark"] .erp-button.secondary,
body[data-kdmp-theme="dark"] .settings-btn.secondary{background:#303d55;color:#e9edf5}
body[data-kdmp-theme="dark"] .about-brand-card{background:#202b40;border-color:#3a4861}
body[data-kdmp-theme="dark"] .about-brand-content h3,
body[data-kdmp-theme="dark"] .about-brand-credit strong{color:#edf0f5}
body[data-kdmp-theme="dark"] .about-brand-description{color:#c0c7d2}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}


/* DABU floating assistant */
.dabu-launcher{position:fixed;right:24px;bottom:24px;z-index:9990;display:flex;align-items:center;gap:10px;padding:9px 16px 9px 9px;border:1px solid #ffffff44;border-radius:999px;background:linear-gradient(110deg,#18233b,#293654);color:#f8f5ed;box-shadow:0 12px 38px #0005;cursor:pointer;font:600 12px Inter,Arial,sans-serif;transition:transform .2s,box-shadow .2s}
.dabu-launcher:hover{transform:translateY(-3px);box-shadow:0 16px 44px #0007}
.dabu-launcher-orb,.dabu-brand-orb{display:grid;place-items:center;border-radius:50%;background:linear-gradient(140deg,#f56bc1,#8662ff 55%,#39d9f5);color:white;font:700 17px "Playfair Display",Georgia,serif;box-shadow:0 0 22px #9e6bff88}
.dabu-launcher-orb{width:38px;height:38px}
.dabu-panel{position:fixed;right:24px;bottom:82px;z-index:9991;width:min(390px,calc(100vw - 28px));height:min(590px,calc(100vh - 120px));display:flex;flex-direction:column;overflow:hidden;border:1px solid #c8a85f66;border-radius:18px;background:#f7f6f1;color:#202a3c;box-shadow:0 24px 75px #0007;font-family:Inter,Arial,sans-serif}
.dabu-panel[hidden]{display:none}
.dabu-header{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;background:#172033;color:#f7f2e6;border-bottom:1px solid #c7a65b55}
.dabu-brand{display:flex;align-items:center;gap:10px}
.dabu-brand-orb{width:38px;height:38px;font-size:16px}
.dabu-brand strong{display:block;font:700 15px "Playfair Display",Georgia,serif;letter-spacing:.5px}
.dabu-brand small{display:block;margin-top:3px;color:#c7b783;font-size:8px;letter-spacing:1.5px}
.dabu-header-actions{display:flex;gap:7px}
.dabu-header-actions button{width:30px;height:30px;border:1px solid #ffffff2b;border-radius:8px;background:#ffffff0d;color:#f6f1e5;font-size:20px;cursor:pointer}
.dabu-messages{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:13px;padding:16px;background:radial-gradient(circle at 100% 0%,#e8ddc51f,transparent 45%),#f7f6f1}
.dabu-message{display:flex;flex-direction:column;max-width:91%;gap:5px}
.dabu-message.user{align-self:flex-end;align-items:flex-end}
.dabu-message.assistant{align-self:flex-start}
.dabu-bubble{padding:11px 13px;border-radius:13px;background:#e9e6dc;color:#263148;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.dabu-message.user .dabu-bubble{background:#202d46;color:#fff;border-bottom-right-radius:4px}
.dabu-message.assistant .dabu-bubble{border:1px solid #e4dcc9;background:#fffefa;border-bottom-left-radius:4px}
.dabu-speak{align-self:flex-start;border:0;background:transparent;color:#8b7137;font-size:10px;cursor:pointer;padding:2px 5px}
.dabu-form{display:flex;align-items:flex-end;gap:8px;padding:12px;border-top:1px solid #e5dfd2;background:#fff}
.dabu-form textarea{flex:1;min-width:0;resize:none;border:1px solid #d9d3c6;border-radius:10px;padding:10px;color:#263148;background:#fbfaf6;font:12px/1.5 Inter,Arial,sans-serif;outline:none}
.dabu-form textarea:focus{border-color:#b6974e;box-shadow:0 0 0 3px #c7a65b22}
.dabu-form button{width:39px;height:39px;flex:0 0 39px;border:0;border-radius:10px;background:#172033;color:#e7d39e;font-size:19px;cursor:pointer}
.dabu-form button:disabled{opacity:.5;cursor:wait}
.dabu-footnote{padding:0 12px 10px;background:#fff;color:#8b8e98;font-size:9px;line-height:1.5}
.dabu-thinking{display:flex;align-items:center;gap:5px;color:#777!important}
.dabu-thinking span{width:5px;height:5px;border-radius:50%;background:#c7a65b;animation:dabuPulse .9s ease-in-out infinite}
.dabu-thinking span:nth-child(2){animation-delay:.15s}.dabu-thinking span:nth-child(3){animation-delay:.3s}
@keyframes dabuPulse{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@media(max-width:620px){.dabu-launcher{right:14px;bottom:14px}.dabu-panel{right:14px;bottom:70px;height:min(72vh,590px);width:calc(100vw - 28px)}}
@media(prefers-reduced-motion:reduce){.dabu-launcher,.dabu-thinking span{animation:none!important;transition:none!important}}


/* KDMP by Nusa Pixel — refreshed red/white identity */
:root { --red:#ff002d; --dark:#bd001f; --text:#080808; --muted:#555b65; }
body { color:#080808; }
.sidebar { background:#fff; border-right-color:#e7e7e7; }
.brand-logo { background:#ff002d !important; color:#fff !important; border-radius:10px; }
.brand h2 { color:#080808 !important; font-weight:800; letter-spacing:-.3px; }
.brand p { color:#222 !important; font-weight:600; }
.menu button { color:#171717; }
.menu button:hover,.menu button.active { background:#ffe5e9; color:#080808; }
.menu button.active { box-shadow:inset 4px 0 0 #ff002d; }
.topbar h2,footer { color:#080808; }
.topbar p { color:#080808; font-weight:600; }
footer { font-weight:600; }
.login-logo { background:#ff002d !important; color:#fff !important; }
.login-card h2 { color:#080808 !important; }
.login-card button { background:#ff002d !important; color:#080808 !important; }
.login-card .login-link-button { background:transparent !important; color:#080808 !important; }
.erp-button:not(.secondary),.settings-btn:not(.secondary) { background:#ff002d; color:#080808; }


/* Sidebar typography and vivid section markers */
.sidebar .menu-title{display:block;margin:13px 12px 9px;padding:9px 11px;border-radius:7px;background:#ff002d;color:#080808!important;font-family:"Times New Roman",Times,serif!important;font-size:12px;font-weight:900;letter-spacing:.65px;line-height:1.15;box-shadow:0 2px 7px rgba(255,0,45,.18)}
.sidebar .menu button{font-family:"Times New Roman",Times,serif!important;font-size:15px;font-weight:700!important;color:#080808}
.sidebar .menu button.active,.sidebar .menu button:hover{background:#ffe1e6;color:#080808;font-weight:900!important}
.sidebar .menu button .menu-icon{font-family:Arial,sans-serif;font-weight:400}
.reference-tab{font-family:"Times New Roman",Times,serif;font-weight:700}
.reference-card strong,.reference-card-link{font-family:"Times New Roman",Times,serif;font-weight:700}


/* INVOICE DETAIL - MODAL DI DEPAN, SELARAS DENGAN DETAIL BUKU BESAR */
.invoice-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(3px);
}
.invoice-detail-dialog {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--card-bg, #fff);
  color: var(--text-color, #1f2937);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
.invoice-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.invoice-detail-head h3 { margin: 0 0 5px; }
.invoice-detail-close {
  flex: 0 0 auto;
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 9px;
  background: var(--surface-color, #f8fafc);
  color: inherit;
  padding: 9px 12px;
  cursor: pointer;
}
.invoice-print-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.invoice-print-header h2 { color: #a71925; margin: 0 0 5px; }
.invoice-print-header h3 { margin: 0 0 5px; }
.invoice-detail-table-wrap { width: 100%; overflow-x: auto; margin-top: 16px; }
.invoice-detail-totals { text-align: right; margin-top: 18px; line-height: 2; }
.invoice-detail-grand-total { font-size: 20px; }
.invoice-detail-notes { margin-top: 20px; }
.invoice-payment-title { margin-top: 20px; }
.invoice-detail-actions { justify-content: flex-end; margin-top: 16px; }
.invoice-detail-open { overflow: hidden; }
@media (max-width: 600px) {
  .invoice-detail-overlay { padding: 8px; align-items: flex-end; }
  .invoice-detail-dialog { max-height: 94vh; padding: 14px; border-radius: 15px 15px 10px 10px; }
  .invoice-detail-head { gap: 8px; }
  .invoice-detail-close { padding: 8px 9px; font-size: 12px; }
  .invoice-print-header { display: block; }
  .invoice-print-header > div + div { margin-top: 14px; }
  .invoice-detail-totals { font-size: 13px; }
}
@media print {
  body.invoice-detail-open * { visibility: hidden !important; }
  body.invoice-detail-open #invoiceDetailOverlay,
  body.invoice-detail-open #invoiceDetailOverlay #invoicePrintArea,
  body.invoice-detail-open #invoiceDetailOverlay #invoicePrintArea * { visibility: visible !important; }
  body.invoice-detail-open #invoiceDetailOverlay {
    display: block !important;
    position: absolute;
    inset: 0;
    padding: 0;
    background: #fff;
  }
  body.invoice-detail-open .invoice-detail-dialog {
    width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    padding: 0;
  }
  body.invoice-detail-open .invoice-detail-head,
  body.invoice-detail-open .no-print { display: none !important; }
}
