/* KPRI Client v2.3.3 — Dashboard Usability Refinement
 * Seluruh aturan dibatasi pada .dashboard-v233 agar CSS global tetap utuh.
 */

.dashboard-v233 {
  height: auto;
  min-height: 0;
  overflow: visible;
  gap: 12px;
  padding-bottom: 18px;
}

.dashboard-v233 .dashboard-header-card {
  padding: 14px 16px;
}

.dashboard-v233 .dashboard-alert {
  margin: 0;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
}

.dashboard-summary-card {
  min-width: 0;
  min-height: 112px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 3px solid #d0d5dd;
}

.dashboard-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-summary-head span {
  color: #667085;
  font-size: .74rem;
  font-weight: 750;
}

.dashboard-summary-head i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  color: #475467;
  flex: 0 0 auto;
}

.dashboard-summary-card > strong {
  margin-top: 8px;
  color: #101828;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-summary-card > small {
  margin-top: 6px;
  color: #667085;
  font-size: .66rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-summary-card.cash {
  border-top-color: #16a34a;
}
.dashboard-summary-card.cash .dashboard-summary-head i {
  background: #ecfdf3;
  color: #15803d;
}

.dashboard-summary-card.bank {
  border-top-color: #2563eb;
}
.dashboard-summary-card.bank .dashboard-summary-head i {
  background: #eff6ff;
  color: #1d4ed8;
}

.dashboard-summary-card.saving {
  border-top-color: #059669;
}
.dashboard-summary-card.saving .dashboard-summary-head i {
  background: #ecfdf5;
  color: #047857;
}

.dashboard-summary-card.loan {
  border-top-color: #f59e0b;
}
.dashboard-summary-card.loan .dashboard-summary-head i {
  background: #fffbeb;
  color: #b45309;
}

.dashboard-summary-card.billing {
  border-top-color: #0891b2;
}
.dashboard-summary-card.billing .dashboard-summary-head i {
  background: #ecfeff;
  color: #0e7490;
}

.dashboard-summary-card.overdue {
  border-top-color: #dc2626;
}
.dashboard-summary-card.overdue .dashboard-summary-head i {
  background: #fef2f2;
  color: #b91c1c;
}

.dashboard-summary-card.member {
  border-top-color: #7c3aed;
}
.dashboard-summary-card.member .dashboard-summary-head i {
  background: #f5f3ff;
  color: #6d28d9;
}

.dashboard-navigation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  gap: 12px;
}

.dashboard-section-card,
.dashboard-chart-card {
  padding: 15px;
  min-width: 0;
}

.dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-section-head > div {
  min-width: 0;
}

.dashboard-section-head strong,
.dashboard-section-head small {
  display: block;
}

.dashboard-section-head strong {
  color: #344054;
  font-size: .94rem;
}

.dashboard-section-head small {
  margin-top: 2px;
  color: #667085;
  font-size: .7rem;
  line-height: 1.35;
}

.dashboard-section-head > i {
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-module-link {
  min-width: 0;
  min-height: 76px;
  padding: 10px;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  background: #f8fafc;
  color: #344054;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}

.dashboard-module-link:hover {
  border-color: #84aee8;
  background: #eef5ff;
  color: #173f75;
  transform: translateY(-1px);
}

.dashboard-module-link > i:first-child {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #2563eb;
  border: 1px solid #e4e7ec;
  flex: 0 0 auto;
}

.dashboard-module-link > i:last-child {
  color: #98a2b3;
  font-size: .75rem;
  flex: 0 0 auto;
}

.dashboard-module-link span {
  min-width: 0;
  flex: 1;
}

.dashboard-module-link strong,
.dashboard-module-link small {
  display: block;
}

.dashboard-module-link strong {
  font-size: .78rem;
}

.dashboard-module-link small {
  margin-top: 3px;
  color: #667085;
  font-size: .65rem;
  line-height: 1.3;
}

.dashboard-followup-simple-list {
  display: grid;
  gap: 7px;
}

.dashboard-followup-simple {
  min-width: 0;
  min-height: 55px;
  padding: 9px 10px;
  border: 1px solid #eaecf0;
  border-radius: 9px;
  color: #344054;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-followup-simple:hover {
  background: #f8fafc;
  border-color: #98a2b3;
  color: #1d2939;
}

.dashboard-followup-simple > i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  flex: 0 0 auto;
}

.dashboard-followup-simple span {
  min-width: 0;
  flex: 1;
}

.dashboard-followup-simple strong,
.dashboard-followup-simple small {
  display: block;
}

.dashboard-followup-simple strong {
  font-size: .76rem;
}

.dashboard-followup-simple small {
  margin-top: 2px;
  color: #667085;
  font-size: .65rem;
  line-height: 1.3;
}

.dashboard-followup-simple > b {
  min-width: 30px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: .72rem;
  text-align: center;
  flex: 0 0 auto;
}

.dashboard-followup-simple.danger > i,
.dashboard-followup-simple.danger > b {
  background: #fef2f2;
  color: #b42318;
}

.dashboard-followup-simple.warning > i,
.dashboard-followup-simple.warning > b {
  background: #fffaeb;
  color: #b54708;
}

.dashboard-followup-simple.ok > i,
.dashboard-followup-simple.ok > b {
  background: #ecfdf3;
  color: #027a48;
}

.dashboard-operational-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .45fr);
  gap: 12px;
  align-items: stretch;
}

