.task-list {
  display: grid;
  gap: 14px;
}

.task-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: -4px 0 18px;
  padding: 13px 15px;
  border: 1px solid #1d3b32;
  border-radius: 14px;
  background: #0b1915;
}

.task-toolbar label { min-width: 190px; }
.task-toolbar label:last-child { min-width: 135px; }

.task-overview {
  overflow: hidden;
  border: 1px solid #1d3b32;
  border-radius: 18px;
  background: linear-gradient(145deg, #10211c, #091612);
  box-shadow: 0 14px 35px #0002;
}

.task-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #1a352c;
  background: #10241e80;
}

.task-overview-head h3 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: -.25px;
}

.task-overview-head .pill {
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .35px;
}

.task-kicker {
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.task-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #1a352c;
}

.task-fact {
  min-width: 0;
  padding: 17px 20px;
  background: #0c1a16;
}

.task-fact > span {
  display: block;
  margin-bottom: 5px;
  color: #789188;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .55px;
  text-transform: uppercase;
}

.task-fact > strong {
  display: block;
  overflow: hidden;
  color: #eef8f4;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-fact > strong.green { color: var(--green); }
.task-fact > strong.warn { color: #ffd66f; }

.task-progress {
  height: 5px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 9px;
  background: #203a32;
}

.task-progress i {
  display: block;
  width: 100% !important;
  min-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: hsl(calc(var(--progress) * 1.2) 82% 50%);
  box-shadow: 0 0 10px hsl(calc(var(--progress) * 1.2) 82% 50% / .45);
  transition: width .35s ease, background .35s ease;
}

.task-overview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  color: var(--muted);
  font-size: 12px;
}

.task-overview-foot b { color: #dbeae5; }
.task-overview-foot .ghost { min-width: 130px; }

.task-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.task-actions .ghost { min-width: 104px; }

.task-edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #1a352c;
  background: #0a1713;
}

.task-edit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.task-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #1d3b32;
  border-radius: 14px;
  background: #0b1915;
  color: var(--muted);
  font-size: 12px;
}

.task-page-size { min-width: 150px; text-align: center; }
.task-page-size span { display: block; margin-bottom: 5px; }
.task-pagination nav { display: flex; justify-content: flex-end; gap: 6px; }
.task-pagination button { min-width: 38px; padding: 7px 10px; }
.task-pagination button.active { border-color: var(--green); background: #1b4939; color: #fff; }
.task-pagination button:disabled { opacity: .38; cursor: not-allowed; transform: none; }

@media (max-width: 1100px) {
  .task-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .task-overview-head,
  .task-overview-foot {
    align-items: flex-start;
    padding: 15px;
  }

  .task-overview-head { gap: 10px; }
  .task-overview-head h3 { font-size: 17px; }
  .task-facts { grid-template-columns: 1fr 1fr; }
  .task-fact { padding: 14px 15px; }
  .task-fact > strong { white-space: normal; }
  .task-overview-foot { flex-direction: column; }
  .task-actions { width: 100%; }
  .task-actions .ghost { flex: 1 1 120px; }
  .task-toolbar { align-items: stretch; flex-direction: column; }
  .task-toolbar label, .task-toolbar label:last-child { min-width: 0; }
  .task-edit-form { grid-template-columns: 1fr; padding: 15px; }
  .task-edit-actions { grid-column: auto; }
  .task-edit-actions button { flex: 1; }
  .task-pagination { display: flex; align-items: stretch; flex-direction: column; }
  .task-page-size { order: 3; }
  .task-pagination nav { justify-content: center; overflow-x: auto; }
}

@media (max-width: 390px) {
  .task-facts { grid-template-columns: 1fr; }
}
