.recovery-summary,
.recovery-detail {
  margin-top: 15px;
}

.recovery-admin {
  margin-bottom: 15px;
}

.recovery-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recovery-kpis .kpi-value {
  overflow-wrap: anywhere;
}

.recovery-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.recovery-controls .confirm-field {
  flex: 0 1 180px;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.recovery-controls .button {
  min-height: 42px;
}

.recovery-status {
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
}

.recovery-status:empty {
  display: none;
}

.recovery-controls + .recovery-status + .recovery-table {
  margin-top: 12px;
}

.recovery-table td.align-right {
  white-space: nowrap;
}

.recovery-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.sync-card {
  grid-template-columns: 43px minmax(0, 1fr) auto;
}

.sync-card .operation-actions {
  align-items: center;
}

.sync-card .portfolio-switch {
  padding: 0;
  background: none;
}

.sync-card .portfolio-switch button {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 700;
}

.sync-card .portfolio-switch button:hover,
.sync-card .portfolio-switch button.is-active {
  border-color: var(--blue-600);
  background: var(--surface-2);
  box-shadow: none;
}

.sync-status {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
  margin-top: 4px;
  padding: 2px 7px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status:empty {
  background: transparent;
}

.toast.sync-complete-toast {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
}

.sync-complete-toast strong {
  font-size: 13px;
  line-height: 1.4;
}

.sync-complete-toast p {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.sync-complete-toast button {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 7px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.sync-complete-toast button:hover {
  background: var(--surface-2);
  color: var(--text);
}

@media (max-width: 760px) {
  .sync-card {
    grid-template-columns: 43px minmax(0, 1fr);
  }

  .sync-card .operation-actions {
    grid-column: 1 / -1;
  }

  .sync-card .portfolio-switch {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: auto;
  }
}

@media (max-width: 1120px) {
  .recovery-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .recovery-kpis {
    grid-template-columns: minmax(0, 1fr);
  }

  .recovery-controls .confirm-field,
  .recovery-controls .button {
    flex-basis: 100%;
  }
}
