.swi-pd-widget {
  height: 100%;
  min-height: 0;
}

.swi-pd-empty {
  margin: 0;
  padding: 1rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
}

.swi-pd-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.25rem;
}

.swi-pd-stats__card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.swi-pd-stats__card strong {
  font-size: 1.25rem;
  color: #fff;
}

.swi-pd-stats__card span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

.swi-pd-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.35rem 0.15rem;
}

.swi-pd-bars__row {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) 2fr auto;
  align-items: center;
  gap: 0.5rem;
}

.swi-pd-bars__label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.swi-pd-bars__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.swi-pd-bars__fill {
  height: 100%;
  border-radius: inherit;
  background: #c41e2d;
}

.swi-pd-bars__fill--opened { background: #2563eb; }
.swi-pd-bars__fill--assigned { background: #d97706; }
.swi-pd-bars__fill--in-progress { background: #7c3aed; }
.swi-pd-bars__fill--completed { background: #059669; }

.swi-pd-bars__value {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  min-width: 1.25rem;
  text-align: right;
}

.swi-pd-trend__bars {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  height: 100%;
  min-height: 180px;
  padding: 0.5rem 0.15rem 0;
}

.swi-pd-trend__col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.swi-pd-trend__bar {
  width: 100%;
  max-width: 28px;
  min-height: 4px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #e04555, #c41e2d);
  transition: height 0.2s ease;
}

.swi-pd-trend__col.is-active .swi-pd-trend__bar {
  filter: brightness(1.1);
}

.swi-pd-trend__label {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.65);
  transform: rotate(-35deg);
  transform-origin: top center;
  white-space: nowrap;
}

.swi-pd-trend__tip {
  position: absolute;
  bottom: calc(100% + 0.25rem);
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  background: #fff;
  color: #c41e2d;
  font-size: 0.6875rem;
  font-weight: 700;
}

.swi-pd-remaining__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.swi-pd-remaining__stats div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.swi-pd-remaining__stats strong {
  color: #fff;
  font-size: 1.1rem;
}

.swi-pd-remaining__stats span {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.65);
}

.swi-pd-remaining__progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.35rem;
}

.swi-pd-remaining__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.swi-pd-remaining__track span {
  display: block;
  height: 100%;
  background: #c41e2d;
  border-radius: inherit;
}

.swi-pd-undone {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.swi-pd-undone li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.swi-pd-undone strong {
  display: block;
  font-size: 0.8125rem;
  color: #fff;
}

.swi-pd-undone span {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.6);
}

.swi-pd-undone em {
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fbbf24;
}

.light-mode .swi-pd-empty,
.light-mode .swi-pd-bars__label,
.light-mode .swi-pd-trend__label,
.light-mode .swi-pd-remaining__progress-head,
.light-mode .swi-pd-remaining__stats span,
.light-mode .swi-pd-undone span {
  color: #5c6470;
}

.light-mode .swi-pd-stats__card,
.light-mode .swi-pd-remaining__stats div,
.light-mode .swi-pd-undone li {
  background: #f4f5f7;
  border-color: #e2e5ea;
}

.light-mode .swi-pd-stats__card strong,
.light-mode .swi-pd-bars__value,
.light-mode .swi-pd-remaining__stats strong,
.light-mode .swi-pd-undone strong {
  color: #1a1d24;
}
