#zusRegistryView {
  min-width: 0;
}

#zusRegistryView .kpir-toolbar {
  align-items: end;
}

#zusRegistrySummary.tax-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
}

#zusRegistrySummary button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border-color: #d4e0e4;
  background: #fff;
  color: #455b68;
  font-weight: 700;
}

#zusRegistrySummary button strong {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #edf3f5;
  color: #24343d;
}

#zusRegistrySummary button.active {
  border-color: #16877a;
  background: #e8f6f2;
  color: #08675c;
  box-shadow: inset 0 0 0 1px #16877a;
}

#zusRegistrySummary button[data-zus-registry-quick-filter="error"] strong {
  background: #fde8e8;
  color: #9e2828;
}

#zusRegistrySummary button[data-zus-registry-quick-filter="completed"] strong {
  background: #e4f5e8;
  color: #17672d;
}

.zus-registry-list {
  width: 100%;
  min-width: 0;
  overflow: visible;
  border: 1px solid #d6e0e5;
  border-radius: 10px;
  background: #fff;
}

.zus-registry-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.zus-registry-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f7f8;
}

.zus-registry-table th:nth-child(1) { width: 42px; }
.zus-registry-table th:nth-child(2) { width: 25%; }
.zus-registry-table th:nth-child(3) { width: 22%; }
.zus-registry-table th:nth-child(4) { width: 16%; }
.zus-registry-table th:nth-child(5) { width: 17%; }
.zus-registry-table th:nth-child(6) { width: 20%; }

.zus-registry-main-row > td {
  padding-top: 13px;
  padding-bottom: 8px;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.zus-registry-row-upo_received > td {
  background: #f7fcf8;
}

.zus-registry-row-error > td {
  background: #fff8f8;
}

.zus-registry-row-error > td:first-child {
  border-left: 3px solid #c94141;
}

.zus-registry-period,
.zus-registry-kind,
.zus-registry-person,
.zus-registry-total,
.zus-registry-table td > small {
  display: block;
}

.zus-registry-period {
  margin-bottom: 3px;
  font-size: 1.05rem;
}

.zus-registry-kind {
  font-weight: 600;
}

.zus-registry-correction {
  display: inline-flex;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef3f5;
  color: #51636f;
  font-size: .72rem;
  font-weight: 700;
}

.zus-registry-person {
  margin-top: 6px;
  color: #607383;
}

.zus-registry-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf2f4;
  font-size: .78rem;
  font-weight: 800;
}

.zus-registry-status-prepared { background: #e6f4ef; color: #086657; }
.zus-registry-status-signing_pending,
.zus-registry-status-signed { background: #e8f0ff; color: #2456a6; }
.zus-registry-status-sent { background: #fff4d8; color: #805900; }
.zus-registry-status-upo_received { background: #e4f5e8; color: #17672d; }
.zus-registry-status-error { background: #fde8e8; color: #9e2828; }

.registry-status-note {
  display: block;
  margin: 6px 0 0;
  color: #5c6f7d;
  font-size: .76rem;
  line-height: 1.35;
}

.zus-registry-composition {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.zus-registry-composition span {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid #beddd7;
  border-radius: 6px;
  background: #eff9f6;
  color: #0b675b;
  font-size: .75rem;
  font-weight: 800;
}

.zus-registry-total {
  margin-bottom: 5px;
  font-size: 1rem;
}

.zus-registry-no-amount,
.zus-registry-table td > small {
  color: #607383;
  font-size: .75rem;
  line-height: 1.45;
}

.zus-registry-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zus-registry-primary-actions button {
  flex: 1 1 92px;
  min-width: 0;
  white-space: normal;
}

.zus-registry-details-row > td {
  padding-top: 0;
  padding-bottom: 8px;
  border-top: 0;
}

.zus-registry-row-error + .zus-registry-details-row > td {
  background: #fff8f8;
}

.zus-registry-details {
  margin: 0;
}

.zus-registry-details summary {
  width: fit-content;
  cursor: pointer;
  color: #08796d;
  font-size: .78rem;
  font-weight: 800;
}

.zus-registry-details[open] {
  margin: 4px 0 7px;
  padding: 10px 12px;
  border: 1px solid #d5e2e5;
  border-radius: 8px;
  background: #f8fbfc;
}

.zus-registry-details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.zus-registry-details-grid > div {
  padding: 8px;
  border: 1px solid #dde7ea;
  border-radius: 7px;
  background: #fff;
}

.zus-registry-details-grid span,
.zus-registry-details-grid strong {
  display: block;
}

.zus-registry-details-grid span {
  margin-bottom: 3px;
  color: #667a88;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.zus-registry-details-grid strong {
  overflow-wrap: anywhere;
  font-size: .8rem;
}

.zus-registry-details-notes br:first-child {
  display: none;
}

.zus-registry-secondary-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

@media (max-width: 1050px) {
  .zus-registry-table th:nth-child(4),
  .zus-registry-main-row td:nth-child(4) {
    display: none;
  }

  .zus-registry-table th:nth-child(2) { width: 30%; }
  .zus-registry-table th:nth-child(3) { width: 26%; }
  .zus-registry-table th:nth-child(5) { width: 19%; }
  .zus-registry-table th:nth-child(6) { width: 25%; }
}

@media (max-width: 720px) {
  #zusRegistrySummary.tax-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #zusRegistrySummary button {
    justify-content: space-between;
  }

  .zus-registry-list {
    border: 0;
  }

  .zus-registry-table,
  .zus-registry-table tbody,
  .zus-registry-main-row,
  .zus-registry-main-row > td {
    display: block;
    width: 100%;
  }

  .zus-registry-table thead {
    display: none;
  }

  .zus-registry-main-row {
    position: relative;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #d5e2e5;
    border-radius: 10px 10px 0 0;
  }

  .zus-registry-main-row > td {
    padding: 5px 0;
    border: 0;
  }

  .zus-registry-main-row > td:first-child {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
  }

  .zus-registry-details-row {
    display: table;
    width: 100%;
  }

  .zus-registry-details-row > td:first-child {
    display: none;
  }

  .zus-registry-details-row > td:last-child {
    display: table-cell;
    padding: 8px 12px 12px;
    border: 1px solid #d5e2e5;
    border-top: 0;
    border-radius: 0 0 10px 10px;
  }

  .zus-registry-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
