.material-kpi-card {
  border: 1px solid rgba(var(--bs-primary-rgb), 0.14);
  background: linear-gradient(145deg, #ffffff 10%, rgba(var(--bs-primary-rgb), 0.06) 100%);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  will-change: transform;
  transform-style: preserve-3d;
  cursor: default;
}

.material-kpi-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(var(--bs-primary-rgb), 0.18);
  border-color: rgba(var(--bs-primary-rgb), 0.34);
}

.material-kpi-card::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  top: -44px;
  right: -36px;
  background: radial-gradient(circle at center, rgba(var(--bs-primary-rgb), 0.35) 0%, rgba(var(--bs-primary-rgb), 0.08) 52%, rgba(var(--bs-primary-rgb), 0) 100%);
  pointer-events: none;
}

.material-kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.55rem;
  position: relative;
  z-index: 1;
}

.material-kpi-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5b6b79;
}

.material-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.12rem;
  background: rgba(var(--bs-primary-rgb), 0.16);
  color: var(--bs-primary);
  transition: transform 0.22s ease;
}

.material-kpi-card:hover .material-kpi-icon {
  transform: rotate(-8deg) scale(1.06);
}

.material-kpi-value {
  margin-bottom: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
  z-index: 1;
}

.material-kpi-progress {
  height: 6px;
  width: 100%;
  border-radius: 999px;
  background: rgba(94, 109, 126, 0.16);
  overflow: hidden;
  margin-top: 0.72rem;
  position: relative;
  z-index: 1;
}

.material-kpi-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bs-primary) 0%, #11b3ea 100%);
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-accent-success .material-kpi-progress-fill {
  background: linear-gradient(90deg, #0fae49 0%, #16d85f 100%);
}

.kpi-accent-danger .material-kpi-progress-fill {
  background: linear-gradient(90deg, #bf1f24 0%, #e3242b 100%);
}

.material-kpi-foot {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  color: #70808e;
  position: relative;
  z-index: 1;
}

.material-kpi-foot strong {
  margin-left: auto;
  font-size: 0.74rem;
  color: #44515d;
  font-weight: 700;
}

.material-kpi-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #13d65b;
  box-shadow: 0 0 0 4px rgba(19, 214, 91, 0.18);
  animation: materialPulse 1.8s infinite;
}

.material-kpi-card.kpi-accent-success {
  border-color: rgba(18, 217, 90, 0.3);
  background: linear-gradient(145deg, #ffffff 10%, rgba(18, 217, 90, 0.08) 100%);
}

.material-kpi-card.kpi-accent-success .material-kpi-icon {
  background: rgba(18, 217, 90, 0.17);
  color: #0fae49;
}

.material-kpi-card.kpi-accent-danger {
  border-color: rgba(227, 36, 43, 0.24);
  background: linear-gradient(145deg, #ffffff 10%, rgba(227, 36, 43, 0.08) 100%);
}

.material-kpi-card.kpi-accent-danger .material-kpi-icon {
  background: rgba(227, 36, 43, 0.14);
  color: #c81f25;
}

@keyframes materialPulse {
  0% {
    transform: scale(0.92);
    opacity: 1;
  }
  70% {
    transform: scale(1.08);
    opacity: 0.58;
  }
  100% {
    transform: scale(0.92);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .material-kpi-value {
    font-size: 1.25rem;
  }

  .material-kpi-card {
    transform: none !important;
  }
}

.material-table-shell {
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  border-top: 1px solid rgba(var(--bs-primary-rgb), 0.12);
}

.material-table-wrap {
  max-height: 68vh;
  overflow: auto;
}

.material-data-table {
  margin-bottom: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.material-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(110deg, #0f79ad 0%, #1697d4 62%, #22b1e8 100%);
  color: #ffffff;
  border: 0;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.28px;
  font-weight: 700;
  padding-top: 0.82rem;
  padding-bottom: 0.82rem;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.material-data-table thead th:first-child {
  border-top-left-radius: 12px;
}

.material-data-table thead th:last-child {
  border-top-right-radius: 12px;
}

.material-data-table tbody td {
  border-top: 1px solid #edf2f6;
  border-bottom: 0;
  vertical-align: middle;
  padding: 0.78rem 0.75rem;
  font-size: 0.86rem;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.material-data-table tbody tr:nth-child(even) td {
  background-color: #fbfdff;
}

.material-data-table tbody tr:hover td {
  background-color: #ecf8fe;
}

.material-data-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--bs-primary);
}

.material-data-table tbody tr td.text-center {
  white-space: nowrap;
}

.material-data-table tbody tr td:nth-child(3),
.material-data-table tbody tr td:nth-child(8),
.material-data-table tbody tr td:nth-child(9) {
  min-width: 170px;
}

@media (max-width: 992px) {
  .material-table-wrap {
    max-height: none;
  }

  .material-data-table thead th {
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .material-data-table tbody td {
    white-space: nowrap;
  }
}
