.kd-dashboard,
.kd-post-position-block,
.kd-table-wrap,
.kd-insights-grid,
.kd-years {
  box-sizing: border-box;
}

.kd-dashboard {
  border: 1px solid #e5e7eb;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  margin: 24px 0;
}

.kd-dashboard-header h2,
.kd-section-title {
  margin: 0 0 12px;
  line-height: 1.25;
}

.kd-dashboard-header p {
  margin: 0;
  color: #4b5563;
}

.kd-dashboard-toolbar,
.kd-years {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.kd-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #f3f4f6;
  color: #111827;
  border: 0;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.kd-chip:hover {
  background: #e5e7eb;
}

.kd-chip-active {
  background: #111827;
  color: #fff;
}

.kd-insights-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}

.kd-stat-card,
.kd-chart-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
  min-width: 0;
}

.kd-stat-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.kd-stat-value {
  font-size: 18px;
  line-height: 1.2;
  word-break: break-word;
}

.kd-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0 24px;
}

.kd-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.kd-table th,
.kd-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.kd-table th {
  background: #111827;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.kd-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.kd-chart-card {
  margin: 12px 0 20px;
  height: 360px;
}

.kd-chart-host,
.kd-chart,
.kd-chart-canvas {
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.kd-empty {
  padding: 14px 16px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  color: #6b7280;
  background: #f9fafb;
}

.kd-note {
  margin: 10px 0 16px;
}

@media (max-width: 782px) {
  .kd-dashboard {
    padding: 16px;
  }

  .kd-stat-value {
    font-size: 20px;
  }

  .kd-table {
    min-width: 640px;
  }
}


@media (max-width: 1200px) {
  .kd-insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .kd-dashboard {
    padding: 16px;
  }

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

@media (max-width: 520px) {
  .kd-insights-grid {
    grid-template-columns: 1fr;
  }
}

.kd-dashboard-insights {
  display: flex;
    flex-direction: row;
    justify-content: space-between;
}