.dashboard-chart-card {
  display: flex;
  flex-direction: column;
  min-height: 445px;
}

.dashboard-chart-head {
  align-items: center;
}

.dashboard-chart-wrap {
  position: relative;
  min-height: 280px;
  flex: 1;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  overflow: hidden;
}

.dashboard-chart-wrap .dash-chart-svg {
  height: 100%;
  min-height: 280px;
}

.dashboard-chart-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #667085;
  font-size: .67rem;
}

.dashboard-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.dashboard-cash-total-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.dashboard-cash-total-grid > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  background: #fff;
}

.dashboard-cash-total-grid span,
.dashboard-cash-total-grid strong {
  display: block;
}

.dashboard-cash-total-grid span {
  color: #667085;
  font-size: .66rem;
}

.dashboard-cash-total-grid strong {
  margin-top: 3px;
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-v233 .is-positive,
.dashboard-v233 .positive {
  color: #067647;
}

.dashboard-v233 .is-negative,
.dashboard-v233 .negative {
  color: #b42318;
}

.dashboard-v233 .neutral {
  color: #475467;
}

.dashboard-month-card {
  display: flex;
  flex-direction: column;
}

.dashboard-month-list {
  display: grid;
  gap: 2px;
}

.dashboard-month-row {
  min-width: 0;
  min-height: 46px;
  border-bottom: 1px solid #eaecf0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.dashboard-month-row:last-child {
  border-bottom: 0;
}

.dashboard-month-row > i {
  width: 28px;
  text-align: center;
}

.dashboard-month-row span {
  color: #475467;
  font-size: .72rem;
}

.dashboard-month-row strong {
  font-size: .74rem;
  text-align: right;
  white-space: nowrap;
}

.dashboard-today-box {
  margin-top: auto;
  padding: 12px;
  border: 1px solid #c7d7fe;
  border-radius: 10px;
  background: #f5f8ff;
}

.dashboard-today-box span,
.dashboard-today-box strong {
  display: block;
}

.dashboard-today-box span {
  color: #475467;
  font-size: .68rem;
}

.dashboard-today-box strong {
  margin-top: 3px;
  color: #1849a9;
  font-size: .95rem;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 12px;
}

.dashboard-activity-list {
  display: grid;
}

.dashboard-activity-row {
  min-width: 0;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid #eaecf0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.dashboard-activity-row:last-child {
  border-bottom: 0;
}

.dashboard-activity-row > i {
  color: #039855;
  text-align: center;
}

.dashboard-activity-row span {
  min-width: 0;
}

.dashboard-activity-row strong,
.dashboard-activity-row small {
  display: block;
}

.dashboard-activity-row strong {
  color: #344054;
  font-size: .73rem;
}

.dashboard-activity-row small {
  margin-top: 2px;
  color: #667085;
  font-size: .65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-activity-row time {
  color: #667085;
  font-size: .65rem;
  white-space: nowrap;
}

.dashboard-condition-list {
  display: grid;
}

.dashboard-condition-list > div {
  min-width: 0;
  min-height: 43px;
  border-bottom: 1px solid #eaecf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-condition-list > div:last-child {
  border-bottom: 0;
}

.dashboard-condition-list span {
  color: #667085;
  font-size: .7rem;
}

.dashboard-condition-list strong {
  color: #344054;
  font-size: .72rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-empty-state {
  padding: 18px 0;
  color: #667085;
  font-size: .72rem;
  text-align: center;
}

@media (max-width: 1199.98px) {
  .dashboard-navigation-grid,
  .dashboard-operational-grid,
  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-chart-card {
    min-height: 420px;
  }
}

@media (max-width: 767.98px) {
  .dashboard-v233 {
    padding: 0 0 72px;
  }

  .dashboard-v233 .dashboard-header-card,
  .dashboard-section-card,
  .dashboard-chart-card {
    padding: 12px;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-card {
    min-height: 105px;
  }

  .dashboard-summary-card > strong {
    font-size: .86rem;
  }

  .dashboard-module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-module-link {
    min-height: 66px;
  }

  .dashboard-chart-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-chart-head .btn {
    width: 100%;
  }

  .dashboard-chart-card {
    min-height: 400px;
  }

  .dashboard-chart-wrap,
  .dashboard-chart-wrap .dash-chart-svg {
    min-height: 250px;
  }

  .dashboard-chart-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-cash-total-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-activity-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .dashboard-activity-row time {
    grid-column: 2;
  }
}

@media (max-width: 430px) {
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-card {
    min-height: 96px;
  }
}
