.wf-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.wf-overview > div {
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, #e4f2fb, #f6f9fc);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.wf-overview strong {
  font-size: 38px;
  letter-spacing: -0.05em;
}
.wf-overview span,
.wf-task small {
  color: var(--muted, #7387a0);
}
.wf-filter {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 18px;
  margin-bottom: 20px;
}
.wf-filter .field {
  margin: 0;
}
.wf-list {
  display: grid;
  gap: 14px;
}
.wf-task {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.wf-task:hover {
  border-color: #7595b9;
  transform: translateY(-2px);
}
.wf-task-copy {
  flex: 1;
  min-width: 0;
}
.wf-task strong,
.wf-task small {
  display: block;
}
.wf-task strong {
  font-size: 18px;
  margin-bottom: 7px;
  overflow-wrap: anywhere;
}
.wf-task small + small {
  margin-top: 4px;
}
.wf-overdue {
  border-left: 4px solid #bc7838;
}
.wf-status {
  border-radius: 30px;
  background: #edf3f9;
  padding: 7px 12px;
  font-size: 12px;
  white-space: nowrap;
}
.wf-in_progress {
  background: #e4efff;
  color: #365d91;
}
.wf-needs_info {
  background: #fff1da;
  color: #8f6227;
}
.wf-done {
  background: #e6f4ed;
  color: #39705d;
}
.wf-rejected {
  background: #fce9e9;
  color: #944c4c;
}
.wf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.wf-template {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 18px;
  min-width: 0;
}
.wf-template p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wf-template small {
  color: var(--muted);
}
.wf-template .wf-actions,
.wf-template > button {
  margin-top: auto;
}
.wf-client,
.wf-team-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.wf-team {
  margin-bottom: 20px;
}
.wf-team p {
  margin-top: 14px;
}
.wf-client h2,
.wf-request h2,
.wf-template h2 {
  font-size: 22px;
  font-weight: 750;
}
.wf-request-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}
.wf-request small {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.wf-request details {
  margin: 20px 0;
}
.wf-request summary {
  cursor: pointer;
  font-weight: 650;
}
.wf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.wf-timeline {
  list-style: none;
  padding: 0 0 0 18px;
  border-left: 1px solid #d6e2ef;
  margin: 26px 0 0 6px;
}
.wf-timeline li {
  position: relative;
  margin: 0 0 22px;
}
.wf-timeline li:before {
  content: "";
  position: absolute;
  left: -23px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b8ead;
}
.wf-timeline time {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.wf-timeline p {
  white-space: pre-wrap;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.wf-notes {
  margin: 20px 0;
  padding: 18px;
  border-radius: 18px;
  background: #f0f5fa;
  max-height: 260px;
  overflow: auto;
}
.wf-notes p {
  margin: 0 0 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wf-notes small {
  display: block;
  color: var(--muted);
}
.wf-amount {
  font-size: 34px;
  font-weight: 750;
  margin-top: 20px;
}
.wf-client-intro {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
  background: #e8f2fa;
  margin-bottom: 24px;
}
.wf-client-intro > div:nth-child(2) {
  flex: 1;
}
.wf-client-intro p {
  font-size: 14px;
  margin-top: 7px;
  color: var(--muted);
}
.wf-backups,
.wf-statement {
  max-width: 860px;
}
.wf-backups h2 {
  margin: 22px 0 12px;
}
.wf-backups p {
  margin-bottom: 20px;
}
.wf-status,
.wf-client p {
  overflow-wrap: anywhere;
}
.wf-request p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.wf-template[hidden],
[data-payment][hidden],
[data-reply][hidden] {
  display: none;
}
@media (max-width: 760px) {
  .wf-overview {
    gap: 8px;
  }
  .wf-overview > div {
    padding: 16px 12px;
    border-radius: 18px;
  }
  .wf-overview strong {
    font-size: 28px;
  }
  .wf-overview span {
    font-size: 11px;
  }
  .wf-filter {
    grid-template-columns: 1fr 1fr;
    padding: 18px;
  }
  .wf-filter .field:last-child {
    grid-column: 1/-1;
  }
  .wf-grid {
    grid-template-columns: 1fr;
  }
  .wf-task {
    padding: 18px 14px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .wf-task .pill-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }
  .wf-task-copy {
    flex-basis: calc(100% - 60px);
  }
  .wf-task > span.wf-status {
    margin-left: 50px;
  }
  .wf-task > .material-symbols-rounded {
    margin-left: auto;
  }
  .wf-client,
  .wf-team-head,
  .wf-client-intro {
    align-items: start;
    flex-wrap: wrap;
  }
  .wf-client > button,
  .wf-client-intro > a {
    width: 100%;
  }
  .wf-request-head {
    align-items: start;
    flex-direction: column;
  }
  .wf-actions .btn {
    flex: 1;
    min-width: 130px;
  }
  .wf-request h2 {
    font-size: 20px;
  }
  .wf-request {
    padding: 22px;
  }
  .wf-client-intro {
    padding: 20px;
  }
  .wf-client-intro > div:nth-child(2) {
    min-width: 200px;
  }
  .wf-statement {
    padding: 22px;
  }
  .wf-statement .field-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .modal .wf-actions {
    margin-bottom: 20px;
  }
}
@media (max-width: 760px) {
  .modal.workflow-dialog {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    padding: 0;
  }
  .workflow-dialog[open] {
    display: flex;
    flex-direction: column;
  }
  .workflow-dialog .modal-head {
    flex-shrink: 0;
    padding: 20px 22px;
    border-bottom: 1px solid #e4ebf3;
  }
  .workflow-dialog .modal-head h2 {
    font-size: 24px;
  }
  .workflow-dialog > .modal-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding: 22px;
  }
  .workflow-dialog .modal-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }
  .workflow-dialog .modal-form .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 22px;
  }
  .workflow-dialog .modal-actions {
    flex-shrink: 0;
    padding: 16px 22px calc(16px + env(safe-area-inset-bottom));
    background: white;
    border-top: 1px solid #e4ebf3;
    gap: 10px;
  }
  .workflow-dialog .modal-actions .btn {
    min-width: 0;
    flex: 1;
    padding: 14px 10px;
    font-size: 13px;
  }
}
