/* ======================================================
   KPI PROFESSIONAL GRID
   ====================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 50px;
}

.kpi-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 110px;
}

.kpi-card.primary {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #ffffff;
}

.kpi-card.accent {
  background: #f9fafb;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #6b7280;
}

.kpi-card.primary .kpi-label {
  color: #c7d2fe;
}

.kpi-value {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}

.kpi-card.primary .kpi-value {
  color: #ffffff;
}

.kpi-text {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

/* ======================================================
   DASHBOARD GRID (DATA AREA)
   ====================================================== */

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.dashboard-item {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.dashboard-item h3 {
  margin: 0 0 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

/* ======================================================
   TABLE STYLE
   ====================================================== */

.table-horizontal,
.table-investor {
  width: 100%;
  border-collapse: collapse;
}

.table-horizontal th,
.table-horizontal td,
.table-investor th,
.table-investor td {
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  text-align: center;
  font-size: 14px;
}

/* ======================================================
   SUB TABLE (RATA-RATA & TOTAL RUPIAH)
   ====================================================== */

.sub-table {
  margin-top: 12px;
  background: #f9fafb;
}

.sub-table th {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.sub-table td {
  font-weight: 600;
  color: #1f2937;
}

/* ======================================================
   RESPONSIVE BREAKPOINT
   ====================================================== */

/* LARGE LAPTOP */
@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* TABLET */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* SMALL TABLET */
@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* MOBILE */
@media (max-width: 640px) {
  .kpi-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .kpi-value {
    font-size: 28px;
  }

  .dashboard-item {
    padding: 16px;
  }
}

/* === FIX DONUT CHART HEIGHT (ELEMENTOR SAFE) === */

.chart-wrapper {
  position: relative;
  height: 420px;       /* KUNCI TINGGI DI SINI */
  width: 100%;
}

.chart-wrapper canvas {
  position: absolute !important;
  inset: 0;
}

form input[type="text"] {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.pagination a {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  text-decoration: none;
}

.pagination a.active {
  background: #2563eb;
  color: #fff;
}

/* ===============================
   FORM PELANGGAN (ADD / EDIT)
   =============================== */

.form-pelanggan {
  max-width: 920px;
  background: #ffffff;
  padding: 28px 32px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 24px;
  row-gap: 18px;
}

/* FULL WIDTH FIELD */
.form-pelanggan .full {
  grid-column: 1 / -1;
}

/* LABEL */
.form-pelanggan label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: .02em;
}

/* INPUT, SELECT */
.form-pelanggan input,
.form-pelanggan select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  color: #111827;
  background: #ffffff;
  transition: all .2s ease;
}

.form-pelanggan input::placeholder {
  color: #9ca3af;
}

/* FOCUS */
.form-pelanggan input:focus,
.form-pelanggan select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ACTION AREA */
.form-pelanggan .form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}

/* PRIMARY BUTTON */
.form-pelanggan button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}

.form-pelanggan button:hover {
  background: #1e40af;
}

.form-pelanggan button:active {
  transform: translateY(1px);
}

/* CANCEL LINK */
.form-pelanggan .btn-cancel {
  background: #f3f4f6;
  color: #374151;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.form-pelanggan .btn-cancel:hover {
  background: #e5e7eb;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 768px) {
  .form-pelanggan {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

/* ===============================
   FORM GROUP FIX (WAJIB)
   =============================== */

.form-pelanggan .form-group {
  display: flex;
  flex-direction: column;
}

/* PAKSA SELECT TAMPIL */
.form-pelanggan select {
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  background-color: #fff;
}

/* FIX SAFARI / ELEMENTOR */
.form-pelanggan select::-ms-expand {
  display: block;
}

/* ===============================
   FIX DROPDOWN SELECT (ELEMENTOR)
   =============================== */

/* Lepaskan overflow parent */
.form-pelanggan,
.form-pelanggan * {
  overflow: visible !important;
}

/* Pastikan select di atas layer lain */
.form-pelanggan select {
  position: relative;
  z-index: 9999;
}

/* Pastikan option terlihat */
.form-pelanggan option {
  background: #ffffff;
  color: #111827;
}

.table-investor th,
.table-investor td {
  white-space: nowrap;
}

/* ===============================
   TABLE LIST PELANGGAN
   =============================== */

.table-investor {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

/* HEADER */
.table-investor thead th {
  background: #f9fafb;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 14px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

/* BODY */
.table-investor tbody td {
  padding: 14px 14px;
  font-size: 14px;
  color: #111827;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

/* ROW HOVER */
.table-investor tbody tr:hover {
  background: #f8fafc;
}

/* LAST ROW */
.table-investor tbody tr:last-child td {
  border-bottom: none;
}

/* PPP USER STYLE */
.table-investor .ppp-user {
  font-family: monospace;
  font-size: 13px;
  color: #1e40af;
}

/* ACTION BUTTON */
.table-investor .aksi a {
  display: inline-block;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  margin-right: 6px;
}

.table-investor .aksi a.edit {
  background: #e0e7ff;
  color: #1e40af;
}

.table-investor .aksi a.hapus {
  background: #fee2e2;
  color: #991b1b;
}

.table-investor .aksi a:hover {
  opacity: .85;
}

/* ===============================
   RESPONSIVE TABLE
   =============================== */
@media (max-width: 1024px) {
  .table-investor {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ===============================
   PAGINATION
   =============================== */

#askr-pagination {
  margin-top: 22px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

#askr-pagination .pg-btn {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  text-decoration: none;
  color: #374151;
  background: #ffffff;
}

#askr-pagination .pg-btn.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  border-color: #2563eb;
}

#askr-pagination .pg-btn.disabled {
  pointer-events: none;
  opacity: .4;
}

#askr-pagination .dots {
  padding: 0 6px;
  color: #9ca3af;
}


