.task-toolbar {
  display: flex;
  align-items: end;
  gap: 16px;
  margin-bottom: 24px;
}
.task-search {
  flex: 1;
  max-width: 760px;
  min-width: 0;
}
.task-search input {
  width: 100%;
}
.task-search > span,
.task-filters label > span {
  display: block;
  color: #657083;
  font-size: 13px;
  margin-bottom: 8px;
}
.task-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  margin: 0 0 24px;
}
.task-summary > div {
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}
.task-summary > div:last-child {
  border: 0;
}
.task-summary span {
  display: block;
  font-size: 12px;
  color: #657083;
}
.task-summary strong {
  display: block;
  font-size: 25px;
  font-weight: 600;
  margin-top: 6px;
  color: #252d3a;
  font-variant-numeric: tabular-nums;
}
.task-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.task-filters select {
  width: 100%;
  border: 1px solid var(--line);
}
.task-result-count {
  font-size: 12px;
  color: #657083;
  margin-bottom: 12px;
}
.business-task-list {
  display: grid;
  gap: 12px;
}
.business-task {
  display: block;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 20px 22px;
  min-width: 0;
}
.business-task:hover {
  border-color: #aeb7c4;
}
.business-task h2 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.6;
  margin: 12px 0 6px;
}
.business-task p {
  font-size: 13px;
  color: #657083;
  margin: 0;
  overflow-wrap: anywhere;
}
.task-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.task-card-top time {
  margin-left: auto;
  font-size: 12px;
  color: #657083;
}
.task-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #dde2e9;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.6;
  background: #f6f7f9;
  color: #465366;
  white-space: nowrap;
}
.task-status[data-status="办理中"],
.task-status[data-status="待反馈"] {
  background: #f0f4fa;
  color: #3c5c87;
  border-color: #d5dfec;
}
.task-related {
  font-size: 12px;
  color: #657083;
}
.task-card-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 13px;
  color: #465366;
  margin-top: 14px;
}
.business-task .task-result-preview {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf0f4;
  color: #465366;
  white-space: pre-wrap;
}
.task-detail {
  max-width: 960px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.task-detail h1 {
  font-size: 25px;
  line-height: 1.6;
  margin: 14px 0 24px;
}
.task-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  padding: 22px;
  border-radius: 8px;
  background: #f3f5f8;
}
.task-metadata dt {
  font-size: 12px;
  color: #657083;
  margin-bottom: 5px;
}
.task-metadata dd {
  font-size: 14px;
  margin: 0;
  overflow-wrap: anywhere;
}
.task-detail section {
  margin-top: 28px;
}
.task-detail section h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 14px;
}
.task-detail section p {
  font-size: 14px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #465366;
}
.task-detail ul {
  font-size: 14px;
  color: #465366;
}
.task-history {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 18px;
}
.task-history li {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 14px;
  border-left: 2px solid #e0e5ec;
  padding-left: 16px;
}
.task-history time {
  font-size: 12px;
  color: #657083;
}
.task-history strong {
  font-size: 14px;
  font-weight: 550;
}
.task-history p {
  margin: 6px 0 0;
}
.task-prior {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
}
.task-prior strong {
  font-size: 14px;
}
.task-prior > span:not(.task-status) {
  font-size: 12px;
  color: #657083;
}
.task-prior p {
  width: 100%;
  margin: 0;
}
#taskFeedback {
  box-sizing: border-box;
  width: 100%;
  min-height: 180px;
  padding: 14px;
  font: 14px/1.8 inherit;
  color: #465366;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
#taskCopyStatus {
  font-size: 12px;
  color: #657083;
}
@media (max-width: 600px) {
  .task-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .task-toolbar button {
    align-self: flex-end;
  }
  .task-summary > div {
    padding: 14px 10px;
  }
  .task-summary strong {
    font-size: 23px;
  }
  .task-summary span {
    font-size: 11px;
  }
  .task-filters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .business-task {
    padding: 16px;
  }
  .business-task h2 {
    font-size: 16px;
  }
  .task-detail {
    padding: 18px;
  }
  .task-detail h1 {
    font-size: 21px;
  }
  .task-metadata {
    padding: 16px;
    gap: 16px 12px;
  }
  .task-history li {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .task-detail .section-heading {
    align-items: start;
  }
  .task-detail .section-heading button {
    flex-shrink: 0;
  }
  #taskFeedback {
    font-size: 16px;
  }
}
/* Three-level file catalogue: taxpayers are grouped, original rows stay separate. */
.task-file-sheets {
  margin-top: 14px !important;
  font-size: 12px !important;
  line-height: 1.8;
}
.task-file-heading h1 {
  font-size: 24px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.task-file-heading p {
  font-size: 13px;
  color: #657083;
  margin: 0 0 24px;
}
.taxpayer-list {
  display: grid;
  gap: 12px;
}
.taxpayer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  min-width: 0;
}
.taxpayer-card:hover {
  border-color: #aeb7c4;
}
.taxpayer-card h2 {
  font-size: 16px;
  font-weight: 550;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.taxpayer-code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  color: #657083;
  overflow-wrap: anywhere;
  letter-spacing: 0.2px;
}
.taxpayer-count {
  font-size: 13px;
  color: #657083;
  white-space: nowrap;
}
.taxpayer-count span {
  margin-left: 10px;
}
.taxpayer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.taxpayer-heading h1 {
  font-size: 24px;
  line-height: 1.5;
  margin: 0 0 10px;
}
.taxpayer-heading p {
  margin: 0 0 8px;
  color: #657083;
  font-size: 13px;
}
.task-detail-cards {
  display: grid;
  gap: 20px;
}
.task-record-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.task-record-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}
.task-record-card h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}
.task-record-card header > span {
  font-size: 12px;
  color: #657083;
}
.task-record-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px;
  gap: 22px 28px;
}
.task-record-card dl > div {
  min-width: 0;
}
.task-record-card dt {
  font-size: 12px;
  color: #657083;
  line-height: 1.7;
  margin-bottom: 6px;
  white-space: pre-wrap;
}
.task-record-card dd {
  font-size: 14px;
  line-height: 1.9;
  color: #344155;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.task-field-wide {
  grid-column: 1/-1;
}
.task-search + div {
  margin-top: 18px;
}
@media (max-width: 600px) {
  .taxpayer-card {
    padding: 16px;
    gap: 12px;
  }
  .taxpayer-card h2 {
    font-size: 15px;
  }
  .taxpayer-count {
    font-size: 12px;
  }
  .taxpayer-code {
    font-size: 12px;
  }
  .taxpayer-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .taxpayer-heading button {
    align-self: flex-start;
  }
  .taxpayer-heading h1,
  .task-file-heading h1 {
    font-size: 21px;
  }
  .task-record-card > header {
    padding: 14px 16px;
  }
  .task-record-card dl {
    grid-template-columns: 1fr;
    padding: 18px 16px;
    gap: 20px;
  }
  .task-record-card dd {
    font-size: 15px;
  }
  .task-field-wide {
    grid-column: auto;
  }
}
